Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Veiw Range - Basic Assistance

mawk

Sponsor

Anyone familiar with Near Fantastica's Veiw Range script (http://www.rmxp.org/forums/index.php?topic=26662.0) could probably tell you of a great many ways in which it can be used. Of course, I'm not familiar with Veiw Range, which is why I'm making this desperate plea for help.

In essence, I know nothing about it. Right now, this is the particular spot of trouble I'm having:

Alright, so after the discovery of this script I've been attempting to make a ghost chase the player (using an Approach move route and a Battle Processing event upon Event Touch.) Everything seemed fine and dandy; I would have the ghost move idly at random until the player came within its range of vision (five.) At that point, self-switch D would snap on and the ghost would suddenly change its movement patters from Random to Approach, and increase a bit in speed and frequency. I attempted this via this parallel-process script call:
$view_range.enemies_view(002, 5, "D")

When I got within five whatevers of the ghost (EV002,) though, everything went dark and a chorus of angels sang unto me:
"Script 'Game_Switches' line 32: ArgumentError occurred.
comparison of String with 5000 failed"

So, yeah. Lolwut? I'd love to hear just how this happened, and how I SHOULD orient the switches and scripts, or if I SHOULD at all. Many thanks!
 
Hmm... not exactly sure, but you probably should change the coding to:
$view_range.enemies_view(2, 5, "D")

If that doesn't work, it's probably the script. One version of this script doesn't support self-switches, only switches. DerVV made some changes to this to be able to use self-switches. Unfortunately, that was on the RMXP Universe forums, which are down for some reason.  :-\ If all else fails, you can also go here for the earliest version of the script, which uses self-switches too, but doesn't include the BGS part.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top