Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: jetxl on Mon 22/12/2003 18:45:43

Title: function in a function
Post by: jetxl on Mon 22/12/2003 18:45:43
I made a function and it needs to be repeatedly executed, so I want to place it in repeatedly executed room function, but then, of course, it gives a nested function error. Can I fix this?
Title: Re:function in a function
Post by: a-v-o on Mon 22/12/2003 18:58:12
function CallEveryGameCycle ()
{
 // commands
}

function repeatedly_execute ()
{
 CallEveryGameCycle ();
}

if you do something like this, then your function CallEveryGameCycle is called as often as repeatedly_execute (for every frame).

If this isn't what you need, then you should be more specific what you want to realize.