Problem with gravity and move

patapplepatapple Member Posts: 873
edited May 2012 in Working with GS (Mac)
hi everyone,

i'm working on a new game but i have the scene gravity Y set to 200 and i have an actor is moving on the x axis, but if I turn off the move behavior the actor fall down (affected by gravity) and if i turn on it doesn't work, it only move right. why?

i know it'a stupid question, but i never created a game like that. :)

thanks :)

Best Answer

Answers

  • patapplepatapple Member Posts: 873
    it doesn't work. I insert the accelerate behavior to down and a move behavior to the right. but it doesn't work.

    Any idea?

    here is a screenshot of my rules.
    image
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Just play with the settings. Try different acceleration values.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    The move behavior will override gravity.

    Use change velocity or change its self motion linear x attribute.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    It should work fine. I just tested these rules and I could move along the "ground" actor:

    image

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited May 2012
    @tatiang

    Nope, thats because your moving along a ground actor. Add a jump button to it then jump and move and watch what happens. Move behavior will over ride gravity. Thats how the move behavior works, i talked to the gs guys a long time ago about this.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Right, I would use change velocity instead of Move, but the rules did work for simple movement. You're right about jumping.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • patapplepatapple Member Posts: 873
    Now i change the move behavior with a change velocity and it works. Now i create a button and a jump attribute, but what behavior can i use?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    to jump change attribute self motion linear y to 400 (you can change the 400 to whatever you want to adjust the jump height)
  • patapplepatapple Member Posts: 873
    Thanks a lot!!!
  • patapplepatapple Member Posts: 873
    sorry but i now i would like to change the game system. Now i have my main character stationary, and the ground is moving to the left (to simulate the run). I would like to add the gravity to do the main character collide the ground but here are my problems:
    1) if i try to add the scene gravity the ground fall but i can't uncheck the movable box
    2) if i try to add an accelerate behavior to the main character it push down the ground.

    I hope you can understand my bad english... :(
  • simo103simo103 Member, PRO Posts: 1,331
    edited May 2012
    @patapple .. can you turn moveable off on the ground and interpolate its movement? If not you may have to set its rotate off, constrain its Y position to what you want and I would throw 10000 in it's density for good measure.
Sign In or Register to comment.