Fangames > Programming Questions
Yuuutu engine block/platform death bug fix
lemonxreaper:
Some of you may have noticed that you can die from weird circumstances in the Yuuutu engine (maybe in others too I havent tested) such as: standing on the edge of a miniblock when there's a spike there, standing on a platform with a spike just under it or on the same level, or that one pixel align in my game where the spike kills you through the miniblocks.
You may have also noticed this in several places in IWKTK2 (mainly the kill the guy room).
---------------------------------------------------
why this happens: gamemaker reads its events from top to bottom each step, the event for the player to be pushed out on top of miniblocks or platforms and be spared from death is after the playerkiller collision detection. normal blocks are before which is why it doesn't happen with them.
-------------------------------------
solution: since we cannot reorder the events in GM that easily we need to simulate playerkiller collision at the end of the step.
---------------------------------------------
code: in player object (and player2 if on yuuutu engine) go onto collision with playerkiller and delete the code in there.
add a step event and pick end step, put in the following code:
if place_meeting(x,y,playerKiller) { with(player){killPlayer();} }
---------------------------------------------------------
Hopefully this will help and isn't too much of a mess, I'm not great at writing such things up. :BloodTrail:
Thanks to Sephalos for giving me GML for the solution :4Head:
Sephalos:
I'm glad we took the time to find this fix.
I've been wanting to make a fangame using only 16x16 blocks and smaller tilesets.
:ItsBoshyTime: o o o o o
lemonxreaper:
Yeah we did good :4Head:
smaller tiles levels can be cool, that one stage in I wanna make it breaking out takes advantage of them in interesting ways.
gabisthebest:
--- Quote from: lemonxreaper on June 27, 2013, 12:39:49 PM ---
... then add an event, on press G and put in the following code:
god +=1
if god >= 2{
god = 0}
--- End quote ---
What do you mean by pressing G and what is the event?
lawatson:
Navigation
[0] Message Index
[#] Next page
Go to full version