@LabelIndex 420194
@StringIndex 0
class 1 maker_instant_spawn_serial : default_maker {
parameter:
	int	loop_cnt = 0;
	string	maker_name = "spawn_serial_default";
	int	respawn_time = 0;

handler:
	EventHandler ON_START(i0,def0) {
		myself.i_ai0 = loop_cnt;
		super;
	}

	EventHandler ON_NPC_DELETED(deleted_def,i0,i1,maker0,reply) {
		if( reply == 0 && myself.i_ai0 > 0 ) {
			myself.i_ai0 = ( myself.i_ai0 - 1 );
			maker0 = gg::GetNpcMaker(myself.name);
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1001,deleted_def.respawn_time,0);
			}
		} else if( reply == 0 && myself.i_ai0 == 0 ) {
			maker0 = gg::GetNpcMaker(maker_name);
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1001,deleted_def.respawn_time,1);
			}
		}
	}

	EventHandler ON_SCRIPT_EVENT(script_event_arg1,script_event_arg2,script_event_arg3,def0,i0,i1) {
		switch(script_event_arg1) {
			case 1001: {
				if( script_event_arg3 == 1 ) {
					myself.i_ai0 = loop_cnt;
				}
				super;
				break;
			}
		}
	}

}
