alchemistarkの日記

やったことのメモ

無いと思ったらあった

EntityのOutputをFireする関数。
開発版(1.9系)じゃないと使えない。

github.com

/**
 * Fire a named output on an entity.  
 *
 * After completion (successful or not), the current global variant is re-initialized.
 *
 * @param caller	Entity index from where the output is fired.
 * @param output	Output name.
 * @param activator	Entity index which initiated the sequence of actions (-1 for a NULL entity).
 * @param delay		Delay before firing the output.
 * @error		Invalid entity index or no mod support.
 */
native void FireEntityOutput(int caller, const char[] output, int activator=-1, float delay=0.0); 

例えば

public Action:Cmd_setupend(client, args){
	new ent = -1;
	ent = FindEntityByClassname(ent, "team_round_timer");
	
	if(ent == -1){
		return false;
	}
	
	FireEntityOutput(ent,"OnSetupFinished");
	
}

とかするとセットアップ中にセットアップ終了時のOutputをFireするのでゲートが開く。
あくまでFireするだけなので、セットアップのタイマーは止まらないしそのまま平気でセットアップが続行。
けどゲート開いてるから青はどんどん出て行くでござる。これはひどい