Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

Legacy:VitalOverdose/AllMapVehicleFactory

From Unreal Wiki, The Unreal Engine Documentation Site
< Legacy:VitalOverdose
Revision as of 06:09, 14 September 2011 by Vitaloverdose (Talk | contribs) (Related)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT2004 :: Actor >> SVehicleFactory >> ASVehicleFactory >> AllMapVehicleFactory (Package: custom)

by VitalOverdose

Overview

This is a modified ASVehicleFactory that will work in all gametypes. It works by overwriting the post begin play function and adding a small bit of code that scans for the GameInfo actor in the level.

The Script

class AllMapVehicleFactory Extends AsVehiclefactory
Placeable;
 
// Generic function : overwriting : adding 'simulated' before function name so it works online.
simulated Function PostBeginPlay()
{
if (!Level.Game.bAllowVehicles)           
     Level.Game.bAllowVehicles = True;// changes the bAllowVehicles value 
Super.PostBeginPlay();                // any function related code from the parent function is inserted here.
}

Related

Discusion

VitalOverdose - Credit to Tarquin for pointing out the correct way to reference the GameInfo actor.