Cone of Vision + improved follow hero
#1
Cone of Vision + improved "follow hero"
Lobosque
Version: 0.5
Jan 2 2007

This is a locked, single-post thread from Creation Asylum.  Archived here to prevent its loss.
No support is given.  If you are the owner of the thread, please contact administration.


Introduction

This script make an event follow if the hero is inside his cone of vision.

This cone has a sight (range) of 4. So if you are inside it, the event will follow you.
And this is a cone with an obstacle (the sand show what the event is seeing)

I think that I saw a script like this once, but I decided to write this one from scratch.


Script


You can just paste this above main:

The code


Instructions

To make an event use the cone to follow you, all you gotta do is set this in an "call script".


Code:
$game_map.events[event id].add_cone(sight)


The default sight is 7, if you want to use this, just use "add_cone".
to make him stop, use


Code:
$game_map.events[event id].stop_cone


You can activate a switch too, set the SWITCH constant in the top of the code to the switch ID that you want to be activated


Changelog


Version 0.5


Compatibility

It just rewrite the "follow hero" function, so it'll probably be compatible with any script


Author's Notes

Please leave your opinion and any bug you find or suggestion you have. And don't forget the credits.
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  IMPROVED Fog of War System Samo the thief 0 2,489 05-06-2007, 01:00 PM
Last Post: Samo the thief



Users browsing this thread: 1 Guest(s)