Aura Spell - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Aura Spell (/Thread-Aura-Spell) |
Aura Spell - Seron - 03-20-2014 07:21 PM Greetings, I have recently tried to make a Aura kind of spell (Think Paladin from Diablo 2). An area of effect around a character which buffs players as long as they stay inside of the area. Also it should move with the caster. I decided to try this using multiregion: Code: [SPELL 425] This works more or less as intended. However it inteferes with events from existing region. Not just @enter or @exit events but also antimagic flags. My question would be: Is there a way to nest a region inside a region so that they do not interefere with each other? Or maybe a better way to do the whole 'aura' thing (hopefully without lots of timer and forchars)? I was thinking about ROOMDEF but apparently you can not use @Enter/@Exit Trigger on that one. RE: Aura Spell - Alaric - 03-20-2014 11:00 PM 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. RE: Aura Spell - Shidhun - 03-20-2014 11:33 PM Try it with something like this : Code: [Spell 425] It is only a part of one of our spells (other effect), and i haven't tested it. But it should give you an Idea how to create your spell[/php] RE: Aura Spell - Seron - 03-21-2014 05:37 AM @Alaric: Hmm might be the only valid solution. With a REGION it seemed to be more effective and smoother than memoryitems and timers but oh well... @Shidhun: This might work for something like you did (a recurring effect) but i think it wouldnt work for something that is gets set when you enter the aura and removed when you leave the aura. Like raising resistances for example. You dont really want them to jump up and down all the time. |