![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]()
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.
![]() |
#2
|
||||
|
||||
![]()
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...
|
#3
|
|||
|
|||
![]()
onTaskCompleted 'works' on last waypoint as I was told. For aircraft at least, have no idea about ground units.
|
#4
|
||||
|
||||
![]()
according to Kodiak, it doesnt for ground vehicles
|
#5
|
|||
|
|||
![]()
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. |
#6
|
||||
|
||||
![]()
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?
|
#7
|
|||
|
|||
![]()
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. |
#8
|
|||
|
|||
![]()
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 |
#9
|
||||
|
||||
![]() 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? |
#10
|
|||
|
|||
![]() Quote:
Hey David, I've written a solution for random life on the ground but it's collecting dust at the moment as I'm buzy writing "Fighter Command" (will be uses to simulate Chain Home and Observer corps in online sessions). I call the solution "Live Map" and if you're willing to be my tester I would love to send it to you. Currently it's written for offline use but I'm gonna upgrade it for online when I see it works as expected. Are you thinking online or single player for this? LiveMap works by loading and running "sub missions" as you fly over the country side. Most actors that gets activated below will get removed after a set time (I also couldn't get any even when they reached their last waypoint) to reduce workload. There's a few exceptions to that rule. Ships and trains do not get removed as they're much more visible and you'd expect to see them lumbering along somewhere if you return to the region some time after you saw them last. The solution means you'll need to piece together those sub missions for regions you intend to fly over. It's not alot of work and you only need to do it once. The sub missions just gets thrown into a sub folder and you're good to go. Let me know if you're interested.
__________________
Core i7 3930K @ 4.8GHz; 16Gb DDR3 (Vengeance); nVidia GTX580; OS disk: 150Gb 10000rpm; SIM disk: 300Gb 10000rpm; Windows 7 x64 Ultimate |
![]() |
|
|