![]() |
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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 11:31 AM. |
|
#2
|
||||
|
||||
|
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?
|
|
#3
|
|||
|
|||
|
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 11:56 AM. |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
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? |
|
#6
|
|||
|
|||
|
Yes OnActorTaskComplete sometimes have strange results (not triggered correctly). Additional problem is that it's not possible to get GetWay() on a Groundgroup to work, it's always returns null. So its not possible to check which Waypoint is reached.
|
|
#7
|
||||
|
||||
|
ah ok thats why.....
damn it, i really hope that this is possible soon but thx for your answer |
![]() |
| Thread Tools | |
| Display Modes | |
|
|