Author Topic: Vectors and Velocities  (Read 496 times)

What would the script be if you wanted to make the player be launched a few feet off the ground when you fire (complete please, like so i can insert it into the .cs right off)?

%player = ...

%player.addVelocity("0 0 20");




what would the complete script with function::onFire stuff look like?
« Last Edit: January 08, 2011, 03:34:52 PM by Midway Sentinel »

Taking a guess on the arguments, they may not be correct :

Code: [Select]
function WeaponImage::onFire(%this,%obj,%slot)
{
     %obj.setVelocity("0 0 20");
}

Change WeaponImage to the image name of your weapon

Launching them straight up will look kind of wierd, especially if you shoot straight up.


Hey, this helps me too.