Hi, I've made myself a gun that aims and fires at a preset target and I'm happy with it. However, the gun doesn't have any fire effect so I'm tryin to add some barrel smoke when it fires.
Here's what I've got (gun1_init is called before spawn):
gun1_init:
$gun1_smoke glue $gun1
$gun1_smoke anim stop
goto gun1
end
gun1:
wait 5
$gun1 setAimTarget $aim1
$gun1 waittill ontarget
wait 0.2
$gun1_smoke anim start
wait 0.2
$gun1_smoke anim stop
$gun1_fire anim start
radiusdamage $gun1_fire 256 384
wait 5
$gun1 setAimTarget $aim_normal
$gun1 waittill ontarget
goto gun1
end
What I have is continuous smoke from the smoke effect's beginning location, so it's not binding and its not start/stopping. Some generally not working. All the targetnames etc are correct. Any ideas?
Thanks.
Bilko.
Firing Gun Smoke
Moderator: Moderators
you are glueing the smoke to the gun. when you glue something to a parent, its origin is changed to the parents own origin, no matter where it started off. what you want is to bind the entity. that will adjust the entity's offset with the parent.
also, when you want the smoke to stop, you should run this line:
$gun1_smoke delete
since this is only a oneshot thing, you should delete it so it doesnt keep eating up the memory.
also, when you want the smoke to stop, you should run this line:
$gun1_smoke delete
since this is only a oneshot thing, you should delete it so it doesnt keep eating up the memory.