Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   patch changes-is it now possible to let ground vehicles&trains disappear(destroy) (http://forum.fulqrumpublishing.com/showthread.php?t=31878)

David198502 05-08-2012 08:55 AM

patch changes-is it now possible to let ground vehicles&trains disappear(destroy)
 
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.

FG28_Kodiak 05-08-2012 09:37 AM

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. :???:

David198502 05-08-2012 09:39 AM

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...

Ataros 05-08-2012 10:19 AM

onTaskCompleted 'works' on last waypoint as I was told. For aircraft at least, have no idea about ground units.

David198502 05-08-2012 10:20 AM

according to Kodiak, it doesnt for ground vehicles

FG28_Kodiak 05-08-2012 10:26 AM

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() });

    }

OnActorTaskCompleted often deliver strange results. But will testing it again. Maybe it works now.

David198502 05-08-2012 10:34 AM

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?

FG28_Kodiak 05-08-2012 10:54 AM

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();
            }
        }
    }


Smokeynz 05-08-2012 12:45 PM

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

David198502 06-18-2012 07:41 AM

Quote:

Originally Posted by FG28_Kodiak (Post 421808)
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();
            }
        }
    }


hey kodiak,.....i dont know, but for me, it doesnt seem to work.

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....:confused:
Ps:what do you mean with trailers?


All times are GMT. The time now is 10:54 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.