![]() |
Destroy static objects by script
I'm using GamePlay.gpPostMissionLoad(MakeNewStaticSection()) ; to load a new mission section after battle start. The [Stationary] section is constructed by script & contains only stationary objects (not Ai actors). It spawns statics OK. Does anyone have a method by which I can destroy those statics after a period of time? Perhaps by capturing the mission number or storing the static names?
|
salmo -
I use the OnActorCreated to create a list of actors created. It picks up statics that are Artillery, Ships, AAGuns, etc. It does not pick up static objects like fuel barrels, fire extinguisher, etc. Each actor created is stored in a list that I can go through at mission end to destroy them. Code:
private Dictionary<String, AiActor> allActors = new Dictionary<String, AiActor>(); WildWillie |
Quote:
|
At the moment it's not possible, if i inform correctly this feature will be added in a future Patch by the devs.
|
Quote:
|
Let enemy tanks to destroy them. I do not know any other method.
It might be though that you can store their POS (location) into a database and then destroy them based on POS. PS. Did not see Kodiak's reply. |
Thankyou Ataros, I'll keep exploring possible techniques.
|
I don't know, but i think Ataros misinterpreted your question.
With destroy we mean the remove of a object from a map. The class member to use is Destroy(), the problem with the static objects is that there is no way to get a handler to them. Normally we can use GamePlay.gpActorByName(Name) but if we insert the Name of a static object. The Value is Null, so it's not possible. Also can we use a List to store them but with OnActorCreated we get only AiActors and no statics. But maybe there is a way, but i never found it. :rolleyes: |
Yes, it certainly is tricky Kodiak :confused: With the method I have to get statics in-game, I can trap their x,y pos & static name, but as you say, there is no easy method to destroy them (remove them from mission/battle)
|
All times are GMT. The time now is 11:06 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.