How do I have a sprite follow a pre programmed motion?

Get help using Construct 2

Post » Mon Nov 03, 2014 11:21 pm

id just like an event that moves a sprint in a pre determined movement. Best way?

thanks!!
Dan
B
8
S
3
G
1
Posts: 87
Reputation: 1,493

Post » Tue Nov 04, 2014 12:51 am

You should be a little more clear about what you want. Do you mean an animation based type of movement?
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Tue Nov 04, 2014 1:36 am

Set up your pre programmed motion as functions that return values for x and y coordinates. Then set your sprite x and y to those coordinates every tick.
For example, for a simple movement in diagonal left to right:
Every tick: set sprite.X to self.X+1
Every tick set sprite.Y to self.Y+1
B
29
S
10
G
10
Posts: 97
Reputation: 6,614

Post » Tue Nov 04, 2014 8:45 am

Not much to go on Please explain
B
257
S
42
G
15
Posts: 1,992
Reputation: 41,425

Post » Tue Nov 04, 2014 8:52 am

Maybe with this plugin ? viewtopic.php?t=67833&start=0
B
12
S
7
G
7
Posts: 450
Reputation: 4,276


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests