Edit the playertype, also, mess around with THIS portion of the script.
function guidedrocketLauncherImage::onFire(%this, %obj, %slot)
{
//cooldown cheatery prevention
if(%obj.lastGuidedRocketFireTime != 0 && getSimTime() - %obj.lastGuidedRocketFireTime < 5000) //5s
return;
%obj.lastGuidedRocketFireTime = getSimTime();
%pos = %obj.getTransform();
%forvec = %obj.getForwardVector();
%pos = VectorAdd(%pos, vectorScale(%forvec, 2));
%allrot = %obj.getTransform();
%rot = getWords(%obj.getTransform(), 3, 6);
%bot = new AIPlayer()
{
datablock="MissileBot";
};
clearAllPlayerNodes(%bot); //Makes the bot invisible
%bot.mountImage(missileimage, 2); //Mounts a missile so it looks like its a missile
%obj.client.setControlObject(%bot); //Control the missile
%bot.setTransform(%pos SPC %rot); //Reset the rotation
%bot.owner = %obj.client; //Set owner to you
%obj.client.bot = %bot; //Set your bot to the bot
pushBotToPos(%bot); //Start the missile-pushing
}
function pushbottopos(%bot)
{
if (!isObject(%bot))
return;
if(isEventPending(%bot.pbtoTick))
cancel(%bot.pbtoTick);
//If the owner dies while flying the missile
if(!isObject(%bot.owner.player))
{
MissileExplode(%bot.getPosition(), %bot.owner);
%bot.schedule(100, delete);
%bot.owner.setcontrolobject(%bot.owner.player); //Switches control to you again
return;
}
%ppos = %bot.getEyeVector();
%vec = %ppos;
%vec = VectorNormalize(%vec);
%vec = VectorScale(%vec, 45);
%bot.setVelocity(%vec);
%bot.pbtoTick = schedule(100, 0, "pushbottopos", %bot);
}