This should work right?

So I have a game attribute called Map number. This goes up by 1 everytime I cross the actor with it. It goes up correctly.

I have another attribute in the individual actors called Current Map. Inside these actors I have a rule that says:
If self.CurrentMap < MapNumber
Then do some logic here and at the very end of all that logic is a Change Attribute that changes Current Map to Map Number.

Current Map starts at 0 in the actors and Map Number starts at 1. The very first time this happens it works correctly. I even have display attributes showing both these attributes. But after I cross over and Map Number goes up... it doesn't do the rule again. Shouldn't it call it again? The rule should become active again as soon as the player crosses over and the MapNumber increases by 1. Because both attributes are = to eachother at the end of the rule and once MapNumber goes above CurrentMap shouldn't it recall the rule again? Am I missing something, because I feel like I'm going crazy here.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hi @FallacyStudios I'm not understanding what you mean by your game attribute going up by 1 "everytime I cross the actor with it". Could you explain a bit more please?

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

  • FallacyStudiosFallacyStudios Member Posts: 970
    edited March 2013
    @gyroscope

    So the scene wraps X. If my character crosses the Cross Over actor it Changes Attribute of MapNumber to MapNumber+1. This works properly. Everytime I cross over it, it increases the MapNumber by 1.
  • iCreationZiCreationZ Member Posts: 158
    Can't you just have a rule inside this cross over actor that says:

    When I collide/overlap with actor of type, player
    --> change attribute: map number to map number +1
  • FallacyStudiosFallacyStudios Member Posts: 970
    @iCreationZ

    It does and is in the cross over actor. The problem is with the above. That my rule inside individual actors doesn't recall itself when this changes.

    "If self.CurrentMap < MapNumber
    Then do some logic here and at the very end of all that logic is a Change Attribute that changes Current Map to Map Number."

    Everytime the map goes up 1 that above should be recalled and it's this rule that resets each actor on the screen for me, but because it isn't recalling it, it doesn't reset.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    The way you've described it should work. You may need to post screenshots or a link to download your project file if it's not working properly.

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

  • FallacyStudiosFallacyStudios Member Posts: 970
    The first is the cross over actor. Which works fine and goes up as it should. Even have display attribute to make sure it is.

    The second is the building and the block of code that should tech repeat when Map goes up. The self.CurrentMap is at 0 to start. You can see at the very bottom that it becomes equal to Map after everything has finished resetting.

    In the display attributes the Map Number displays going up each time it is crossed over. The Current Map displayed on each individual character never goes up again after the first time this rule is called.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    While I don't see a problem in those screenshots, my guess is that either another rule or behavior is affecting the attributes or it's a question of timing. You may have to start stripping out (or turning off) rules to see what's causing it.

    Here's a barebones demo of what I think you're trying to achieve. You'll see that as the "line is crossed," the self.Map value increases each time.

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

  • FallacyStudiosFallacyStudios Member Posts: 970
    Thanks @tatiang. That is what is odd though. There are no other rules that touch either of those attributes and the demo you provided looks the exact same with less rules and such going on of course. I'll give the turning things off a try, or I guess maybe I'll just have to try another work around to see if something will finally work.
Sign In or Register to comment.