Jump to content
Sign in to follow this  
icebreakr

Spawning explosive object in multiplayer

Recommended Posts

1. Since almost all IED scripts are bugged in MP, is there a simple way to spawn a "bomb" that spawns/goes off when player triggers it?

2. What other vehicles/objects do explode on "this setdamage 1"? So far we have used support trucks for that explosions, its pretty stupid that ammo crates don't explode....

Share this post


Link to post
Share on other sites

You're looking for the createVehicle command. Simply use one of the explosive devices mentioned in the Biki as your explosion, the list can be found here.

Example syntax :

<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 Target1

Target1 being the named location for the created bomb - for instance an invisible H, or simply a set of co-ordinates.

Good luck!

Regards,

Wolfrug

Share this post


Link to post
Share on other sites
Guest
You're looking for the createVehicle command.

That doesnt work for me.

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

_tempObj = "Sh_120_SABOT" createvehicle[_ExplosionPosX,_ExplosionPosY, _ExplosionPosZ]

And the script works perfectly only not the creation of the ammotype.

Testing it locally in the editor works just fine. However I have been testing it on our private dedicated test server without luck.

My script is only running on the server itself not on the clients (that is a must and cant be changed), it communicates all actions the script should perform very well, just not the explosion.

Right now people see units die without knowing why.

I did find some workarounds to get the "createvehicle" to work properly..........only all those workarounds assume its executed on all computers in a MP session.

Anyone here who can tell me how to get passed this problem?

btw

sorry for bumping an old topic, but rather continue and old than starting another one about the same.

Share this post


Link to post
Share on other sites
Guest

Am I the only one unable to "createvehicle" ammotypes in MP or something?

I have searched but all I found was problems with this when it was executed on all clients and a workaround for it........but my script runs on server only.

If you have an idea please let me know.

Otherwise I will be forced to execute another script making a lot of calls to the main script to get the explosion to work.

Share this post


Link to post
Share on other sites

Wolfrug's example works fine in multiplayer (not dedicated, just hosted)... just tested it yesterday, IED killed more than 10 BLUFOR troops searching the factory complex wink_o.gif

Share this post


Link to post
Share on other sites
Guest

Thx for your help thumbs-up.gif but believe me it doesnt work on our dedicated.

I am using exactly that command. I can see the script works cause the units die, I just dont see the explosion  crazy_o.gif

Could it than be caused by the fact I specify the position and am NOT using getpos directly?

My syntax <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_tempObj = "Sh_120_SABOT" createvehicle[_ExplosionPosX,_ExplosionPosY, _ExplosionPosZ]

Wolfrug's syntax <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 Target1

Share this post


Link to post
Share on other sites
Guest

Not all ammotypes are created globally if only created locally on server with (the supposed global) "createvehicle" command.

Try it for yourself. Download a small test here

I made a small test mission with 2 different ammotypes.

1 ammotype = "R_80mm_HE", executed once on server only and once on all clients, in all cases you will see an explosion.

1 ammotype = "Sh_120_SABOT", executed once on server only and once on all clients. When executed on server you wont see it.

Use radio channels Alpha - Bravo - Charlie - Delta to triggert the explosions.

Now I understand why you dont see some of the explosions in a MP game when people use some ordinance.

Some ammotypes are only locally!!!!

Is it meant like this? crazy_o.gif

Share this post


Link to post
Share on other sites

Answering 2nd point to IceBreakr.

Not always to 'attach' one explosion to certain vehicles is passing for to use setVehicleDammage.

Just put via script 10 satchels near to that vehicle.

Execute the action to touch off that satchels (probably 10 x actions)... is it enough explosion?

Well, maybe we are creating a new 'air' vehicle  tounge2.gif

Another question. Why ammo crates cant explode?

Hum... not a true truth and not the worst lie.

Ammo crates can be burning. But... i need to explode it!

Try to think in this sequence.

Well, ammo crate is not a playable vehicle, so, it will not explode in the same way as vehicles doing... its behaviour belongs to ArmA, not to us. I suppose ArmA preferred to make more reallistic explosions in certain objects because under his logic and his common sense, nobody could want to explode an ammo crate...

I'm not saying that you have no common sense. Just saying that BIS created an enough complex brain called "ArmA" and all of us are trying to make a second one inside the first.

The result of an explosion attached to a bridge, is not the same as the explosion of a building, as example.

Just remember that probably, ammo crates cant be exploded, because only can be moved by the command setPos.

Don't ask me why, i suspect it, not enough tested yet.

Then, how can we explode it?, as i told you, i think one fine way is to add via script satchels to be touched off.

Probably, ammo crates will not 'jump' but surely it will be burning for a little time (a lot less than a truck, as example) and then it will be empty of any ammo inside it.

Of course, you can always 'simulate' the explosion of an 'unexplodable' object if you can move it (setPos).

Launch a bomb/satchel, and move that object like a jump, or in a parabolic way.

You will find in this 'terrorist' way, a lot of enough reallistic examples by yourself wink_o.gif

Of course, to simulate one explosion 'attached' to one object, you will find a lot of solutions. Because the humans can destroy in seconds what they are constructing about years from. Aaaaaah The apocalipstick! lololol

Try this tricky way too:

setVehicleDammage 5 or maybe more... just test test test test to know how ArmA doing, don't 'patch' your missions, just learn the real limits of ArmA and you will make more perfect missions.

nener.gif

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  

×