• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

I need my character to come on screen every 5 minutes.

Hey guys, I am designing a point & click interface program, It is currently mostly built with drag & drop functions, but I wouldn't mind using some codes if it's necessary, it's fixed where users can flip through it and read a lot of information. Every 5 minutes, I want my character to run across the screen. I have made my character persistent and accomplished this with the Timeline (mutliplying steps per a second.) The only problem is even tho my character is persistent (available in all rooms once created) He disappears if someone clicks out of the room when he's running across the screen. I would like him to be able to continue to run across the screen even if the user clicks out of the current room as he's running across. Does anyone know how to accomplish this? If the answer requires coding please be very specific in your answer for example.
"In the create event place this script"
#script
"In the step event please place this script or drag & drop function"
#drag & drop function
I would greatly appreciate any attempts at fixing this issue. All rooms in my project are 850x500 in size, all rooms are currently running at 30fps, again I want an object of my choice (1 object) to run across the screen without interruptions every 5 minutes. I also have a specific path already set for the object to follow.
I am pretty sure that's all of the info that matters. Thanks for your input & taking the time to read this.
Currently when the user clicks while he's on screen, the character either
A. Disappears completely
or
B. looses direction in it's path and appear somewhere else on the screen.
 
What method are you using to tell the character to run across the screen, are you using path_start() or DnD equivalent?

If so, that means if your character is on a path and running across the screen when the room changes, and the path is defined in the room editor, the path the character was on is most likely destroyed.

So in the next room, the character is trying to follow a path that has disappeared.

Here's something you could try. It assumes that the path the character follows is the same shape/length in every room.

Character object Create Event:
Code:
current_path_position = 0
In the character object, in the Room End event, save the path position:
Room End Event:
Code:
current_path_position = path_position
Also in the character object, in the Room Start event, check if the path position is greater than 0, if it is, then he was moving on a path, so we need to set him back where he was.

Room Start Event:
Code:
if ( current_path_position > 0 )
{
    path_start(path, speed, endaction, absolute) // You'll need to fill these parameters out per your needs
    path_position = current_path_position // update the path position to where the character was in the previous room.
}
Finally, in the character, add a Path Ended Event and reset the current_path_position:
Code:
current_path_position = 0
 
What method are you using to tell the character to run across the screen, are you using path_start() or DnD equivalent?

If so, that means if your character is on a path and running across the screen when the room changes, and the path is defined in the room editor, the path the character was on is most likely destroyed.

So in the next room, the character is trying to follow a path that has disappeared.

Here's something you could try.
Code:
if ( current_path_position > 0 )
{
    path_start(path, speed, endaction, absolute) // You'll need to fill these parameters out per your needs
    path_position = current_path_position // update the path position to where the character was in the previous room.
}
Thanks for your response.
Please show me an example how it should look after I enter a value, for example pathspeed 5, x1056 y352 position & absolute.
 
Please show me an example how it should look after I enter a value, for example pathspeed 5, x1056 y352 position & absolute.
Sorry, I'm not quite sure I understand you.

Do you mean how the code should look? Or do you mean how the game should look?

The code should look the same as I posted above, with the path_start() function something like this:

Code:
    path_start(*put your path name here*, 5, path_action_stop, true)
You need to put the name of your path (which I obviously don't know) as the first option.
 
Top