![]() |
|
|
|
#1
|
|||
|
|||
|
I seem to remember the CS of "CTF_cross_roundel by naryv" has items being cleared after destroyed.
Also only current beta has code for objects as being specific ground items, I cant run the beta without crashing so can't test it. |
|
#2
|
|||
|
|||
|
1) they stay destroyed
2) Radars are no GroundActors they are static objects so you must use the new OnStationaryKilled (works since the latest beta patch) Code:
public override void OnStationaryKilled(GroundStationary _stationary, AiDamageInitiator initiator, int eventArgInt)
{
base.OnStationaryKilled(_stationary, initiator, eventArgInt);
_stationary.Destroy();
}
|
|
#3
|
|||
|
|||
|
Quote:
The end objective is that if the Radar is bombed and destroyed I want it to "despawn" The AiGroundActorType is "Radar", but in the _stationary there is no list for Radar. (_stationary = AiGroundActorType.Radar); Any clue on how I integrate the _Stationary Kill into the get rid of destroyed objects like the Radar?
__________________
__________________ Win7, 64bit Ultra Asus P8P67Pro MB Intel i7-2600K Coursair 16GB (4x 4GB), DDR3-1600MHz Gainward Nvidia 580GTX 3GB DDR5 850-Watt Modular Power Supply WIN7 and COD on Gskill SSD 240GB 40" Panasonic LCD TrackIR5 + Thrustmaster Warthog stick, throttle & pedals Last edited by hc_wolf; 07-26-2012 at 04:35 AM. |
|
#4
|
|||
|
|||
|
Kodiak or anyone? got any cluse on the above? Hels to clean up a mission after bombing runs are complete (less static objects on the map).
__________________
__________________ Win7, 64bit Ultra Asus P8P67Pro MB Intel i7-2600K Coursair 16GB (4x 4GB), DDR3-1600MHz Gainward Nvidia 580GTX 3GB DDR5 850-Watt Modular Power Supply WIN7 and COD on Gskill SSD 240GB 40" Panasonic LCD TrackIR5 + Thrustmaster Warthog stick, throttle & pedals |
|
#5
|
|||
|
|||
|
The stationary object don't use an enumerator (AiGroundActorType), they return strings,
you can get Title = Name of the static; Category = vehicle, aircraft etc. can be empty. Radars are empty. Type = Radar etc. i've not tested all possible values at the moment. Integrate this into the OnStationaryKilled to get the values by yourself. Code:
GamePlay.gpLogServer(null, "OnStationaryKilled: Title: {0}; Category: {1}; Type: {2}", new object[]{_stationary.Title, _stationary.Category, _stationary.Type});
Code:
public override void OnStationaryKilled(GroundStationary _stationary, AiDamageInitiator initiator, int eventArgInt)
{
base.OnStationaryKilled(_stationary, initiator, eventArgInt);
GamePlay.gpLogServer(null, "OnStationaryKilled: Title: {0}; Category: {1}; Type: {2}", new object[]{_stationary.Title, _stationary.Category, _stationary.Type});
if (GamePlay.gpGroundStationarys() != null)
{
foreach (GroundStationary gg in GamePlay.gpGroundStationarys(_stationary.pos.x, _stationary.pos.y, 1000.0))
{
if(_stationary.Type.Equals("Radar"))
gg.Destroy();
}
}
}
Last edited by FG28_Kodiak; 07-26-2012 at 07:30 AM. |
|
#6
|
|||
|
|||
|
In the next patch will be extended capabilities of the method OnStationaryKilled.
|
|
#7
|
|||
|
|||
|
Ok so it's more rough-and-ready at the moment
, hope they integrate the missionNumber so it would be easier to remove the objects. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|