A love confession and questions about physics

For questions about using Classic.

Post » Mon Mar 09, 2009 11:54 am

First of all, hello, i'm new to this forum.
Second, thank you for a beautiful program. I'm a long time Multimedia Fusion user and Construct seems to have everything that MMF is missing, and more. I've been completely blown away by this program ever since i first started it up. Everything is just so... smart :D
It's so nice to see that you actually have an understanding of games (insert long rant with bashing of Clickteam here).

Ahhh..
Anyway, I have a few questions about the physics behaviour:
Is it possible to somehow toggle the Immovable option during runtime?
Is there a way to delete a hinge?

If not, could someone perhaps tell me how to emulate this? What I'm trying to do is have static objects placed around the playfield and when a certain event occurs, apply physics to them.

edit: I thought I had figured something out by adding another physics behaviour, but there doesn't seem to be a way to toggle behaviours on/off?
B
5
S
1
G
3
Posts: 24
Reputation: 1,123

Post » Mon Mar 09, 2009 7:29 pm

Welcome :)

Right now there is no way to remove a hinge or set the Immovable attribute at runtime, I'm afraid. But they are worthy additions so you could request them as features.

[quote="gugugu":29s4p756]If not, could someone perhaps tell me how to emulate this? What I'm trying to do is have static objects placed around the playfield and when a certain event occurs, apply physics to them.[/quote:29s4p756]

Could you perhaps be more specific in what you're trying to do? What sort of static objects? What sort of physics are you applying? Are you dealing with gravity? Do you just not want certain things to move until told, or do you want everything freezing/moving in unison?
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Mar 09, 2009 8:05 pm

[quote="gugugu":1iu9dh8b]
Anyway, I have a few questions about the physics behaviour:
Is it possible to somehow toggle the Immovable option during runtime?
[/quote:1iu9dh8b]No
[quote="gugugu":1iu9dh8b]If not, could someone perhaps tell me how to emulate this? What I'm trying to do is have static objects placed around the playfield and when a certain event occurs, apply physics to them.[/quote:1iu9dh8b]Just disable Gravity and set Mass to 999999999 and nothing will move it.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Thu Mar 12, 2009 11:20 am

[quote:891emlar]Just disable Gravity and set Mass to 999999999 and nothing will move it.[/quote:891emlar]
I think this would work, though right now, the action for changing mass at runtime seems to be buggy and won't do anything.

[quote:891emlar]Could you perhaps be more specific in what you're trying to do? What sort of static objects? What sort of physics are you applying? Are you dealing with gravity? Do you just not want certain things to move until told, or do you want everything freezing/moving in unison?[/quote:891emlar]
I want certain objects to be completely fixed, like a solid background tile, and when told to, start to move (gravity and all).

I guess I'll put this little project on hold until the physics behavior is closer to completion :)
B
5
S
1
G
3
Posts: 24
Reputation: 1,123

Post » Thu Mar 12, 2009 3:56 pm

you can do both by replacing the object with one that looks the same
and destroying the original in the same event
copy the x and y coordinates
copy the angle
and if it's a hinge you should copy the angular velocity also
so the movement stays natural
I can post a cap if you cant get it to work
Ive done this before, so it definitely works
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Thu Mar 12, 2009 6:47 pm

click to change in each one. of course they didn't have to look different than the originals, but it illustrates that it's a new object at that point

TileToGravity:


Unhinge:


if you find the animation of the unhinging to be a little awkward, it's because the center of gravity is instantly switched. it's possible to get around that. this may be accurate enough for your purposes though
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat Mar 14, 2009 9:31 am

that seems to do the trick, thanks!
B
5
S
1
G
3
Posts: 24
Reputation: 1,123


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests