Page 1 of 1

Collision+

PostPosted: Sat Oct 18, 2008 12:32 pm
by Azou
Hey!! :D
I wanted to ask a question: can we have Collision/Anyside of Actor/Script Editor:
if( Collision+=2)
{
//
}
(Btw,Collision+ means how many times the "object" has to collide with the "actor" to make the event happens)

Re: Collision+

PostPosted: Sat Oct 18, 2008 6:48 pm
by Thanx
No you can't, variables cannot contain characters like the + sign...

Re: Collision+

PostPosted: Sat Oct 18, 2008 9:04 pm
by Azou
Oh, Oh! :cry:

Re: Collision+

PostPosted: Sun Oct 19, 2008 6:58 pm
by Kalladdolf
you can make a custom user variable (var).
and on the collision event put this code:
Code: Select all
var += 1;
if(var > 5)  //if the object has collided 5 times
{
//your action
var = 0; //returns the variable to zero and the whole process can start over again.
}

Re: Collision+

PostPosted: Wed Oct 22, 2008 6:43 pm
by Azou
Bless you!!
+1 :mrgreen: