M
MathewHall
Guest
Hello, I have come from Shaun Spalding's video on Transitions. And I can't see anyone else having this problem except for me. I am quite new to coding so I will have to apologize if it's an easy fix or whatnot.
Basically Whenever I go to the end of my room where the OLevelEnd Transition is, I just go right though it despite my character being in the same Layer as OLevelEnd, I have tried to find the solution by trying to change stuff up for an hour to see if it works as due possibly cause it's an old version of Gamemaker he was using in the video, I also checked the YouTube comments of his video without luck as I think this is a rare issue that happens (or not) Does it have to do with my code cause I've checked everything over and it's looks fine to me.
oLevelEnd Collision with oPlayer code:
Slide Transition script code:
oTransition step code:
For anyone who knows how to fix this or needs more information to fix it (e.g pics to show), please let me know.
Thank you.
Basically Whenever I go to the end of my room where the OLevelEnd Transition is, I just go right though it despite my character being in the same Layer as OLevelEnd, I have tried to find the solution by trying to change stuff up for an hour to see if it works as due possibly cause it's an old version of Gamemaker he was using in the video, I also checked the YouTube comments of his video without luck as I think this is a rare issue that happens (or not) Does it have to do with my code cause I've checked everything over and it's looks fine to me.
oLevelEnd Collision with oPlayer code:
GML:
with (oPlayer)
{
if (hascontrol)
{
hascontrol = false;
SlideTransition(TRANS_MODE.GOTO,other.target);
}
}
GML:
with(oTransition)
{
mode = argument[0];
if(argument_count > 1) target = argument[1];
}
oTransition step code:
Code:
if (mode != TRANS_MODE.OFF)
{
if (mode == TRANS_MODE.INTRO)
{
percent = max(0,percent - max((percent/10),0.005));
}
else
{
percent = min(1.2,percent + max(((1.2 - percent)/10),0.005));
}
if (percent == 1.2) || (percent == 0)
{
switch (mode)
{
case TRANS_MODE.INTRO:
{
mode =TRANS_MODE.OFF;
break;
}
case TRANS_MODE.NEXT:
{
mode = TRANS_MODE.INTRO;
room_goto_next();
break;
}
case TRANS_MODE.GOTO:
{
mode = TRANS_MODE.INTRO;
room_goto(target);
break;
}
case TRANS_MODE.RESTART:
{
game_restart();
break;
}
}
}
}
Thank you.
Last edited by a moderator: