Time based items on a scene
DaGreatness
Member Posts: 82
So I am working on a game, and what I am trying to accomplish is, when my actor enters a scene and waits 30 seconds he is granted certain amounts of coins for entering that scene (room) is there a way to set this up? Or better yet, if he clicks on an item and waits he gets granted the certain amount if coins after 30 seconds, but he has to stay there, because if he moves I don't want him to get the coins, he needs to stay on that scene (room) for that many seconds if he exits it before he doesn't get the coins if he stays 30sec or more he gets the coins
Is this possible to do?
Is this possible to do?
Comments
(This is the item that is being pressed or actor button whatever)
If touch is pressed
Do
Save x.position to attribute of player (which is a real attribute labeled oldX)
Set timer after 30 seconds
Are these 2 rules?
Where is this rule setup? Still on that same certain item? Or somewhere else?
If self.position.x = self.oldX
Change attribute game.coins to game.coins +15
Will this only give the coins after 30 seconds if the person stayed there or will this give it after 30 seconds once they touched it and leave? Because I need them to stay once they click
I just trying to clear up the air before I try it.
Thanks in advance
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User