Strange behavior - rules disappear in play

BrackAttackBrackAttack Member Posts: 22
edited January 2012 in Working with GS (Mac)
I have a set of rules applied to an actor's movement; works great. In anticipation for a second set of rules for the same actor, I made a button that toggles an action.attribute on/off. The plan was to make an actor switch behaviors with a button push. The problem is, when I toggle the behavior, the actor passes through walls, or floats off. The only change I made was to put the rules into a 'group' and assign a rule that selects that group when action.attribute is toggled on. Very strange. Any idea or suggestions?

Comments

  • CloudsClouds Member Posts: 1,599
    "Any idea or suggestions?"

    I think it's probably the way you've got the second timer kicking in before it applies the interpolate behaviour, either that or the actual attribute itself is an integer when it should be a 'real' attribute.

    I do palm reading on Fridays too.

    ;)
  • BrackAttackBrackAttack Member Posts: 22
    edited January 2012
    No timer, but the Game attribute I set up is an integer. The reason I made it an integer is because I actually anticipate to have 3 rule-sets for my main actor. My Game attribute is designed to be either 1, 2, or 3. The button I made then toggles the attribute value between 1, 2, and 3. The main actor would then behave differently depending on that value. And like I said, the first rule-set was working great, until I put that rule-set into a group nested under a new rule that activated that group if Game attribute = 1. Theoretically, when I toggle the button value to 2 or 3 (not yet programed) the main actor should just not move, until i toggle back to value 1, then the actor should move again. Actually, in preview mode, this DOES function as expect - except instead of not moving: the actor will float in the direction it was last moving and pass through the scene boundaries.
  • CloudsClouds Member Posts: 1,599
    edited January 2012
    @BrackAttack

    "No timer, but the Game attribute I set up is an integer . . . . . "

    Whoops, sorry! I didn't think you'd take my post seriously (that's what the "I do palm reading on Fridays too." and the ;) winking smiley was for).

    My point was that unless you tell people what's going on in your rules then the best anyone can do is make random guesses (or more likely ignore the question), of course I have no clue whether you are using a timer or an Integer attribute, or in fact anything about your rules at all.

    8-X

    The real answer is that it could be any number of things from a single behaviour simply being left switched off to an erroneous minus symbol left in an expression, who knows ?
  • BrackAttackBrackAttack Member Posts: 22
    edited January 2012
    Ahhh, I see. Okay.

    Well then, assuming my code is correct...Is there any reason a set of rules/behaviors would stop working because it is nested inside a "group" container?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    If you've switched the rules off and forgot? ;-)

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

  • CloudsClouds Member Posts: 1,599
    @BrackAttack
    "Well then, assuming my code is correct...Is there any reason a set of rules/behaviors would stop working because it is nested inside a "group" container?"

    I doubt it.

    @gyroscope
    "If you've switched the rules off and forgot? "

    :ar! 8-X :))
  • BrackAttackBrackAttack Member Posts: 22
    I think I have determined what was happening. When I switch off the rule-sets for my actor all at once, there remains some residual momentum/velocity, the actor then "floats" away and passes through walls. How do I prevent this unintended physics? thx.
Sign In or Register to comment.