So I edited Aloshi's guided missile to spawn high up in the air with the intention of making a Predator Missile type thing. However at the moment the missile spawns parallel to the ground like so: >>-->. What I'm wanting to make it do is make it point directly at the ground upon spawning like so: V
l
V.
%rot = "0, 0, 90, 0";
From this section of code.
{
//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 = "0, 0, 90, 0";
%pos = vectorAdd(%pos, 0 SPC 0 SPC 250);
%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
}
(Yes I am terrible at scripting.)