View Single Post
Zynda
Member
Join Date: Jul 2011
Old 03-18-2021 , 14:12   Re: [L4D2] How to scale the gas can goal in scavenge finales to number of survivors?
Reply With Quote #5

Since the entity we're targeting is most likely always a singleton it should be safe to skip checking the targetname anyway.

Something like this should suffice:

PHP Code:
int index = -1;

while ((
index FindEntityByClassname(index"game_scavenge_progress_display")) != -1)
{
    
SetVariantInt(newTotalCans);
    
AcceptEntityInput(index"SetTotalItems", -1, -1);

Zynda is offline