Jump to content
Sign in to follow this  
kutya

Firing but no bullets?

Recommended Posts

I'd like to make this (but don't know how):

A unit fires (complete sound and anim), but I don't want the effect of the bullet impact. Let's say a tank fires, but I want that the shell doesn't hit anything (actually I want to calculate where it hits and make my own explosion).

Since now I've managed to play a firing sound, but it's a bit dumb to hear the firing from a completely static unit. In this case I don't tell a unit to fire, just play the sound.

Please, help someone confused_o.gif

Share this post


Link to post
Share on other sites

You'll need a "fired" eventhandler and deleteVehicle the

bullet, which you catch by the EH.

~S~ CD

Share this post


Link to post
Share on other sites

btw - i forgot to mention that you will need also the

nearestObject command to catch the bullet by the information

you got out of the fired EH.

As far as i remember there might be a problem because the bullet can be too fast out of range for the nearestObject

detection, but you could try a search here or on ofpec since

this has been answered lots of times b4 too.

Just i didn't need it for myself yet thus i can only tell ya

what i remember having read ages ago.

~S~ CD

Share this post


Link to post
Share on other sites

Okay smile_o.gif

Now that you mention it, I saw a similar thing in JAM3 for AI blocking smoke. I'll check there.

But now I've got another problem. Looked for it on OFPEC, but didn't find a solution: cannot make vehicles to doTarget or doFire. I've made a clean mission with only me (named "me") and a soldier. In the init of the soldier I've put:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this doTarget me

and it was ok. But when I changed the soldier to a tank. I didn't move. I've tried variations such as:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">gunner this doTarget me

commander this doTarget me

but it didn't work. Same with doFire.

Share this post


Link to post
Share on other sites

For vehicles you can use:

vehicle setfuel 0

:if it's something like a tank, so that only the turret moves

and not the whole vehicle.

vehicle doWatch position

:i've been using getpos gl1 for position whilst gl1

was a gamelogic.

vehicle fire "weapon"

:example - w1 fire "gun120" - which would make an

M1A2 (original BIS) make fire it's primary weapon.

~S~ CD

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×