Blockland Forums > Help
how do i make "spell" events with variables?
SoulStealer:
im trying to make spell events with variables but i cant figure out how to make it so i can say a word and a projectile shoots from me 1 time...i can only get it to shoot lots of projectiles or 1 everytime i click the brick...
SoulStealer:
bump...
CrazyGoodDude:
OK Lemme explain
What you do is take a brick and put these events on it
--- Code: ---onActivate>self>fireRelay
onRelay>self>FireRelay
onRelay>ifLstMsg>Equals>"Spell Name"
variableTrue>Player>SpawnProjectile
--- End code ---
CrazyGoodDude:
Sorry for double post but forgot some info
Ok if you want that spell to have a long recharge time put in for event delay (the little box next to the events) what ever time, in milliseconds, you want (the longest is 30,000 milliseconds or 30 seconds)
Also if you want a player to only have one spell at a time put these events before the main ones and put a delay on all the other events (minimum delay to not have it effected is 33 milliseconds)
--- Code: ---onActivate>"Original Spell">cancelEvents
--- End code ---
And do this for all the spell bricks you have
For example
--- Code: ---onActivate>Fireball>cancelEvents
onActivate>Ice Strike>cancelEvents
onActivate>Lightning Bolt>cancelEvents
onActivate>self>fireRelay
onRelay>self>FireRelay
onRelay>ifLstMsg>Equals>"Fireball"
variableTrue>Player>SpawnProjectile
--- End code ---
Chrono:
I used to know how, and it certainly worked better than Crazy's method. Too bad I forgot.