![]() |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
![]()
is it now possible with the patch, that groundvehicles and trains get destroyed(disappear) when they reach their last waypoint???
im really looking forward for that possibility, as it would spice up my missions. |
#2
|
|||
|
|||
![]()
At the moment it works good for Planes, but i get no Handle to the Waypoitnts of GroundActors nor is GetCurrentWayPoint() working for GroundGroups, at the moment, so its not possible to check if a Groundactor reached it last waypoint.
![]() |
#3
|
||||
|
||||
![]()
thx for your testing and answering Kodiak...a bit disappointing though..hope this will soon be possible, as i would really like to implement "random" life on the ground...
|
#4
|
|||
|
|||
![]()
onTaskCompleted 'works' on last waypoint as I was told. For aircraft at least, have no idea about ground units.
|
#5
|
||||
|
||||
![]()
according to Kodiak, it doesnt for ground vehicles
|
#6
|
|||
|
|||
![]()
GetCurrentWayPoint() is always 0 by Groundactors:
Code:
public override void OnTickGame() { base.OnTickGame(); AiGroundGroup Group = GamePlay.gpGroundGroups(1)[0]; if (Group != null) GamePlay.gpHUDLogCenter(null, "Waypointnr: {0}", new object[] { Group.GetCurrentWayPoint() }); } Last edited by FG28_Kodiak; 05-08-2012 at 10:31 AM. |
#7
|
||||
|
||||
![]()
but what can be considered as task?do the ground objects have to destroy something, or is reaching a waypoint considered as task as well?
|
#8
|
|||
|
|||
![]()
Groundactors seems are only counted if reached endpoint.
Ok seems to work, but not for trailers. :\ Code:
public override void OnActorTaskCompleted(int missionNumber, string shortName, AiActor actor) { base.OnActorTaskCompleted(missionNumber, shortName, actor); if (actor is AiGroundGroup) { foreach (AiActor ac in (actor as AiGroundGroup).GetItems()) { (ac as AiCart).Destroy(); } } } Last edited by FG28_Kodiak; 05-08-2012 at 10:56 AM. |
#9
|
|||
|
|||
![]()
For ground vehicles I've had success with Onactorceated and a Timeout period then destroy
I set about 10-15 minutes longer than units take to reach endoint. probably still wont remove the trailer though |
#10
|
||||
|
||||
![]() Quote:
i created a mission, with a train, a tank and another vehicle, and neither of them seem to get destroyed if they reach their last waypoint.... ![]() Ps:what do you mean with trailers? |
![]() |
|
|