Jump to content
Sign in to follow this  
namreg

Bombing without planes....

Recommended Posts

Hi, I would like to bomb a whole town for a cutscene and I wonder If there's any way to place bombs in the sky and just let them fall free and explode......

I tried to use some units to do it rofl.gif in the init menu I inserted this:

Quote[/b] ]this addmagazine "6rnd_gbu12_av8b"; this addweapon "bomblauncher"

then I put an invisible marker on the map and with the setpos command I send the unit there and by a trigger they fired the weapon:

Quote[/b] ]kamikaze1 fire "bomblauncher"

Then it exploded..... but you always see a guy flying around, and if I wanted to explode more bombs it was impossible or completely slow...

I know there's a good way to do this, could anyone tell me the script??

THX whistle.gif

Share this post


Link to post
Share on other sites

That's the most hilarious method I've ever heard of wink_o.gif. It's much easier to just spawn the bomb directly.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Bomb = "Bo_GBU12_LGB" createVehicle [getPos MyGameLogic select 0, getPos MyGameLogic select 1, AltitudeInMeters];

Place a named game logic on the map, and subsitute MyGameLogic with the name of your game logic and AltitudeInMeters with the desired spawn altitude. AltitudeInMeters should work with 0 if that's the desired effect.

Share this post


Link to post
Share on other sites

jajaja, I know man rofl.gif

I knew that the createvehicle command was involved in this, at first I created a marker and used the getpos command to try to place the bomb there but I couldn't....

anyway, THX a lot man.... There are many things I don't know about scripting, and I see a lot of difficult scripts out there that just blow my mind....jejeje... yours is great, just what I needed....

notworthy.gifnotworthy.gifnotworthy.gifnotworthy.gifnotworthy.gifnotworthy.gif

Share this post


Link to post
Share on other sites

Just for completeness:

With markers getpos wont work, use getmarkerpos insted should do the trick

Share this post


Link to post
Share on other sites

I tried

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Bomb = "Bo_GBU12_LGB" createVehicle [getMarkerPos MyMarker select 0, getMarkerPos MyMarker select 1, AltitudeInMeters];

instead of

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Bomb = "Bo_GBU12_LGB" createVehicle [getPos MyGameLogic select 0, getPos MyGameLogic select 1, AltitudeInMeters];

But it doesn't work with markers.... thing that would be neat so there are not so many game logics spread all over the place, just markers that can be hidden... what am I doing wrong??

Share this post


Link to post
Share on other sites

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

Bomb = "Bo_GBU12_LGB" createVehicle [getMarkerPos "MyMarker" select 0, getMarkerPos "MyMarker" select 1, AltitudeInMeters];

Marker names between quotes allways.

Share this post


Link to post
Share on other sites

I've been using the createvehicle array recently for similar purposes, and discovered that it wouldn't take a perfectly valid x,y,z coord. It would create the bomb at ground level in the right place. I had to then set the height of the bomb using setpos, passing it the exact same coords as I'd used to create?? crazy_o.gif

Share this post


Link to post
Share on other sites

make sure that you don't use getmarkerpos for the last set of coordinates as all makers are at ground level, make sure you are using a just a number

Share this post


Link to post
Share on other sites

Hicks, I've got the position set as a local variable, and the height is NOT taken from the marker, in fact there isn't even a marker in my particular script. The bomb is created 3 mtrs below a flying plane, or at least it would be if it worked. I use exactly the same local variable in the setpos and it works correctly.

Share this post


Link to post
Share on other sites

Sorry for stupid question, but can i use tricker to activate gamelogig bombs? I want to spawn few bombs when certain point has reached, I am using this code:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Bomb = "Bo_GBU12_LGB" createVehicle [getMarkerPos "target" select 0, getMarkerPos "target" select 1, 50];Bomb = "Bo_GBU12_LGB" createVehicle [getMarkerPos "target_1" select 0, getMarkerPos "target_1" select 1, 70]

I have placed 2 markers to map, called target and target_1

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  

×