Fangames > Programming Questions
HELP
ethinthenougathorn:
I am working on a very cruel "game" experiment, but i need coding help....if i get the help, i will not publish my experiment :D
So far, you can save EVERYWHERE by pressing S, no matter if there are saves or not. But how can i make that save doesnt crash when you pressed save accidently after player touched spike? starting all over again just because pressing S a little too late is not what i want...
Sephalos:
You could do place_meeting+speed to check for spikes before allowing a succesful save.
If !place_meeting(x+hspeed,y+vspeed,playerKiller) and keyboard_check_direct(ord('S')) { saveGame(); }
You should probably add a key to allow the player to restart at the start of the room.
dYnAm1c:
Or a button to place the player to the next normal block, but that would probably need some restrictions so it cant be abused.
For example it will always place you on a block in the direction of the spawn so you cant skip anything.
Starz0r:
:FailFish:
Just put the Event of Pressing the S key in the player, if he doesn't exists (which he doesn't if you touch a spike), then it won't save.
Sephalos:
--- Quote from: Starz0r on December 01, 2013, 04:15:36 PM ---:FailFish:
Just put the Event of Pressing the S key in the player, if he doesn't exists (which he doesn't if you touch a spike), then it won't save.
--- End quote ---
Well I'm pretty sure the 'S' key is a event in the player object.
If not, well yeah that would be a problem.
Navigation
[0] Message Index
[#] Next page
Go to full version