Home   Help Search Login Register  

Author Topic: Question for advance scripter...memory management  (Read 592 times)

0 Members and 1 Guest are viewing this topic.

frag

  • Guest
Question for advance scripter...memory management
« on: 02 Dec 2002, 11:25:56 »
Hi guys,

I am creating a mission with tons of trigger and units in the 4 corner of the map...

After a player leave a certain zone (without being able to come back)...is it better for me to delete all unit and trigger that I will not use anymore?

Briefly:

1. Anyone saw a performance difference while destroying obsolete objects?
2. Is OFP do not bother with object too far of the player...for increasing is performance?

david-p

  • Guest
Re:Question for advance scripter...memory management
« Reply #1 on: 02 Dec 2002, 13:19:11 »
unfortunately (though there is a reason for it) the game does keep track of everything, everywhere, as long as it is there.
so yes, there is good sense in creating units when needed and destroying units when no longer needed, as this frees up valuable power.
clearing units, you asked, is done very easily: have a trigger, type all, and name it, e.g. TriggerA.
Then, when the player(s) have left the area, get a trigger or script to say "_x setpos [0,0,0]" foreach units list TriggerA. and hurrah the game gets slightly faster :)
the creating units has been answered many times before, id rather go and get some paracetemol than answer it  :-[

one other thing you can do, again using named triggers, is stop out-of-sight units using their waypoints, and set them to careless, so they dont bother even looking around, that will cause the game to think about them less.

frag

  • Guest
Re:Question for advance scripter...memory management
« Reply #2 on: 02 Dec 2002, 21:18:29 »
Thanks David!!!

But about the list command...is it listing all the unit that are inside the trigger (that activate it)?

By the way...are you using DeleteVehicle to delete units...I didn't found aything else.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Question for advance scripter...memory management
« Reply #3 on: 03 Dec 2002, 05:26:58 »
yeah.true, and deletevehicle is the way to go.
If you test it out, though, AI units that are "idling" out of vis range take very little overhead.
Still, if they're not going to be used, delete them.
Dinger/Cfit