Blockland Forums > Modification Help
Vehicle Script Assistance
Headcrab Zombie:
Does it give any error in the console?
Midway Sentinel:
when i fly it? or when the datablocks are loading?
Headcrab Zombie:
Either
Midway Sentinel:
this upon spawn:
Headcrab Zombie:
I didn't see it until now, but sometime when I was writing the code I gave you, I replaced every occurance of 'obj' with 'this' and what was supposed to say 'if(!isObject(%this))' instead says 'if(!isthisect(%this))'
Fixing that and something else and I'll edit this post.
Edit : Replace the entire DMTV::checkVelocity function with this:
--- Code: ---function DMTVCheckVelocity(%obj)
{
cancel(%obj.checkVelocitySchedule);
if(!isObject(%obj))
return;
if(vectorLen(%obj.getVelocity()) >= 1 && !%obj.isFly)
{
%obj.mountImage(DMTVJetStreamImage1,0);
%obj.mountImage(DMTVJetStreamImage2,1);
%obj.playThread(0,"toFly");
%obj.isFly = 1;
}
if(vectorLen(%obj.getVelocity()) < 1 && %obj.isFly)
{
%obj.unMountImage(DMTVJetStreamImage1,0);
%obj.unMountImage(DMTVJetStreamImage2,1);
%obj.playThread(0,"toIdle");
%obj.isFly = 0;
}
%obj.checkVelocitySchedule = schedule(100,0,DMTVcheckVelocity,%obj);
}
--- End code ---
(Hopefully I didn't make the same mistake there)
And change %obj.checkVelocity() in onAdd to DMTVCheckVelocity(%obj);