changing actor rules in game question.

part12studiospart12studios Member Posts: 620
edited November -1 in Working with GS (Mac)
I'm still very new to GS so how I'm doing this might not be right, but I'm trying to make it where an actor who's gravity is going down, flips around and goes up when a condition is met. I can't seem to find that option.

The way i'm approaching gravity is using the accelerator that points down (270). I try making a rule with an accelerator pointing the opposite direction (90) but it seems that there is a larger gravity element going on that overrides it. If i do a really extreme (10000) velocity i can get it to shoot up, but it's really not natural looking and i had bigger plans for this behavior

Thanks!
Caleb

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi Caleb, with Acceleration Behaviour used, you have to "override" it somehow. One way would be to add - directly above your Acc. Beh. pointing upwards, a copy of the one pointing downwards, with its Acceleration set to 0. There is still a pause here while the downward motion decellerates to the 0 before changing direction (though it's quite a pleasing effect).

    A slightly more "sophisticated" way would be to put an integer attribute (set to 270 inititially) into the Direction of the Accelerate Behavior, so when the attribute is changed to 90, it'll change direction; though I'm guessing it'll still have to slow down before changing - unchecked.

    A third way then: If you wanted a more immediate response, maybe try using the Change Velocity Behaviour instead. Changing it's direction, it will immediately change as you require.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • part12studiospart12studios Member Posts: 620
    yea that first approach is interesting. I went with the more sophisticated approach! i keep expecting it to be tricky to make it work, but you've pointed out some very informative and very elegant ways to approach these problems! Thanks a ton! I can now see how important defining custom attributes is.

    Thanks so much for your help with my questions. now to figure out how to auto populate things but i think i can look at some template games for some ideas there.

    Thanks!
    Caleb
Sign In or Register to comment.