Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lag issue when triggering scripts
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#7
RE: Lag issue when triggering scripts

I solved one of the major lag problems. The AutoSave(); caused the lag.

However, the problem still remains when making changes with slightly larger entities, such as a roof breaking script seen below:

PHP Code: (Select All)
void RoofScare(string &in asParent, string &in asChild, int alState)
{
    
SetEntityActive("default_entity_1", false);
    
SetEntityActive("default_entity_2", true);
    
SetEntityActive("wooden_board02_*", true);
    
SetEntityActive("wooden_board03_*", true);

    
CreateParticleSystemAtEntity("", "ps_dust_elevator_crash.ps", "Area_BreakDust", false);
    
    
PlaySoundAtEntity("", "break_wood.snt", "Area_BreakDust", 0.0f, false);
} 

Is there anyway to preload specific entities or anyway to make it lag less when activating them?

Creator of The Dark Treasure.
05-30-2013, 07:11 PM
Website Find


Messages In This Thread
RE: Lag issue when triggering scripts - by Linus Ågren - 05-30-2013, 07:11 PM



Users browsing this thread: 1 Guest(s)