Hello i was wondering if there was a way to trigger something when a variable increases by a certain amount. e.g. If X increases by 8 Increase Y by 1. If there is any simple way to do this please let me know.
Thanks
WabbaHarry
Offline
WabbaHarry wrote:
Hello i was wondering if there was a way to trigger something when a variable increases by a certain amount. e.g. If X increases by 8 Increase Y by 1. If there is any simple way to do this please let me know.
Thanks
WabbaHarry
Yes, there is.
Here is an example:
if <(life)> [0]= // if life is zero broadcast [game over v]//send a message to all the sprites saying game overI hope this helps!
Last edited by joshuaho (2013-05-02 11:58:13)
Offline
Sorry it didnt really help I wanted something like
If (X) is increased by [8] increase Y by 1
Offline
The only reason I want this is so that i can have a scrolling game where you can place(using clones) however i need the Current X to change by 1 when Scroll X changes by 8
Offline
WabbaHarry wrote:
Sorry it didnt really help I wanted something like
If (X) is increased by [8] increase Y by 1
You mean this?
if <(x)> = [1] change [x] by (1)
Last edited by joshuaho (2013-05-02 16:14:56)
Offline
joshuaho wrote:
WabbaHarry wrote:
Sorry it didnt really help I wanted something like
If (X) is increased by [8] increase Y by 1You mean this?
if <(x) = [1]> change [x v] by (1) end
No. He means that if a script just altered Scroll X to be 8 bigger, then Current X should change by 1. That, or every interval of 8 in (Scroll X), (Current X) should be increased.
To WabbaHarry:
Well, I just thought that I might not be understanding you as much as possible. So, do you want (Current X) to change by 1 if (Scroll X) got changed by 4, and then by 5?
With regards,
ErnieParke
Last edited by ErnieParke (2013-05-02 16:37:26)
Offline
ErnieParke wrote:
joshuaho wrote:
WabbaHarry wrote:
Sorry it didnt really help I wanted something like
If (X) is increased by [8] increase Y by 1You mean this?
if <(x) = [1]> change [x v] by (1) endNo. He means that if a script just altered Scroll X to be 8 bigger, then Current X should change by 1. That, or every interval of 8 in (Scroll X), (Current X) should be increased.
With regards,
ErnieParke
Oh well, I can't help him if I don't know much about what he wants. Sorry.
Offline
ErnieParke wrote:
That, or every interval of 8 in (Scroll X), (Current X) should be increased.
That is What I would like to do if it is possible to do so if you could help.
Thanks
Offline
WabbaHarry wrote:
ErnieParke wrote:
That, or every interval of 8 in (Scroll X), (Current X) should be increased.
That is What I would like to do if it is possible to do so if you could help.
Thanks
Well then just use this little script:
set [Current X v] to (round ((Scroll X) / (8)))
Offline
Wow *FACEPALM* how did i not think of that. Herp de derp. Yeah the only reason i wanted this is so i could make a scrolling building game. Thanks Guys Ill Try this and ask again if it no work.
Offline
Ok This didn't do what i was looking for but thanks for the help as i now know how to make this. I'll Post a new thread on what i need to do completely.
Offline