ID:162673
![]() Dec 8 2007, 7:16 pm
|
|
Well, I was thinking about this recently, and I wasnt sure about how I should do this. The first thing that came to mind was .. a variable for each buff (boolean) , a variable to hold the buff timer, and a proc to take away from the timers. The only thing that comes to mind is a lot of variables being made in the future, which I dont particularly mind. Although, I was wondering if theres an easier way?
|
![]() Dec 8 2007, 7:31 pm
|
|
Well, provided that there is no interuption for a buff affect to statr and end, you can call the spell then use spawn() as a timer. If it is interupted, like logging out, remove the buff affect. As for the rest, just make 1 var for each buff effect. One for attack, def, or whatever you call it, instead of naming one for each spell.
|
Thats the thing, I wanted to make it so they could be kept when you logout and log back in. Then just restart the timers. So Im going to assume variables is the way to go? ..
|
No.
Well, obviously variables have to be used in some way, but what you should really be doing is creating a buff datum (or obj, if you want it to have an icon you can show to the player) that will handle all the buffing / unbuffing you need. mob You'll need to fiddle around with Read() and Write() some more if you want a buff that periodically ticks something, like a heal over time. |