Author Topic: Dismount Vehicle code?  (Read 2114 times)

I've tried:
%target.schedule(6999, dismount());
%target.schedule(6999, unmount());
on both the mount target and the player target with no luck. Is there something else I could try?

Edit:
Or is there something else I can try to force a player to dismount? Killing the vehicle doesn't do it. Example:
%target.schedule(7000, damage, %obj, %obj.getPosition(), 10000, $DamageType::Lava);
%target.schedule(7000, finalExplosion());
« Last Edit: September 19, 2013, 06:47:03 PM by Mickers »

I've tried:
%target.schedule(6999, dismount());
%target.schedule(6999, unmount());
on both the mount target and the player target with no luck. Is there something else I could try?

Edit:
Or is there something else I can try to force a player to dismount? Killing the vehicle doesn't do it. Example:
%target.schedule(7000, damage, %obj, %obj.getPosition(), 10000, $DamageType::Lava);
%target.schedule(7000, finalExplosion());
When doing schedules you don't need ().
Also, finalExplosion is not a function (I think), try destroy or kill.

Code: [Select]
%target.schedule(6000, destroy);
%target.schedule(6000, kill);
etc.

Thanks I'll check it out.

Code: [Select]
schedule(6999, %target, "dismount");
I think that should work.

Code: [Select]
schedule(6999, %target, "dismount");
I think that should work.
This is correct, but with no things with a schedule like %target.schedule, you have to put a 0 after the milliseconds.

Code: [Select]
schedule(6999, 0, %target, "dismount");
Otherwise, your server will crash.

Otherwise, your server will crash.

...uh, what? No. Why would that even happen?

It crashes on mine, most of the time. It must be something then...

schedule(delay,object,function,argument[,..]);
object.schedule(delay,function,argument[,..]);


schedule(delay,0,function,argument[,..]);
object.schedule(delay,function,argument[,..]);

fixed

schedule(delay,object,function,argument[,..]);
object.schedule(delay,function,argument[,..]);


This is 100% correct. object is either %thing or it's 0. both are valid