Risk type game - newbie questions

KC_GamesKC_Games Member, PRO Posts: 86
edited April 2013 in Working with GS (Mac)
Newbie here. I'm trying to make a Risk type game where hexagons of a certain color can attack other hexagons of a different color. For example, let's say I have 2 color hexagons on a map. I want it so when the user touches a red hexagon, only black hexagons that are touching that red hexagon change their alpha to 50% to indicate to the user which areas he can move and attack. The user touches a black hexagon to attack then a dice roll determines if that red hexagon takes the place of the black hexagon. Eventually whoever takes over the entire board wins the game. Here is a screenshot of what I have so far (not much):
https://www.dropbox.com/s/hm5o4z9yllml1ub/ff.png

1) How do I change the attribute of another actor? (Change attribute behavior only lists "self" and not the other actors. I go into the red hexagon and try to add a rule that when the black hexagon touches it, the black hexagon should change alpha, but the Change attribute does not come up as an option to change)

2) Is it possible to swap actors in GameSalad? (If red takes over black or vice versa, I need to swap actors)

If anyone responds, thank you in advance!

:)

Comments

  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    1) Just create a game attribute, then constrain the game attribute in one actor to that actor's attribute. Then, just change that game attribute wherever you need to.
    2) Switching actors is probably not the best thing to do in this situation. But yes, it is possible. I'd suggest you just have all of the hexagons and change things inside of them, with no switching. ;)

    Hope that helps,
    - Thomas
  • 3itg3itg Member, PRO Posts: 382
    Ok, I'll start off with a warning.
    A risk type game will not be easy.

    Now, I can offer some tips that should get you on the right track.

    add a boolean to the actor, Name the boolean RED.
    make a rule.
    When RED = 1
    _
    (Do Behaviors for Red Team here)
    _
    open the otherwise area.
    (Do Behaviors for Black Team Here)
    _

    Outside of that rule you can code the behaviors that they always follow, whatever team they are on.

    If you are trying to change an actors color, it has to be done from within the actor itself.
    You could make conditions for it to happen, but you cannot directly access those attributes outside the actor.
    Dont swap Actors, just change stats and have your actors respond.

    You can use game variables or data in tables from within the actors to track information that other actors need to see.

  • KC_GamesKC_Games Member, PRO Posts: 86
    Hi Thomas, thanks for your quick reply. I'm sorry, but not following about creating a game attribute and constraining it. What kind of attribute, a boolean?
Sign In or Register to comment.