OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: duckwilliamson on 05 Jul 2003, 20:28:41
-
Can someone PLEASE tell me why I can deletevehicle an object that is alive perfectly fine, but if the object is dead it won't be removed!??
I placed down 5 civilians and made it so my deletevehicle script ran 30sec into the map ... I tried it once, they removed fine ... I tried it again killing 2 of them and only the alive ones were removed ... what's with that!!??
-
i dont know, but you could try to move the object off the map, so the player cant see it
-
If you move it off the map it does the same thing for removing lag right??
If you can't see it, it can't hurt you?? ;)
-
i think it would remove the lag, i use it in all of my missions, cause the lag is from what you see, not what is on the map somewhere in the distance. hmmm it might use up more memory tho?
-
how are you deleting them? I just tried naming all of them c1 through c5, then when the trigger fires:
deletevehicle c1
repeated for c2-c5
and they went away both all alive, and I killed them on the next try and went away again
-
Make an array of all units in the beginning of the mission before anyone have died. Use deleteVehicle with this array and you can delete units whenever you want (i.e. deadtime >30 sec).
If you add units "on the fly", you have to update the array to make it work! I have made an "remove all dead"-script that work perfectly! Even for units that have been dead for more than 30 sec's (classical problem)...
Hope this helps! ;D
-
??? OK i don't understand it then .., I'll so some retesting ...
From what I can remember I made a list of a few ppl and shot 2 of them ... I waited 60 seconds and boom the dead ppl son't delete, they only move ... it's very odd ... but i might have written something wrong so let me recheck that ...
(I'm going to see if I defined an array before I deleted them and they already were non-existant)
If you try to delete a dude after he has been dead for like 10 seconds and there is a respawn, the unit's name disappears ... you have to find a way around this (which I have) so wait for a bit while i test then I'll post my results here ...
-
Phelican:
can u email me your script??
borrowed_soap@hotmail.com
thx in advance
-
I'll post it here instead...
-
Well ladiez and gentlemen ... this was amazing or retarded ... I do not know ...
Instead of asking and waiting for ppl to respond i found my errors and ran tests ...
My results:
- it takes about 10ish seconds for a dead name (e.g. player2) to go away ...
- for some reason it takes about 30 seconds for the dead group to empty of the last guy ... (I placed a repeat text counting the ppl in a group and it took 10 after death of each guy to make the displayed number smaller and about 30 seconds for the group to end -turning from 1 in the group to 0-)
- even though the variable may dissolve, as long as is was logged before, the body is still there ... so if you through the dudes name (player2) into an array or something (turns into- EAST: Soldier ...) then when the variable dissolves (weird ass 0xeff909...), the name will still be logged so you can delete it
- you cannot use a trigger detecting the guy after he has dissolved the variable (10-30 secondsish) - you must use the array logging method to delete him
- once the guy dies, he is in the group, but only until his variable dissolves
anything else i forgot i'll add if i remember it or realize something new
I'll leave this thread open temporarily for anyone with any questoins or errors they found in my statement ...
-
i also remembered one more thing: if named in the editor-they don't disappear until respawn, then the name is attached to the new body ... if the unit is not named in the editor but rather through dude1=this then the variable will delete after some time depending an groups and things as i have said above ...