Author Topic: how do i make "spell" events with variables?  (Read 492 times)

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...


OK Lemme explain
What you do is take a brick and put these events on it
Code: [Select]
onActivate>self>fireRelay
onRelay>self>FireRelay
onRelay>ifLstMsg>Equals>"Spell Name"
variableTrue>Player>SpawnProjectile

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: [Select]
onActivate>"Original Spell">cancelEventsAnd do this for all the spell bricks you have
For example
Code: [Select]
onActivate>Fireball>cancelEvents
onActivate>Ice Strike>cancelEvents
onActivate>Lightning Bolt>cancelEvents
onActivate>self>fireRelay
onRelay>self>FireRelay
onRelay>ifLstMsg>Equals>"Fireball"
variableTrue>Player>SpawnProjectile

I used to know how, and it certainly worked better than Crazy's method. Too bad I forgot.

I learned something.

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: [Select]
onActivate>"Original Spell">cancelEventsAnd do this for all the spell bricks you have
For example
Code: [Select]
onActivate>Fireball>cancelEvents
onActivate>Ice Strike>cancelEvents
onActivate>Lightning Bolt>cancelEvents
onActivate>self>fireRelay
onRelay>self>FireRelay
onRelay>ifLstMsg>Equals>"Fireball"
variableTrue>Player>SpawnProjectile
so if i want to make a lightning spell i would use

Code: [Select]
onActivate>Lightning Strike>cancelEvents
onActivate>self>fireRelay
onRelay>self>FireRelay
onRelay>ifLstMsg>Equals>"Lightning Strike"
variableTrue>Player>SpawnProjectile>Radio Wave

?

one brick... and it's super easy
Code: [Select]
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

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