As I get my actor skip from one place to another

How can I make my actor who walks into a building skip to another that has the side walk and also an example

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Why not just buy the template that is for sale from the video you posted?

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

  • IceboxIcebox Member Posts: 1,485

    @SoAGAMES you only need 2 rules and a collide behavior , here is step by step:

    1) make an integer self attribute call it jump

    2) add a collide behavior with walls

    3) You will create a switch whenever the mouse button is down so when the screen is pressed it will change the self.jump integer that we created to either 1 or 0.

      create a **_Rule_**
    

    - when actor receives event mouse button is down
    change attribute self.jump to mod((self.jump+1),2)

    4) Now that the self.jump changes to 1 or 0 whenever the screen is touched , you can easily say that when the jump is = 1 go right and when jump is = 0 go left.

      create a **_Rule_**
    

    - when self.jump = 1
    change attribute Self.Motion.LinearVelocity.X to 300
    otherwise
    change attribute Self.Motion.LinearVelocity.X to -300

    make sure you turn the bounciness to 0

    thats it , hope it helps and good luck :)

  • SoAGAMESSoAGAMES Member Posts: 81

    @Icebox1910 said:

    >

    Thank you very much, but I have another doubt if i put another building as if it will try to do the same, but it could jump three times

  • SoAGAMESSoAGAMES Member Posts: 81
    edited June 2015

    example

Sign In or Register to comment.