AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [L4D2] question func_button_timed (https://forums.alliedmods.net/showthread.php?t=347127)

Solar1234 04-03-2024 07:43

[L4D2] question func_button_timed
 
Entity A is the parent of entity B, entity B is func_button_timed

Entity A has 10 seconds to be deleted:
PHP Code:

  SetVariantString("OnUser1 ! Self: kill: : 10.0:1 ");
  
AcceptEntityInput(A"AddOutput");
  
AcceptEntityInput(A"FireUser1"); 

When I hook: HookSingleEntityOutput(B, "OnTimeUp", OnTimeUp);

Perform the button progress bar (5 seconds) function in the OnTimeUp callback. If Entity A is deleted within 5 seconds, the player will be frozen

How to solve this problem?

LinLinLin 04-18-2024 06:32

Re: [L4D2] question func_button_timed
 
This is because the button is not disabled before remove it. To due this problem you can hook OnEntityDestory and disabled the button.


All times are GMT -4. The time now is 13:46.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.