Where is the Best Attributes for Move Actor with Button?

venon_itvenon_it Member, PRO Posts: 594
edited November -1 in Working with GS (Mac)
Hi,
in my game i have two button for move my actor, Button Left & Button Right , and this button move my actor, for move this, i insert BOLEAN Attributes... Is that right? or I use Attributes INTEGER?

Thanks

Comments

  • venon_itvenon_it Member, PRO Posts: 594
    nothing?
  • VoidedSkyVoidedSky Member Posts: 1,095
    Hi, I just did this in my game! Create two attributes, left and right (booleans) then do not check them.
    Go to your left actor and create a
    Rule: when actor receives event, touch, is pressed- then change attribute left to true.
    Create another
    Rule in the same actor under this one:
    Rule: When actor receives event, touch, is RELEASED,- then change left attribute to false. Then you do the same in the right actor.

    Now Open your player.
    Rule: When attribute "Left" is true then accelerate towards 180.
    Rule: When attribute "Right" is true then accelerate towards 180.

    That should be all, comment if it doesn't work
    ~CowTechMan
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Instead of touch is released you could also just use the otherwise section of each rule
  • venon_itvenon_it Member, PRO Posts: 594
    perfect, I wanted a confirmation, if using booleans or integer

    i use booleans
Sign In or Register to comment.