Page 1 of 1

how to change the xvelocity on my actor

PostPosted: Sat Oct 22, 2011 4:20 am
by raminkhan
Ok, I got a ball rolling in x-direction after I hit it I want it to increase its speed than usual how?

Re: how to change the xvelocity on my actor

PostPosted: Sat Oct 22, 2011 5:12 am
by skydereign
I assume you have something moving with xvelocity. In the collision event (or whatever you mean by hit) just increase the xvelocity, for instance:
ball -> Collision with Actor (repeat disabled) -> Script Editor
Code: Select all
xvelocity*=2;

Re: how to change the xvelocity on my actor

PostPosted: Sat Oct 22, 2011 11:27 am
by Wertyboy
Skyde, can you tell me what does "*" do?

Re: how to change the xvelocity on my actor

PostPosted: Sat Oct 22, 2011 11:35 am
by lcl
* means multiplication :D

And when you write xvelocity *= 2 it means the same as xvelocity = xvelocity * 2