help.. interfere between two roles

arabianwolfarabianwolf Member, PRO Posts: 79
edited February 2013 in Working with GS (Mac)
hi
i have two roles , first one if all enemy actors = 0 current scene go to next scene
second role if time up and reach 0 level faild
but i have interere between these two roles --- when all enemy actors =0 player cant go to next scene and stay till time up and level faild

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    In GameSalad, statements that hold conditions are called rules, not roles. What are your rules for counting the number of enemy actors? And what is your rule for changing the scene? The way you described it gives me very little idea about how you have it set up. It's best to type the rule EXACTLY as it is in the actor or if possible, provide a screenshot.

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

  • PaxPaxPaxPax Member Posts: 106
    Here is a flyer---not sure I understand the question as @tatiang says as well. Could it be your rule says 'all' instead of 'any'. If you only want one of the two conditions/attributes to be met, score or time, than you should use 'any' not 'all.' Cheers
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2013

    Hi arabianwolf As @tatiang & @PaxPax implied, more info as to your Rules at present would help.... (doesn't seem like you need any Interpolate behaviors either in this case, as far as I can tell...)

    Still, try putting one of the rules in the otherwise section, see if that works out or you:

    When all enemy actors = 0
    Change scene go to next scene
    Otherwise
    When time up and reach 0 level failed
    Change scene same scene

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • arabianwolfarabianwolf Member, PRO Posts: 79
    thank gyroscope
    i will try to do that
    @tatiang & @PaxPax .... lol sorry but english not my first language
    I will be careful next time to selecting the correct words
  • arabianwolfarabianwolf Member, PRO Posts: 79
    this my rules what wrong with it plz

    timer
    after 0.1 second run to completion is ticked
    rule
    if game.enemy actors = 0

    do

    change scene
    go to level 2

    else
    rule
    scene.gmae timer = 0

    do

    goto level failed A
  • arabianwolfarabianwolf Member, PRO Posts: 79
    if any one can check what wrong with my rules ?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    What are your rules for counting the number of enemy actors?
    You must have a rule that says If [some condition] do change attribute game.enemy actors to game.enemy actors+1. What does that rule look like?

    You shouldn't need a timer at all.

    The other thing to do is to have an actor with DisplayText set to game.enemy actors and place it on the scene. Then watch what happens to that value. You may be surprised to see that it's not what you think it should be.

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

  • arabianwolfarabianwolf Member, PRO Posts: 79
    edited February 2013
    tatinag
    you surprise me , yes the wrong was in rule that contain ...... actors+1
    yesterday i decided to check all my behavior in my project
    and i found the mistake on that rule
    now it working fine
    silly mistake cause big headaches
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Hooray! We've all made silly mistakes. ;)

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

Sign In or Register to comment.