• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM [Solved]How to show full blackscreen for an instant with room outside event

  • Thread starter SonicTheHedgehog+123
  • Start date
S

SonicTheHedgehog+123

Guest
Hey everyone
I am making a unique Platforrmer and I want to know how I can make a blackscreen with the text "Next" appear for a short amount of time. This should happen if the obj.player is outside of the room. Also if the blackscreen appeared it should use the code "room_goto_next"


I created a black square object. If the player is outside of the room the objects gets visible and streched throw the hole screen. Know I have a blackscreen also I did write the text "Next"
with the Draw Event. The problem is that when my player.object is outside of the room the alarm doesnt really work. I want that if the player is outside of the room an instant alarm gets activated and it should use the code smothly. Is there a trick or a better option to make this transition happen, or how I could do this method with low memory cost. If someone could help me I would be very thankful:D

Everythihng i did so far with the black square object:

Step Event:

if (Mega = 1)
{
visible = 1
}
else
{
visible = 0
}
if place_meeting(x,y,Fledermaus)
{
alarm[0] = 5
}

Create Event:

Mega = 0;

Draw Event:

draw_sprite_stretched(Portal_Bild, 0, x, y, 4000, 4000);
draw_set_font(BigMac)
draw_set_color(c_white)
draw_text(150,room_height/2,"NEXT")

Alarm[0] Event:

room_goto_next()

 
Last edited by a moderator:
S

SonicTheHedgehog+123

Guest
I thing i didnt explain well what the problem is.
My problem is that when I am leaving the room the alarm doesnt always activate(And the alarm should only activate when the player is outside of the room). I did put in the black Square again at the right side outside of the room. And gave it the code:

if place_meeting(x,y,Fledermaus)
{
alarm[0] = 5
}


The alarm does work sometimes if the player is colliding

If the player is meeting with the balck square that is outside of the room then it triggers the alarm but not everytime.
Is there a code where it can detect if the player is outside of the room and when he is the alarm[0] triggers immediantly.

After the alarm the square or the player object should us room goto next.

here is also the picture:
 

Attachments

I thing i didnt explain well what the problem is.
My problem is that when I am leaving the room the alarm doesnt always activate(And the alarm should only activate when the player is outside of the room). I did put in the black Square again at the right side outside of the room. And gave it the code:

if place_meeting(x,y,Fledermaus)
{
alarm[0] = 5
}


The alarm does work sometimes if the player is colliding

If the player is meeting with the balck square that is outside of the room then it triggers the alarm but not everytime.
Is there a code where it can detect if the player is outside of the room and when he is the alarm[0] triggers immediantly.

After the alarm the square or the player object should us room goto next.

here is also the picture:
Ahh I see now.

Ditch your collision/trigger object.

Go into your player object events, open new event or right click, go to the bottom ones, there's an Outside Room event amongst the list.

Click it and in that event simply put your Alarm code in there.

Now anytime the player is outside of the room that alarm in theory should always work
 
Last edited:
S

SonicTheHedgehog+123

Guest
IT WORKS!!!
Thank you very much Lance Klepp, Nidoking and appleWolf.
you guys are amazing.
With your Help I have made a cool room transicion.:D
 
Top