Remember scene actor placement/location

KCDKCD Member Posts: 24
edited July 2012 in Working with GS (Mac)
I am working on football simulation. Once a player is tackled I need scene to remember the x-point and place the actors in the corresponding place.

For example once the play starts and the player(controlled actor) is tackled, I need the next play to start where he was tackled and all the actors (14) on the scene to go back to their placement relative to where the player was tackled.

Because of the design of the game I only need the x point to be remembered because it will always go to the y=0 point.

Some help on this would be appreciated.

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    When your player is tackled save it's X location to a Game Attribute and then use that Game Attribute when you re-set the players for the next round.

    Jamie
  • KCDKCD Member Posts: 24
    Do I need to add this to the actor or the scene. And because of i have a total of 14 actors on the scene will i need to do this for every actor

    Here is what I have so far:

    Save attribute:
    Actor Receives event-overlap or collide-actor with tag-defense
    save attribute - attribute:game.ballhandler x - key:tackle

    Load attribute:
    Actor Receives event-overlap or collide-actor with tag-defense
    Actor Receives event-overlap or collide-actor with tag-end zone
    Group - Timer: After 0.2 seconds - Reset scene
    Load attribute - key:tackle - Attribute:game.ballhandler x
  • KCDKCD Member Posts: 24
    I am still having trouble getting actors to move to the next place once a scene has ended. I tried looking at the GS Helper save location video but thats not exactly what i was looking to do
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    So when your offense collides with the defense or end zone, does game.ballhandler x get set to the correct value? How are you testing this (e.g. log debugging statements)?

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

  • KCDKCD Member Posts: 24
    nothing happens it just resets the scene but not at the point where the actor is tackled.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @kevinjcamps My question was what happens to the value of game.ballhandler x. Have you tracked that attribute with DisplayText or Log Debugging Statements? Feel free to post a link (or send me a message with a link) to your project file and I can take a look at your rules.

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

  • KCDKCD Member Posts: 24
    I linked a photo so you know exactly how many actors I am trying to move. I have set up a tag for the ballhandler that I will have switch with whoever has the ball. I need the location of the tackled actor with ballhandler tag to save and start the next play.

    http://www.flickr.com/photos/41921327@N05/7743227158/in/photostream/
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited August 2012
    Seeing a screenshot of your game doesn't give me any more information than I had before.

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

Sign In or Register to comment.