Home   Help Search Login Register  

Author Topic: Tracers stays till bullet hit something  (Read 597 times)

0 Members and 1 Guest are viewing this topic.

Fab.

  • Guest
Tracers stays till bullet hit something
« on: 14 Oct 2003, 20:13:39 »
Hi there !

I have a weird bug ! If I create a bullet in a script, using "createvehicle" or "camcreate". After that, i give the bullet a push using "setvelocity". The thing works fine, the bullet fly like it should, but the tracer is weird :

it's not moving like a normal tracer fired from a weapon. the end is following the bullet, but the origin stays at its original place, so the tracer gets longer and longer...

when the bullet hit something, the whole tracer desapear...

anyone knows how i can get that fixed ?
« Last Edit: 14 Oct 2003, 20:14:23 by Fab. »

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:Tracers stays till bullet hit something
« Reply #1 on: 15 Oct 2003, 15:00:56 »
Hey !

Try to increase the (x, y, z) values of your setvelocity : your bullets are probably too slow. (x, y, z) should each amount to several hundreds for the tracer to look acceptable.

Ig.

Fab.

  • Guest
Re:Tracers stays till bullet hit something
« Reply #2 on: 15 Oct 2003, 15:37:09 »
yeah, at the begining, it was. Then i increased the velocity to 10 times the original velocity (pick from a real fired bullet)... So now the bullet are really fast, but i still have the same bug : The tracer is not moving, but getting longuer...

I'll try to increase the speed again and i'll report back

thanks for the answer.

Knut Erik

  • Guest
Re:Tracers stays till bullet hit something
« Reply #3 on: 17 Oct 2003, 16:18:54 »
you can detect the velocity from one original bullet i think....

Just add an event handler to an unit.
This one works for the WEST SOLDIER class
This addeventhandler ["Fired","[Player] exec {script.sqs}]

Script.sqs
_unit = _this select 0
_bullet = Nearestobject [Player,"BulletSingleW"]
~0.1
hint format ["The velocity = %1",velocity _bullet]


Not sure about this but it should work ;)

*edit*
Just tested it and it works like a charm  :D
« Last Edit: 17 Oct 2003, 16:21:56 by Knut Erik »

Fab.

  • Guest
Re:Tracers stays till bullet hit something
« Reply #4 on: 17 Oct 2003, 17:09:05 »
yeah, that's basically what i'm doing.

On the fired eventhandler, i dectect the closest bullet. Then i get the velocity of that bullet and then i create 4 new bullets at different positions and set the new velocity.

I dont think the problem comes from the velocity itself. If you look at the tracers, it doesnt seems to move like a normal tracers :

it's getting longuer.... the whole tracer disapear when the bullet is dead.

weird isnt it ?

is there anything i can set on the new bullet to make it like a real one once it's fired ?

Offline CrashDome

  • Members
  • *
Re:Tracers stays till bullet hit something
« Reply #5 on: 20 Oct 2003, 15:41:38 »
can't answer your question, but I thought that whatever is happening sounds really cool for cutscenes that are slo-motion.  :o

what happens if you follow it with another bullet?