Blockland Forums > Help

how do i make "spell" events with variables?

Pages: << < (2/2)

Paw:

I learned something.

SoulStealer:


--- Quote from: CrazyGoodDude on May 12, 2009, 11:35:30 PM ---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 ---

--- End quote ---
so if i want to make a lightning spell i would use


--- Code: ---onActivate>Lightning Strike>cancelEvents
onActivate>self>fireRelay
onRelay>self>FireRelay
onRelay>ifLstMsg>Equals>"Lightning Strike"
variableTrue>Player>SpawnProjectile>Radio Wave
--- End code ---

?

phflack:

one brick... and it's super easy

--- Code: ---0 input>self>firerelay
1 onrelay>self>firerelay
2 onrelay>self>iflastplayermessage
3 onvariabletrue>player>spawnprojectile
4 onvariabletrue>self>seteventenabled 3 unchecked
5 onvariablefalse>self>seteventenabled 3 checked
--- End code ---

or skip 4 and 5 and just put in a delay to space out the spells, instead of just one per message

Pages: << < (2/2)

Go to full version