Author Topic: [solved] function keeps repeating itself  (Read 2343 times)

When you do %obj.schedule() make it %obj.bfgSchedule = %obj.schedule() so when you go to cancel it in your OnUnMount function you can just do cancel(%obj.bfgSchedule);
What you're doing currently is starting a schedule and canceling it immediately after.

Also for schedule usage the way it works is in two ways, either on an object or not on one.
schedule(ms, id, function, params);
%obj.schedule(ms, obj::function, params);

So if you want to kill a player
%player.schedule(20, "kill");
Not player.kill, it assumes you're doing it to the object already.
« Last Edit: September 21, 2016, 02:33:21 PM by Crøwn »

When you do %obj.schedule() make it %obj.bfgSchedule = %obj.schedule() so when you go to cancel it in your OnUnMount function you can just do cancel(%obj.bfgSchedule);
What you're doing currently is starting a schedule and canceling it immediately after.

Also for schedule usage the way it works is in two ways, either on an object or not on one.
schedule(ms, id, function, params);
%obj.schedule(ms, obj::function, params);

So if you want to kill a player
%player.schedule(20, "kill");
Not player.kill, it assumes you're doing it to the object already.
i managed to fix it earlier but this still helped me with trying to cancel the function properly. thanks!


edit: as far as the emitters go, i guess its pretty much a lost cause and i feel like it has something to do with the node its mounted to be too close to the player plus what boltster said about the correctmuzzlepoint
« Last Edit: September 21, 2016, 04:27:02 PM by Trogtor »