Results 1 to 3 of 3

Thread: precaching

  1. #1
    Join Date
    Jul 2003
    Location
    In front of context!
    Posts
    326

    precaching

    greetings
    i need help in my tc cause when i start a game the first time I select a weapon i have a HUGE slowdown for 2 secs
    but when i reselect it everything goes smooth and such
    same with my new vehicle i made
    so my question is easy
    how do i precache my weapons, vehicles, chars please?

    using:

    Code:
    static function StaticPrecache(LevelInfo L)
    {
        Super.StaticPrecache(L);
    
    	L.AddPrecacheStaticMesh(StaticMesh'ONSDeadVehicles-SM.HELLbenderExploded.HellTire');
    
    }
    
    simulated function UpdatePrecacheStaticMeshes()
    {
    	Level.AddPrecacheStaticMesh(StaticMesh'ONSDeadVehicles-SM.HELLbenderExploded.HellTire');
    
    
        Super.UpdatePrecacheStaticMeshes();
    }
    
    simulated function UpdatePrecacheMaterials()
    {
        
        Level.AddPrecacheMaterial(Material'VMVehicles-TX.NEWprvGroup.prvTAGSCRIPTED');
    
    	Super.UpdatePrecacheMaterials();
    }

    or using
    Code:
    #exec OBJ LOAD FILE=..\Animations\ONSVehicles-A.ukx
    #exec OBJ LOAD FILE=..\Sounds\ONSVehicleSounds-S.uax
    #exec OBJ LOAD FILE=..\textures\VehicleFX.utx
    or any other method i dont know yet???

    i hope you can help me
    jack

  2. #2
    Join Date
    Apr 2004
    Posts
    2
    The last man standing gametype uses this to precache all the weapons
    Code:
    // Make sure all weapons are loaded.
    static function PrecacheGameTextures(LevelInfo myLevel)
    {
    	Super.PrecacheGameTextures(myLevel);
    
    	class'XWeapons.BioRiflePickup'.static.StaticPrecache(myLevel);
    	class'XWeapons.FlakCannonPickup'.static.StaticPrecache(myLevel);
    	class'XWeapons.LinkGunPickup'.static.StaticPrecache(myLevel);
    	class'XWeapons.MinigunPickup'.static.StaticPrecache(myLevel);
    	class'XWeapons.RocketLauncherPickup'.static.StaticPrecache(myLevel);
    	class'XWeapons.ShockRiflePickup'.static.StaticPrecache(myLevel);
    	class'XWeapons.SniperRiflePickup'.static.StaticPrecache(myLevel);
    }
    Maybe something simular would work for your tc.

    -Werefox

  3. #3
    Join Date
    Jul 2003
    Location
    In front of context!
    Posts
    326
    this only seems to precache the classes
    i need everything to be precached
    i know, it will take longer at loading but then no slowdowns ingame which is a lot better

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •