Home   Help Search Login Register  

Author Topic: Dead Body and object remover (DELETED)  (Read 7945 times)

0 Members and 1 Guest are viewing this topic.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Dead Body and object remover (TESTING)
« Reply #15 on: 29 Sep 2007, 12:23:53 »
You can find out the centre of the map quite easily, which is the best place to put your "universal-trigger":
Code: [Select]
_centre = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline D007

  • Members
  • *
Re: Dead Body and object remover (TESTING)
« Reply #16 on: 08 Aug 2008, 05:58:01 »
Having a lot of trouble with this body remover script.. Maybe I'm just not using it right.. I copied your triggers though from the body remover1 example mission you made and put them into our mission.  My brother and I beta test in mulltiplayer before we release anything. we find that at least 5 of his men will not be removed but all of mine will be.. I don't get it..

We have tried all kinds of methods, but nothing seems to work reliably.. could you please help me figure out how to do this correctly?
We'd really appreciate any insight to this.
Also when we try to use this on the server nothing happens at all.
when I use it on Lan only the hosts body will disappear but not any other players bodies. AI bodies will delete fine, but not player bodies. (except the hosts)
 I'd like to use this script so please if you can, get back to me.. thanks a bunch.
« Last Edit: 08 Aug 2008, 09:57:17 by D007 »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Dead Body and object remover (TESTING)
« Reply #17 on: 09 Aug 2008, 09:44:49 »
To make this script work properly in MP games, edit dynbr/dynbr_init.sqf and remove the line:
Code: [Select]
if (! isServer) exitwith {};

What you are seeing is that objects cannot be deleted/hidden when they are not local to the script performing the action. If the script is only run on the server, as it is by default, then only server-local objects will be deleted (players, and player-controlled AI and vehicles, are local to their respective client machines).

I haven't tested this myself, but I'm 98% sure this is the issue based on your description of the fault.
« Last Edit: 09 Aug 2008, 09:57:20 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline D007

  • Members
  • *
Re: Dead Body and object remover (TESTING)
« Reply #18 on: 17 Sep 2008, 10:16:19 »
Ahh.. I've been digging for this... ty Spon.
that worked for it's purpose.

Still wouldn't delete on the server after creation though.

Code: [Select]
_XXXX addeventhandler ["killed", {_this execVM "DynBr\DynBr_remove.sqf"}];

Example:
Code: [Select]
If (not(_itemclass iskindof "man"))then {_veh = _itemClass createVehicle (getPos player);_veh addeventhandler ["killed", {_this execVM "DynBr\DynBr_remove.sqf"}];_veh reveal player;clearWeaponCargo _veh;clearmagazinecargo _veh;player reveal _veh;_veh addaction ["[Lock\Unlock]", "Locker.sqf"];_veh addaction ["[Vehicle stats]", "vehicle_stats.sqf"];};

even that doesnt work..
Works on Pc though..  ug..
« Last Edit: 17 Sep 2008, 18:52:12 by D007 »