Home   Help Search Login Register  

Author Topic: Slow down a bullet  (Read 460 times)

0 Members and 1 Guest are viewing this topic.

ponq

  • Guest
Slow down a bullet
« on: 01 Jul 2004, 14:44:41 »
Hi,

I'm trying to add some fx to a bullet.
Therefor I add an eventhandler "fired" which triggers a script.

the script catches the bullet, but I want the bullet to slow down.

I seem to be able to "grab" the bullet, but once I set the velocity it abrubtly changes direction.

here's the code I have:
Code: [Select]
_Missile = nearestObject [vehicle(player), _this select 4]
? isNull  _Missile : exit
_Type= typeOf _Missile

; adjust velocity of missile
_velx = velocity _missile select 0
_vely = velocity _missile select 1
_velz = velocity _missile select 2
_velz = 2

_missile setvelocity [_velx, _vely, _velz]

anyone have a clue on how to make the bullet travel slow, while keeping it's line (not falling down cos of the low speed)?
« Last Edit: 01 Jul 2004, 14:45:08 by ponq »

ponq

  • Guest
Re:Slow down a bullet
« Reply #1 on: 01 Jul 2004, 16:22:58 »
stupid me just changed the z-speed....ofcourse I have to change all speeds in all directions.
Code: [Select]
_velx = _velx / 10
_vely = _vely / 10
_velz = _velz / 10