• 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!

Doing an event after dialog reads?

H

Hudsonius

Guest
So, I am using a dialog system by Heartbeast in his video: Beginner Tutorial] Make an RPG in GameMaker [P22] Dialog. Anyways, I want the player to collide with an invisible instance that will destroy that instance and make a goblin nearby talk. Once he is done talking, or while he is talking, I want him to attack the player. However, I can't find a way to make the player colliding with the invisible object make the Goblin talk. If anyone could help, it would be great.
 
M

Matt Hawkins

Guest
Id put the code in the invisible object that triggers the goblin, something like
Step event -
Code:
if place_meeting(x,y,obj_player)
    {
    with obj_goblin
        {
        talk = true;
        }
    instance_destroy()
    }
 
H

Hudsonius

Guest
Id put the code in the invisible object that triggers the goblin, something like
Step event -
Code:
if place_meeting(x,y,obj_player)
    {
    with obj_goblin
        {
        talk = true;
        }
    instance_destroy()
    }

Thanks, but under which event would the Goblin who speaks text go?

If you're wondering what I'm talking about, here's the code:

Code:
event_inherited();
dialog = noone;
dialog_page = 0;
xoffset = -32;
yoffset = -40;
text[0] = "Rats! Human filth! You said that they were all dead!"
 
M

Matt Hawkins

Guest
Thanks, but under which event would the Goblin who speaks text go?

If you're wondering what I'm talking about, here's the code:

Code:
event_inherited();
dialog = noone;
dialog_page = 0;
xoffset = -32;
yoffset = -40;
text[0] = "Rats! Human filth! You said that they were all dead!"
You could put most of the code in your invisible trigger object using a draw event and an alarm
draw event -
Code:
if place_meeting(x,y,obj_player)
    {
    triggered = true;
    if alarm[0] = -1
        {
        alarm[0] = room_speed
        }
     if triggered = true
        {
        draw_text(x, y-8, string("Rats! Human filth! You said that they were all dead!"));
        }
    }
alarm[0]
Code:
with obj_goblin
    {
    attack = true;
    }
instance_destroy;
 
Top