Constrain Attribute then get it back HELP
BonepileGames
Member Posts: 194
Hello to GS Community,
I have been banging my head for 2 days on a feature which I want to implement in my project but I can't seem to find a solution.
I have a total of 3 actors. The first one has the DISPLAY TEXT attribue . It displays a game.attribute. This game.attribute changes to let's say 15 (because of rules and etc which are not so imporant). When the touch is INSIDE second actor it constrains game.attribute to game.attribute+1. The third actor is the same as second but constrains game.attribute to game.attribute-1. The issue is that I want when the touch is released to change game.attribute to ITS INITIAL number. game.attribute changes its number not to 15 every time but to random number every 5 seconds lets say. The question is how I can change it back to its initial number.
Thank you
I have been banging my head for 2 days on a feature which I want to implement in my project but I can't seem to find a solution.
I have a total of 3 actors. The first one has the DISPLAY TEXT attribue . It displays a game.attribute. This game.attribute changes to let's say 15 (because of rules and etc which are not so imporant). When the touch is INSIDE second actor it constrains game.attribute to game.attribute+1. The third actor is the same as second but constrains game.attribute to game.attribute-1. The issue is that I want when the touch is released to change game.attribute to ITS INITIAL number. game.attribute changes its number not to 15 every time but to random number every 5 seconds lets say. The question is how I can change it back to its initial number.
Thank you
Comments
When Touch is Inside
change attribute game.originalValue to game.attribute
Timer every 0.1 seconds
Change game.attribute to game.attribute+1 (or -1)
Otherwise
change game.attribute to game.originalValue
Timer every 5 seconds
change game.attribute to random(1,30)
Obviously, you can alter the frequency of the timer and the random value range to your liking.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thank you for your answer but I am afraid I couldnt express properly my situation.
The issue is connected with my project which we discussed early on. You said that I should look for solution myself or hire someone to fix it up. Thus I am quite unsure if you would like to volunteer in helping me.
I guess what I'm saying is there's a difference between asking, "How do I get my platforms to move at the correct speed based on multiple rule conditions, a spawner actor, and various changes to the velocity of these actors, all the while taking into account how other actors affect this system?" and asking "How do I reset an attribute value once touch is released?" The first might take me 2 hours. The second might take me 2 minutes, so I'm happy to answer that type of question.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I will be able to upload the project. If you got free time, you might give it a shot.
More details tomorrow.
I got my problem fixed. Can I send you my project just to check something? I cant seem to find my mistake.