Ravu al Hemio
11-16-2007, 08:53 PM
I'm attempting to write a mutator which would allow transport of orbs and flags in vehicles as chosen by the server administrator.
My first idea -- subclassing UTVehicleFactory and extending the vehicle spawning function -- failed because UTVehicleFactory is subclassed for every single vehicle type, and I want to write a (more or less) end-all, be-all solution for all UTVehicles. My second idea was to monitor whenever a new vehicle is added into the game, check if it's one of the "flag-enabled" ones, and change its properties accordingly. However, the only way I seem to be able to do this efficiently (i.e. not every tick) is to handle the vehicle factory Kismet event (the Spawned event, IIRC).
Enumerating all the VehicleFactories should be very easy, but is there a way I can subscribe to the Spawned event and call an UnrealScript function when it's triggered?
Thanks in advance for answering my impertinent questions. Your assistance is highly appreciated. :D
My first idea -- subclassing UTVehicleFactory and extending the vehicle spawning function -- failed because UTVehicleFactory is subclassed for every single vehicle type, and I want to write a (more or less) end-all, be-all solution for all UTVehicles. My second idea was to monitor whenever a new vehicle is added into the game, check if it's one of the "flag-enabled" ones, and change its properties accordingly. However, the only way I seem to be able to do this efficiently (i.e. not every tick) is to handle the vehicle factory Kismet event (the Spawned event, IIRC).
Enumerating all the VehicleFactories should be very easy, but is there a way I can subscribe to the Spawned event and call an UnrealScript function when it's triggered?
Thanks in advance for answering my impertinent questions. Your assistance is highly appreciated. :D