Scripting:TWTriggerAIEcologyDespawn: Difference between revisions

Building pieces of another world.
Jump to navigation Jump to search
gravatar The Watcher [userbureaucratsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
(Created page with "TWTriggerAIEcologyDespawn is a script that despawns slain AIs, generally ones spawned by TWTrapAIEcology and it informs the AIEcology that the AI...")
 
gravatar The Watcher [userbureaucratsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
No edit summary
 
Line 1: Line 1:
TWTriggerAIEcologyDespawn is a script that despawns slain AIs, generally ones spawned by [[Scripting:TWTrapAIEcology|TWTrapAIEcology]] and it informs the AIEcology that the AI has been despawned. Use this script to remove AI corpses that would normally remain on the map so that the game can reuse the object ID.
TWTriggerAIEcologyDespawn is a script that despawns slain AIs, generally ones spawned by [[Scripting:TWTrapAIEcology|TWTrapAIEcology]] and it informs the AIEcology that the AI has been despawned. Use this script to remove AI corpses that would normally remain on the map so that the game can reuse the object ID.


If an AI despawns itself - that is, it doesn't leave a visible corpse - you should use [[Scripting:TWTrapAIEcologySlain|TWTrapAIEcologySlain]] to update the AIEcology instead of this script, as the AI may despawn before this script updates the AIEcology.
If an AI despawns itself - that is, it doesn't leave a visible corpse - you should use [[Scripting:TWTriggerAIEcologySlain|TWTriggerAIEcologySlain]] to update the AIEcology instead of this script, as the AI may despawn before this script updates the AIEcology.





Latest revision as of 18:34, 22 June 2020

TWTriggerAIEcologyDespawn is a script that despawns slain AIs, generally ones spawned by TWTrapAIEcology and it informs the AIEcology that the AI has been despawned. Use this script to remove AI corpses that would normally remain on the map so that the game can reuse the object ID.

If an AI despawns itself - that is, it doesn't leave a visible corpse - you should use TWTriggerAIEcologySlain to update the AIEcology instead of this script, as the AI may despawn before this script updates the AIEcology.


Design Note Parameters

This script supports all the following arguments in the Editor -> Design Note in addition to the arguments given in the TWBaseScript and TWBaseTrigger documentation.

TWTriggerAIEcologyDespawnRate
Type: time
Default: 2m
This is the delay between an AI being slain and each attempt to despawn the AI. If the AI is visible, and TWTriggerAIEcologyDespawnVisible is false, the AI is not despawned and the script waits for this period before trying again.
TWTrapAIEcologyDespawnVisible
Type: boolean
Default: false
If set to true, no visibility checks are done on when despawning slain AIs, and they will be despawned even when they are on screen.

See also


Authors

  • gravatar The Watcher [userbureaucratsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+]