Can't change *animation* angle of a physics object?

For questions about using Classic.

Post » Mon Mar 03, 2008 5:37 am

Let's say I have a physics box with rotation turned off. when it's X velocity is less than -1, I want it to face left, and the opposite for right.
"Set angle" doesn't cut it here, any other ideas?

I know I could slap another sprite on top of it to handle the animations, but what if I want several instances of the same box? how do I attach an individual (but the same) "skin" to each of those boxes?
B
2
G
4
Posts: 44
Reputation: 1,138

Post » Tue Mar 04, 2008 5:44 am

To make the skin work with multiple objects you would basically do what I did below.

[quote:2axusa5m]+ On left mouse button clicked
- System: Create object box
- System: Create object skin
- box: set 'attach' to random(1000000)
- skin: set 'attach' to box.value('attach')

+ skin.value('attach') equal to box.value('attach')
- skin: set position to object 'box'[/quote:2axusa5m]

And that's basically all there is to it. Hope that helps. :) [/quote]
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Tue Mar 04, 2008 3:22 pm

Thanks! that doesn't work 100% on my end (due to it conflicting with other events), but it does give me an idea how to work it out.
B
2
G
4
Posts: 44
Reputation: 1,138


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests