well tezuni, would it work?
The vehicle velocity events functions are:
function Vehicle::setVelocity(%this,%vel)
{
%this.setVelocity(%vel);
}
function Vehicle::addVelocity(%this,%vel)
{
%this.setVelocity(vectorAdd(%this.getVelocity(),%vel));
}
Here is the completely rewritten script by Clockturn:
function gsfseacopterVehicle::OnTrigger(%this, %obj, %triggerNum, %val)
{
if(%val)
{
if(%triggerNum == 2)
{
%vel = %obj.getVelocity();
if(getWord(%vel,2) < 30)
%obj.setVelocity(vectorAdd(%vel,"0 0 3"));
}
}
}
package SeaCopterTrigger
{
function Armor::onTrigger(%datablock,%player,%slot,%val)
{
Parent::onTrigger(%datablock,%player,%slot,%val);
%mount = %player.getObjectMount();
if(%slot == 2 && isObject(%mount))
{
if(%val)
{
%mountdatablock = %mount.getDatablock();
if(%mountdatablock.getName() $= "GSFSeaCopterVehicle")
{
%mountdatablock.climbUp(%mount);
}
} else {
cancel(%mount.climbUpSchedule);
}
}
}
};
ActivatePackage(SeaCopterTrigger);
function GSFSeaCopterVehicle::climbUp(%datablock,%vehicle)
{
%vel = %vehicle.getVelocity();
if(getWord(%vel,2) < 20)
{
%vehicle.setVelocity(vectorAdd(%vel,"0 0 1"));
}
%vehicle.climbUpSchedule = %datablock.schedule(50,"climbUp",%vehicle);
}
Here is the original: (Broke after v13)
function gsfseacopterVehicle::OnTrigger(%this, %obj, %triggerNum, %val)
{
if(%val){
if(%triggerNum == 2){
%pmount = %client.player.getObjectMount();
%pmount.setVelocity("0 0 20");
}
}
}
function gsfseacopterImage1::onDone(%this,%obj,%slot)
{
%obj.unMountImage(%slot);
}
function gsfseacopterCheck(%obj)
{
// return;
if(!isObject(%obj))
return;
%speed = vectorLen(%obj.getVelocity());
if(%speed < %obj.dataBlock.mingsfseacopterSpeed)
{
if(%obj.getMountedImage(3) !$= "")
{
%obj.unMountImage(2);
}
}
else
{
if(%obj.getMountedImage(3) $= 0)
{
%obj.mountImage(gsfseacopterImage1,2);
}
}
schedule(2000,0,"gsfseacopterCheck",%obj);
}
function gsfseacoptervehicle::onadd(%this,%obj)
{
%obj.playThread(0,"spin");
gsfseacopterCheck(%obj);
}
I've tried using all of these and modifying them, but with no results. I've given up on it, but I encourage anyone else to take a shot.