Jump to content
Sign in to follow this  
Harnu

Any way to fix this script?

Recommended Posts

Hey guys.  I just downloaded the napalm script and it's very very nice for effects.  But whenever I release the bomb I'm using as the napalm, the plane or chopper always straightens out.  So I really can't do a good divebomb cause it just levels off.

The napalm.sqs is:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">;Napalm.sqs by Shogun

;This script is a part of napalm addon. It detects missile launch and creates an object called

;NapalmBomb when the missile hits ground or target. Then it calls burn.sqs.

_Vehicle = _this select 0

_Launcher = _this select 1

_FireCenter = _this select 2

_ammocheck = _Vehicle ammo _Launcher

@ _ammocheck != _Vehicle ammo _Launcher

[_Vehicle, _Launcher, _FireCenter] exec "napalm.sqs"

_fired = 0

_pos = getPos _Vehicle

_Vehicle setPos [1,1,1]

_bomb = nearestObject _pos

_Vehicle setPos _pos

#LoopStart

_bpos = getPos _bomb

~0.001

? (getPos _bomb select 2) < 0.5 : goto "StopLoop"

goto "LoopStart"

#StopLoop

_pommi = "SHGNapalmBomb" camCreate _bpos

[_FireCenter, _pommi] exec "burn.sqs"<span id='postcolor'>

There is also a PBO file that's put into the addons folder.  I'm assuming that's just the flame.

Is there anyway I can change that script to make it so that the plane can stay on the angle it releases at.

Download here to try it yourself.

Share this post


Link to post
Share on other sites

i dont have the command refrence on me but i think. it's the nearest object command i think it changed for restistance.

Share this post


Link to post
Share on other sites

So what could I change that to? I'm a newbie to anything scripting.

Share this post


Link to post
Share on other sites

Alright this I think is the problem.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_bomb = nearestObject _pos<span id='postcolor'>

it now with resistance requires the object type as well as the position and im not sure about this but assuming  _Vechile is a A10  this Should work.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">;Napalm.sqs by Shogun

;This script is a part of napalm addon. It detects missile launch and creates an object called

;NapalmBomb when the missile hits ground or target. Then it calls burn.sqs.

_Vehicle = _this select 0

_Launcher = _this select 1

_FireCenter = _this select 2

_ammocheck = _Vehicle ammo _Launcher

@ _ammocheck != _Vehicle ammo _Launcher

[_Vehicle, _Launcher, _FireCenter] exec "napalm.sqs"

_fired = 0

_pos = getPos _Vehicle

_Vehicle setPos [1,1,1]

_bomb = nearestObject [_pos,"A10"]

_Vehicle setPos _pos

#LoopStart

_bpos = getPos _bomb

~0.001

? (getPos _bomb select 2) < 0.5 : goto "StopLoop"

goto "LoopStart"

#StopLoop

_pommi = "SHGNapalmBomb" camCreate _bpos

[_FireCenter, _pommi] exec "burn.sqs"<span id='postcolor'>

Share this post


Link to post
Share on other sites

Nope. It still makes it fly right back to being even. And it doesn't work anymore. The flame from the napalm isn't there.

Share this post


Link to post
Share on other sites

Hmm anyone know if a10 is the right name ?

it might be a bomber or something

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_pos = getPos _Vehicle

_Vehicle setPos [1,1,1]

_bomb = nearestObject [_pos,"A10"]

<span id='postcolor'>

this might also cause a problem, maby you need to do this.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_pos = getPos _Vehicle

_bomb = nearestObject [_Vehicle,"A10"]

_Vehicle setPos [1,1,1]

<span id='postcolor'>

Share this post


Link to post
Share on other sites

Why is in script this line ?

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[_Vehicle, _Launcher, _FireCenter] exec "napalm.sqs"<span id='postcolor'>

I think it makes infinite execution of napalm.sqs script.

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  

×