Alaric
Journeyman
Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7
|
RE: Aura Spell
and @regionenter trigger being constantly on player and checking whether it is the spell region doesn't work?
But I personally think that this is not that good idea. Well, it is good in theory, but totem with forcycle ticking every second, giving memory item and refreshing timer would be easier and cleaner.
Since with region you have to check more stuff. And if there are some shitty things - the region disappears, enter/exit triggers doesn't work always properly (just my experience, sometimes it fired, sometimes not and i had to check and check). With this temporary item ticking you don't have to check where you are, if you left the region and those shits. The only check would be "does memory item exist?" No? => create one, Yes? refresh timer/set it to 2.
If the totem item disappears, no worries, the memory item removes itself very soon. No additional checks and operations.
E: ticking every 2 seconds might be good too if you want to minimalize servers work. But no more. I would also set memory timer a bit higher than ticking time. It is actually you wanted to avoid, but this is the best way I know. No bugs, no stupid checks, short code, does what you want.
(This post was last modified: 03-21-2014 12:51 AM by Alaric.)
|
|
03-20-2014 11:00 PM |
|
|