Announcement

Collapse
No announcement yet.

Help on Vehicle Spawning

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help on Vehicle Spawning

    I'm learning UnrealScript, and trying to make some UT2004 Mutators...

    Within a Timer() I use ONSVehicleFactory.SpawnVehicle() to ensure there are enough of them for everyone..

    But the SpawnVehicle() function also spawn's if the "connected" PowerNode isn't constructed. I didn't find any variable/function that tells me about this.

    could someone please give me hint how to check this condition?

    or is it even better not to use the timer for that purpose?

    thanks for any help,
    lupo

    #2
    if you yust looked at the code of onsvehiclefactory
    Code:
    function Timer()
    {
    	if (bActive && Level.Game.bAllowVehicles && VehicleCount < MaxVehicleCount)
    	{
            if (bPreSpawn)
            {
                bPreSpawn = False;
                SpawnBuildEffect();
                SetTimer(PreSpawnEffectTime, False);
            }
            else
        	   SpawnVehicle();
        }
    }
    so, yust check if bActive is true.
    better is to yust activate the timer of onsvehiclefactory, so you get the buildeffect

    Comment


      #3
      Sounds good

      Thanks for the advice!
      I'll try that when I'm at home again...

      greetz,
      lupo

      Comment


        #4
        yeah, this bActive was exactly what I needed!
        thanks!

        Comment

        Working...
        X