Falling objects
Grolarbear
Member Posts: 50
I am making a platformer game in which I want a spike to fall from the ceiling. I have gravity already set so that when it is placed on the scene it falls instantly. I set it to non movable and have a timer set that after 2 seconds it will become movable, but it stays non movable. Any help?
Comments
maybe an actor that spawn the spikes?
My apps in Appstore
The Adventure of Stario : https://itunes.apple.com/us/app/the-adventure-of-stario/id866628626?l=nl&ls=1&mt=8
Fruit Catcher - Catch 'em all : https://itunes.apple.com/us/app/fruit-catcher-catch-em-all/id888480619?l=nl&ls=1&mt=8
Hi Hello,
I just did my own quick test, and it doesn't work. Even if you have an actor with a rule to change moveable to false. It still falls with gravity. Maybe something wrong with GS on that one.
A way around:
If your game doesn't rely too much on gravity, everything that you want to be affected by gravity can contain an acceleration behaviour, set to 270 (direction) at a speed of 750 or what ever strength your gravity should be. This gives you more control as to when an actor should be affected by the gravity.
Then in your spike actor, have a timer (after 2 seconds )
Hope that helps a bit
If you turn off gravity and set acceleration downward would you still have to add it to enemies and any object that moves? @codece
By disabling gravity you have disabled acceleration downward on all the objects. You just now want to make a rule that if an attribute/rule happens accelerate down. Also make sure you set it to accelerate according to scene. Also you need to apply this acceleration on all the charectors that use gravity. One thing more you need to set non-movable items to non-movable option.
Current Projects I am working on: Stupid Duck, Zango's Shark Adventure, AoD: Age of Dragons, Rocket Jump: The Pixel Invaders
Facebook: https://facebook.com/reflectivebytegamestudios
Web: reflectivebyte.com
You can not change the physic's settings at runtime this also includes some other settings like visible, etc. Use Constrain Attribute on its self.PositionX and Y to hold it for two seconds.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template