示例#1
0
文件: Script.c 项目: 772/openclonk
global func FxBoomAttackTimer(object target, effect, int time)
{
	var wave = 1+time/35/Boomattack_wave_delay;

	if(time/35 % Boomattack_wave_delay == 1)
	{
		var gol = FindObject(Find_ID(Goal_SaveTheWindmills));
		if(gol)
			gol->SetWave(wave);
		if (wave < 13)
		{
			CustomMessage(Format("                   $MsgWave$                   ",wave),nil,NO_OWNER);
			var wave_strength = Sqrt(9+GetPlayerCount()*time/Boomattack_attack_growth);
			CreateAttackWave( Random(360) , wave_strength,Boomattack_angle_spread);
		}
		else if (wave == 13)
		{
			CustomMessage("                   $MsgBoss$                   ",nil,NO_OWNER);
			CreateAttackWave( Random(360) , -1, Boomattack_angle_spread);
			var gol = FindObject(Find_ID(Goal_SaveTheWindmills));
			if(gol) gol->BossAttacks();
		}

	}
}
示例#2
0
global func TutorialMessage(string strMessage)
{
	// Message with speech marker
	if (HasSpeech(strMessage))
		// PlayerMessage will handle the speech output (and it won't show the message)
		PlayerMessage(0, strMessage);
	// Normal message display, in addition to speech output
	if (GetLength(strMessage)) strMessage = Format("@%s", strMessage);
	CustomMessage(strMessage, 0, GetPlayerByIndex(0), g_msgoffx, g_msgoffy, 0xffffff, DECO, "Portrait:SCLK::0000ff::1", g_msgpos | MSG_DropSpeech, g_msgwdt);
}
示例#3
0
global func PlayerControl(int plr, int ctrl, ...)
{
	if (ctrl == CON_TryScreenshot)
	{
		CustomMessage(Format("$MsgCheater$", GetTaggedPlayerName(plr)));
		Sound("UI::Error", true);
		//var crew = GetCursor(plr); - used for cheating
		//if (crew) crew->Punch(crew, 50);
		return true;
	}
	return _inherited(plr, ctrl, ...);
}
示例#4
0
func FxLogTimer(pObj, iNumber)
{
  // Langsam ausfaden	
  if(!--EffectVar(0, pObj, iNumber)) return(-1);
  CustomMessage(Format("     %s", EffectVar(1, pObj, iNumber)), pObj, NO_OWNER, 20, 0, RGBa(255,255,255,Max(255-EffectVar(0, pObj, iNumber)/4)), 0, 0, MSG_NoLinebreak);
}