Author Topic: HELP  (Read 1945 times)

ethinthenougathorn

  • Spike Dodger
  • Posts: 114
  • jung, brutal, gutaussehend
  • OS:
  • Windows 8/Server 2012 Windows 8/Server 2012
  • Browser:
  • Chrome 31.0.1650.57 Chrome 31.0.1650.57
    • View Profile
  • Playstyle: Keyboard
HELP
« on: December 01, 2013, 02:14:53 PM »
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...
If you wanna hang out youve got to take her out; cocaine.
If you wanna get down, down on the ground;
cocaine.
She don't lie, she don't lie, she don't lie;
cocaine.

Sephalos

  • Spike Dodger
  • Posts: 228
  • OS:
  • Windows Vista/Server 2008 Windows Vista/Server 2008
  • Browser:
  • Chrome 31.0.1650.57 Chrome 31.0.1650.57
    • View Profile
  • Playstyle: Gamepad
Re: HELP
« Reply #1 on: December 01, 2013, 02:40:47 PM »
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

  • Wannabe
  • Posts: 24
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 31.0.1650.57 Chrome 31.0.1650.57
    • View Profile
Re: HELP
« Reply #2 on: December 01, 2013, 03:21:16 PM »
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

  • Owner
  • The Kid
  • Administrator
  • Posts: 343
  • Hall Of Fame
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 31.0.1650.57 Chrome 31.0.1650.57
    • View Profile
  • Playstyle: Keyboard
Re: HELP
« Reply #3 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.

Sephalos

  • Spike Dodger
  • Posts: 228
  • OS:
  • Windows Vista/Server 2008 Windows Vista/Server 2008
  • Browser:
  • Chrome 31.0.1650.57 Chrome 31.0.1650.57
    • View Profile
  • Playstyle: Gamepad
Re: HELP
« Reply #4 on: December 02, 2013, 07:08:46 AM »
: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.
Well I'm pretty sure the 'S' key is a event in the player object.
If not, well yeah that would be a problem.

ethinthenougathorn

  • Spike Dodger
  • Posts: 114
  • jung, brutal, gutaussehend
  • OS:
  • Windows 8/Server 2012 Windows 8/Server 2012
  • Browser:
  • Chrome 31.0.1650.57 Chrome 31.0.1650.57
    • View Profile
  • Playstyle: Keyboard
Re: HELP
« Reply #5 on: December 02, 2013, 10:14:08 AM »
WOW, what a simple way...i havent thought about that.... :(

but thank you all for your help :D
If you wanna hang out youve got to take her out; cocaine.
If you wanna get down, down on the ground;
cocaine.
She don't lie, she don't lie, she don't lie;
cocaine.