Results 1 to 5 of 5
  1. #1

    Question Handling Kismet events in UnrealScript

    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.
    ~~ Ravu al Hemio

  2. #2
    Redeemer
    Join Date
    Aug 2004
    Location
    Netherlands
    Posts
    1,677
    Gamer IDs

    Gamertag: Jrubzjeknf

    Default

    You should be able to use a function in the Mutator class (though I always mess up with what which function does ). When a vehicle is spawned, it will be passed through there and then you can change the bCanCarryFlag when appropiate.
    My Work: MantarunAssist - TeamSpecificActors_v2 - UT2k4ScoreRecovery_v3

    Quote Originally Posted by rhiridflaidd View Post
    I remember when I first saw a cicada in-game and had a shock vs cicada duel (I had the shock.)

    The shock did nothing, and the cicada couldn't hit me no matter how he tried. We both walked\flew away bored after a while.

  3. #3

    Default

    Is it CheckReplacement? I thought that was only called for each object already placed on the map (by the mapper), but I may be wrong. I should probably check it.
    ~~ Ravu al Hemio

  4. #4
    Redeemer
    Join Date
    Aug 2004
    Location
    Netherlands
    Posts
    1,677
    Gamer IDs

    Gamertag: Jrubzjeknf

    Default

    Log it.
    My Work: MantarunAssist - TeamSpecificActors_v2 - UT2k4ScoreRecovery_v3

    Quote Originally Posted by rhiridflaidd View Post
    I remember when I first saw a cicada in-game and had a shock vs cicada duel (I had the shock.)

    The shock did nothing, and the cicada couldn't hit me no matter how he tried. We both walked\flew away bored after a while.

  5. #5

    Default

    <-- This guy is stupid.

    Seriously, CheckReplacement is called for every*spawn... and I was trying to build a molehill with a bulldozer.

    I got it to work and might be releasing soon.
    ~~ Ravu al Hemio


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.