Actor goes faster and faster
EpicoreGames
Member Posts: 188
I set my game like this
I set it to change attribute self.position.X to random(30.25,533.672)
and another change attribute self.position.Y to 353.965
when self.HP = 0
i set when the actor is being pressed , change attribute self.HP to 0 and so calls the change attribute function
but it keeps going faster and faster when i clicked on it ( and it comes down from top and that's what i want ) just the speed is keep increasing per time and i didn't set anything on its acceleration i mean , i did not set anything to change the acceleration so why it is going faster ?
Comments
The changing of position does not affect the speed of an actor. So what you are seeing is something like a wormhole or like in Portal. Speed going in at one side of the portal is the same as when it comes out at a different location.
If you want to reset when HP=0, you need to reset the speed too. A Change Velocity behavior to 0 speed will work, or you can use 2 Change Attribute behaviors to modify the X/Y velocities.
Speedy thing goes in...speedy thing comes out.
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
oh god..... every time i got solution fixing one thing and another error pop out arghh...
now i don't know what behaviors have i accidentally deleted or what, it just lets me click 1 time , and the next time it comes down , i can't click on it ....
i got this error before and i fixed it but now i don't know why it occurs again...
I recommend uploading your project file to a file sharing site such as Dropbox or MediaFire and then posting the download link here. That way we can see your rules and how your scene functions.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
The random function produces an integer, there's no point putting decimal points into the high and low range values as they will be ignored.
hi all , i got another problem here .
when my actor comes down , i click on it so it goes back to top and comes down again , but this time i can't click on it !
What behavior should i add to let it enables me to click on it every time it comes down?
Use a Rule with a condition that reads When Touch Is Pressed, then do your actions...
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I'm going to repeat what I said here:
You'll need to provide more details than just "actor comes down... can't click on it." Type out the rules you're using or paste a link to a screenshot you've uploaded to a file-sharing site or at least be more descriptive.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
lol why do you keep staring at me movement? go checkout other user's post :disagree:
i set my actor to comes down and when i click on it , i want it to come down again and it did work.
However, when it comes down for the second time , i can't click on it
here's the pictures
http://postimg.org/image/a4biurb0f/
http://postimg.org/image/bfut725bl/
He's trying to help you out - that's what these forums are for - and his point is valid, if all the information you supply is 'i can't click on it' then you are making the job of helping you sort the issue out very very difficult.
Okay i am really sorry . So I had made a new post with pictures in it . Could you help me out with it ?
/merged
Please don't keep creating new threads for the same issue. Simply add a new post to the existing thread.
Why are all of your attributes blank? For example, in the When Touch is Pressed rule, you're changing an attribute to 0. Which attribute is that? Use a Log Debugging Statement to make sure that rule is actually firing. Also, try deleting that actor from the scene and re-adding it. Does that make it work?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
that may be a bug or what . But it did contain attributes. I'll try take another picture again
hi guys . here are the new pictures with attributes . please help me for the problem i faced as mentioned before.
1.http://postimg.org/image/g9y8bppej/
2.http://postimg.org/image/b4hzvotev/
..
When you click on the actor, it resets its position but it continues to accelerate because that's the behavior you gave it. It doesn't somehow know to stop accelerating when it resets position. If you want it to slow down or not pass a certain speed, you have to program that in.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
But the problem is it just let me click on it one time . The second time it comes down I can't click on it and the later behavior could not execute .
Does this happen if you create a new, blank scene and add the actor to it?
Post a link to download your project file (.zip it first).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Is there a reason you have three copies of the Ball_2 actor on the scene? You can see that by going to Scene-->Layers-->Background.
Regardless, your When Touch is Pressed rule is working just fine. It changes self.HP to 0 both times you click it. The problem is that once self.HP is set to 0, it triggers the rule, but the second time you set self.HP to 0 it's already zero so it doesn't trigger the rule again. Rules only trigger when their condition changes from false to true, not when it remains the same (true to true).
To fix this, have one rule that says When Touch is Pressed and self.HP=1 and have another rule that says When Touch is Pressed and self.HP=0.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thank you all for helping . The problems have been solved