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

Sonic Forces Subtitles during gameplay

W

Wafi Hussain

Guest
I am working on a Sonic fangame and I am trying to work on Sonic having dialogues during the gameplay. I would need to use subtitles and audio. I was already guided to do the following

The two variables on obj_trigger:
1.) Audio
2.) Subtitle string

these two variables should be made in create event so that you can assign values to it through creation code, hence saves you from making "so many" trigger objects when sonic collides, play the audio and show the dialogue through engine you are using and make sure to disable the object by either destroying it or a boolean variable.

I already created the two variables, but I am not sure what else should I do now. Can anyone help me? Thanks!
 

woods

Member
what "triggers" the audio and text?



psudocode here would be basically....
step event
if (trigger=true) // whatever you want to start things talking is the trigger..
{
audio_play_sound(snd_PlayerDead, 10, false);
}
 
W

Wafi Hussain

Guest
what "triggers" the audio and text?



psudocode here would be basically....
step event
if (trigger=true) // whatever you want to start things talking is the trigger..
{
audio_play_sound(snd_PlayerDead, 10, false);
}
That's a good start. But now I am trying to figure out how to get the player collide the trigger
 

woods

Member
relevant code would help ;o)
basics of collision goes something like this...


if place_meeting(x, y, obj_whatever)
{
// do stuff
}
 
Top