Collision+

Game Editor comments and discussion.

Collision+

Postby Azou » Sat Oct 18, 2008 12:32 pm

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)
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Collision+

Postby Thanx » Sat Oct 18, 2008 6:48 pm

No you can't, variables cannot contain characters like the + sign...
http://www.youtube.com/watch?v=XyXexDJBv58
http://www.youtube.com/watch?v=Be4__gww1xQ
These are me and playing the piano (second one with a friend/fellow student)
Hope you watch and enjoy!
User avatar
Thanx
 
Posts: 314
Joined: Sat Jan 26, 2008 10:07 pm
Location: Home sweet home! :)
Score: 24 Give a positive score

Re: Collision+

Postby Azou » Sat Oct 18, 2008 9:04 pm

Oh, Oh! :cry:
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Collision+

Postby Kalladdolf » Sun Oct 19, 2008 6:58 pm

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.
}
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Collision+

Postby Azou » Wed Oct 22, 2008 6:43 pm

Bless you!!
+1 :mrgreen:
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron