Player -> Collision -> FireFlower :
- Code: Select all
power=1;
Player -> Keydown -> Shoot :
- Code: Select all
if(power==1)
{
CreateActor("Shot","ShotAnimation","(none)","(none)",0,0,false);
}
power=1;
if(power==1)
{
CreateActor("Shot","ShotAnimation","(none)","(none)",0,0,false);
}
life++;
life--;
if(life<=0)
{
DestroyActor("Event Actor");
}
Turon wrote:now all i need is Super Ostrich when he collides with the fire flower he will have an extra life can someone help?
if(colliding==0)
{
life--;
if(life<=0)DestroyActor("Event Actor");
colliding=1;
}
colliding=0;
Bee-Ant wrote:Oh...it seems you set the Collision with Enemy to be repeated yes?
Restrict it then...make another variable called "colliding" and then edit the code to be :
Player-Collision-Enemy:
- Code: Select all
if(colliding==0)
{
life--;
if(life<=0)DestroyActor("Event Actor");
colliding=1;
}
Player-CollisionFinish-Enemy:
- Code: Select all
colliding=0;
lcl wrote::lol: way easier just to set repeat to no.
Bee-Ant wrote:lcl wrote::lol: way easier just to set repeat to no.
For some case, non-repeated collision doesn't work well...sometimes it won't detect the new collision made.
So it's better to use repeated collision with some restriction
Users browsing this forum: No registered users and 1 guest