Page 1 of 1
dr. robotnik wont die!
Posted:
Tue Sep 02, 2008 8:17 pm
by tlah
I am making a sonic the hedgehog game and i added dr. robotnik at the end. i want to make it so that when sonic (or knuckles, as the case may be) jumps on him (collision, top side, dr. robotnik)dr. robotnik's machine explodes. I tried it with an integer (int hitpoints = 10), but it wont work! any suggestions?
Re: dr. robotnik wont die!
Posted:
Tue Sep 02, 2008 9:11 pm
by Azou
Just try to do
Collision/topSide of dr. robotnik/Create actor/Explosion
Also,if you want to destroy dr. robotnik,put
Collision/topside ofdr. robotnik/Destroy actor/dr. robotnik.
Re: dr. robotnik wont die!
Posted:
Wed Sep 03, 2008 2:24 pm
by Kalladdolf
Colission/Any side/
- Code: Select all
hitpoints = hitpoints - 1; // that will take 1 hitpoint away from him every time you jump on him.
if(hitpoints < 0) // if he's got no energy left
{ // robotnik dies;}
Re: dr. robotnik wont die!
Posted:
Wed Sep 03, 2008 2:52 pm
by Azou
Is it necessary to put hitpoits?
Re: dr. robotnik wont die!
Posted:
Wed Sep 03, 2008 7:16 pm
by Kalladdolf
well, I thought (if I'm not mistaken) he wanted 'em... ?
Re: dr. robotnik wont die!
Posted:
Wed Sep 03, 2008 8:19 pm
by Azou
Oh,ok!!
Re: dr. robotnik wont die!
Posted:
Wed Sep 03, 2008 9:57 pm
by tlah
Re: dr. robotnik wont die!
Posted:
Thu Sep 04, 2008 12:51 pm
by Kalladdolf
side note: if you don't use hitpoints, robotnik will die the first time you jump on him.