This should work right?
FallacyStudios
Member Posts: 970
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.
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
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
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.
When I collide/overlap with actor of type, player
--> change attribute: map number to map number +1
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.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
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.
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