Hi!
This COG, when lever activated, releases endless grenades, until lever is pressed again.
The problem is that when I "deactivate" the lever, it says "Grenades have stopped..." and then a little while after it says "Can you jump through 16 grenades/0.01 seconds?", and it doesn't say "Can you..." after I activate the lever. Help!
/Edward
This COG, when lever activated, releases endless grenades, until lever is pressed again.
Code:
# Grenades at Jump challange! # # By Edward symbols message activated message pulse surface lever sound announce thing place0 thing place1 thing place2 thing place3 thing place4 thing place5 thing place6 thing place7 thing place8 thing place9 thing place10 thing place11 thing place12 thing place13 thing place14 thing place15 template grenades int i=0 local int z=0 local int go=0 local end # code activated: If(GetSenderRef()!=lever) return; if(go==0) { PlaySoundGlobal(announce,1,0,0xC0); Print("A challange is being thrown at the oily bronze corse."); SetPulse(0.16); SetWallCel(lever,1); go=1; sleep(5); print("Can you jump through 16 grenades/0.01 seconds?"); } else { print("Grenades have stopped..."); SetPulse(0); SetWallCel(lever,0); go=0; } return; pulse: for(i=0; i<16; i=i+1) { CreateThing(grenades,place0); sleep(0.01); } return; end
The problem is that when I "deactivate" the lever, it says "Grenades have stopped..." and then a little while after it says "Can you jump through 16 grenades/0.01 seconds?", and it doesn't say "Can you..." after I activate the lever. Help!
/Edward