Not really. If you want to edit the event actor's variables in a function, all you need to do is use the variables.
- Code: Select all
void
move ()
{
x+=10;
}
That code will work without problem. The following code will also work if only the player actor calls it (and there is only one player actor).
- Code: Select all
void
move ()
{
player.x+=10;
}
But because it can only be called by the player, that function is really useless.
You would however use a function that moves actors using similar methods for a function like this (moves all the menu type graphics off screen).
- Code: Select all
void
reset_menu ()
{
menu.x=-3000;
pause.x=-3000;
hiscore.x=-3000;
credits.x=-3000;
}
But to call this you need to have those actor names in the event code (usually in a comment).
- Code: Select all
//menu pause hiscore credits
reset_menu();