External Forces (Wind for Example)?
If you want to have something act like a fan, blowing your character slightly off course when they cross its path, how would this be accomplished? This could also be a current in a river, as another example.
I'm thinking that there would be an invisible actor representing the path of the air but don't know what rules make it look like it's pushing on the actor. Is there a demo of something like this implemented?
Thanks.
Rich
I'm thinking that there would be an invisible actor representing the path of the air but don't know what rules make it look like it's pushing on the actor. Is there a demo of something like this implemented?
Thanks.
Rich
Best Answer
-
aario Posts: 256
when actor.1 overlaps/collides with wind.1-->move
then you can set the direction and the speed of the move equal to global attributes
you can go even further by having the wind actor change those global attributes when it comes in contact with your actor.1
-- For Example --
when wind.1 overlaps/collides with actor.1
-->change attribute wind.Direction to self.Rotation
-->change attribute wind.Speed to random(value.1,value.2)
Hope that helps,
aario
Answers
Thanks for the tips.
www.stormystudio.com … has a GS template for paperToss with a fan blowing
if you use a move behaviour inside the rule on your actor.1 it will only move while the actor is overlapping with the wind so you can change the size of the wind actor depending on where you want the effect to occur.
Im trying to create a wind effect too, could you help me?
I have an actor (A) going bottom up with an accelerate behavior (90 relative to scene direction and accelerate speed up to 10)
I want to make a wind effect going from right to left so I create an invisible actor (B) on A path and set up a rule on A saying -when A overlap B, "Move" to 180 (relative to scene) with 100 in speed.
The result is that my actor A just stop when it collides with B. I tryed to play with variable but it doesn't have any effect. Is there something wrong with what I did?
Thanks guys
http://gshelper.com/fan-effect-for-physics-game-gamesalad-tutorial/
Jamie
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page