Jump to content
Sign in to follow this  
csj

MGun turret ??

Recommended Posts

I have two different type mguns on model.

If mgun 1 is selected it swings on turret. This is good.

If mgun 2 is selected I need to be able to lock turret in its origional starting posi, that is straight ahead.

Then naturally switch back to free turret when mgun 1 is reselected.

Is this possible?

Share this post


Link to post
Share on other sites

No direct way to turn the turret, but turning-out forces the

turret back to it's original position (only works on Tank class,

I think)

Also, maybe adding a large invisible target directly in front of

the unit and 'doTarget' would force an AI gunner to turn.

Share this post


Link to post
Share on other sites

Thanks Footmunch,

I have solved problem using different method but

what you have suggested will be handy for other problem I had.

Share this post


Link to post
Share on other sites

Next problem  rock.gif

Trying to get stuff happening when particular weapon is fired.

In the EH I have

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fired="[_this select 0,_this select 4,0] exec ""\csjmodel\shot.sqs""";

In the sqs I have this (abbr.)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vehicle = _this select 0

_weapon = _this select 1

?(_weapon == "CSJM21"):goto "doFlash"

exit

#doFlash

_vehicle setobjecttexture [35,"\csjmodel\flash_side.paa"]

_vehicle setobjecttexture [36,"\csjmodel\flash_frnt.paa"]

~0.5

_vehicle setobjecttexture [35,""]

_vehicle setobjecttexture [36,""]

exit

Have tried a number of variations but nothing seems to be working.

Share this post


Link to post
Share on other sites

Code looks okay, from a quick glance. Try adding:

player globalchat format["%1", _this select 0]

in the sqs, to make sure you're firing the script, and that the

info is being passed properly.

Share this post


Link to post
Share on other sites

Thanks Footmunch

Atleast I have idenified the problem location now.

Share this post


Link to post
Share on other sites
Quote[/b] ]Code Sample  

fired="[_this select 0,_this select 4,0] exec ""\csjmodel\shot.sqs""";

Should have been

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fired="[_this select 0,_this select 1] exec ""\csjmodel\shot.sqs""";

Now all is sweet until next problemo

Thanx for help

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  

×