Need help (object movement)

For questions about using Classic.

Post » Wed Dec 07, 2011 3:32 am

Hi! Sorry Im a noob in CC, I cant understand this..
With the event Construct system how to make an object stick other object?
For example of what im trying to make...
We have a moving wagon sprite top-down view
Wagon is moving
And we have a Human sprite
The Human can walk inside the wagon while it is moving.
I was searching a lot, but I cant make this happen in construct...
HOW? plz help

Here is a picture of what im trying to do:
B
2
G
3
Posts: 9
Reputation: 893

Post » Wed Dec 07, 2011 3:43 am

I just need an instruction of how to construct this out of conditions and actions, what r the behaves of sprites and other properties
B
2
G
3
Posts: 9
Reputation: 893

Post » Wed Dec 07, 2011 6:29 pm

Give the wagon two variables "oldx" and "oldy", then the events are as follows:

+ System: Start of layout
-> wagon: Set 'oldx' to .X
-> wagon: Set 'oldy' to .Y

+ Sprite: Sprite overlaps wagon
-> Sprite: Set position to .X+wagon.X-wagon('oldx'), .Y+wagon.Y-wagon('oldy')

+ System: Always (every tick)
-> wagon: Set 'oldx' to .X
-> wagon: Set 'oldy' to .Y
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Thu Dec 08, 2011 2:35 am

hm... doesn't seem to work
look
http://www.mediafire.com/?e29lrbm0mqf6ii3
B
2
G
3
Posts: 9
Reputation: 893

Post » Thu Dec 08, 2011 2:36 am

it just goes through the moving "wagon"
B
2
G
3
Posts: 9
Reputation: 893

Post » Thu Dec 08, 2011 11:56 am

It works if you put your events in the same order as it is in my post. Events are evaluated from the top down.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Thu Dec 08, 2011 5:17 pm

tnx))))) works now)
I thought that it was impossible...
Developer should make this more automatic in construct I think...
This is an extreme useful tool
B
2
G
3
Posts: 9
Reputation: 893


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests