Hi All,
I have found that there have been occasions where I would like something to happen when something came within range of the PC, based upon the PC from a "hook" point of view. In my latest need, I wanted to have creatures have a variable change when they came within a certain range of the PC ... and within the PCs line of sight.
Now, my first approach was to use the creatures OnPerceive hook, but that fails if the PC is invisible. However, by reversing the approach and have the same code fire if the PC spots the creature was the solution. To get around this missing hook, I ended up messing around with the Persistent Effects, and managed to place a persistent AoE that meets the criteria I need. Furthermore, I think by using a NULL EffectIconEffect image and string, I should be able to make the whole thing "invisible" to the player. ![]()
At the moment, in brief testing, the effect works well. Every PC has the effect put on them at spawn time (including the Main PC) and I am currently using a 20 m radius circle that fires an OnEnter whenever a creature enters the effect ... and so trigger my code.
This may have already been done by others to equal effect, but it only just came to me and I thought others may be interested in the facility of such a hook.
I will finish working on it tomorrow, and report if there are any problems ... Is anybody aware of any potential problems here?
SEE MY NEXT POST
Cheers,
Lance.





Retour en haut






