Need assistance with creating creating "static" actors..

Shrek2k12Shrek2k12 Member Posts: 2
edited July 2012 in Working with GS (Mac)
Hi Everyone,

Can anybody in here help me with creating static actors and the rules required for free ranging movement aka "touch and drag". I'm new to GameSalad and the whole "creating apps" thing and I'm trying my hand at creating something with one of my friends. I'm having trouble finding information on this.

Best Answers

  • master200012master200012 Posts: 372
    Accepted Answer
    Easy!

    Create a rule. When touch is inside...

    In the rule put in two constrain attribute behaviors.

    In the first, constrain "self.position.x" to "(devices) mouse.position.x"

    In the second, constrain "self.position.y" to "(devices) mouse.position.x"

    And that's it!
  • ericzingelerericzingeler Posts: 334
    Accepted Answer
    Easy!

    Create a rule. When touch is inside...

    In the rule put in two constrain attribute behaviors.

    In the first, constrain "self.position.x" to "(devices) mouse.position.x"

    In the second, constrain "self.position.y" to "(devices) mouse.position.x"

    And that's it!
    This is good, but you may want to use the Devices > Touches > Touch 1 > X & Y attributes instead of mouse. Using touch instead of mouse will allow for multi-touch functionality. GS will allow up to 11 different touches at once.

Answers

  • Shrek2k12Shrek2k12 Member Posts: 2
    Thanks for the help guys.. worked a treat :)

    Now I need to figure out the collision rule as my main "actor" likes to go under all the other actors and collect them along the way.. a tad annoying lol
  • ginny32ginny32 Member Posts: 1
    it would have something to do with a collision attribute not sure of the exact rule though if someone could help out there it would be helpful :)

    something like when actor X collides with actors x x x x x then ........

    not sure what goes in that end space there :)
  • MotherHooseMotherHoose Member Posts: 2,456
    you need to learn about layering …
    in the Game Salad Manual … searchField: Layers

    quick fix: rightMouseClick on the actor in the sceneEditor
    select from the dropDown list: Send To Front

    image MH
Sign In or Register to comment.