I’m working on a nifty project in GS1 (you’ll have a peak at it soon).
I wanted to know how to move an object (image) multiple times using player’s chat.
Like so…
if (playerenters) {
setimg block.png;
x=36;
y=6;
}
if (playerchats && strequals(#c,/moveleft)) {
x=37;
y=6;
}
This works great, but it doesn’t loop, so it only moves the block once.
How could I get it to move the block multiple times.
I could add that after the conditional statement without the need of a for loop? Say x += 1 to drag the block to the right? Or would it only work once like previously?
(I would try it myself but I just left home, sorry for the questions…)
You don’t need any sleeps if you intend for movement to occur one time each time a command is issued by the player.
Sleeps were also something people back in the day always said to avoid using. I’m not sure why or if there is a valid reason for it. It may prevent other “events” from being triggered on the script for the duration of the sleep or something. I don’t know. (This is part of why using the Graal client sucks.)