Hi there!
I am a Game Development student who is currently making a game for an assignment. I was wondering if anyone knew how to subtract gold when a character takes a step?
There is a script function that can get the steps. You can put this value into a variable and when it goes up by one subtract 1 gold then set the variable to 0 and set the steps to 0 and repeat? Not sure if that's a good way or not.
Go to >Control Variable >Game Data >Other >Steps
Let's say you chose variable 1.
Var 1 = Step Count
If Var 1 > 0, (u can replace this with Var 1 >= 1)
change gold: -1
Var 1 = 0
end
If you want it to happen throughout the whole game, just make it a parallel process common event. You set a switch to trigger it and you have it trigger from an parallel proccess event on the map the player starts in. Event page should look something like..
control switch [switch ID of trigger]
erase event
Hope this helps, and good luck on your assignment. Sorry if I was too late on answering, had to update my PC.
right, but when is this check going to be done?
I take a step, var 1 = step count.
Var 1 is now whatever the step count is.
Var 1 is greater than 0 so take a gold away and set var 1 to zero.
rinse repeat
Var 1 = step count
blah blah
So this can't be done in a parallel process because it will continue to run the gold down.
This is how I interpreted the request from the OP.