Example #1
0
func FxFireDashStop(object target, proplist effect, int reason, bool temporary)
{
	if(temporary)
		return;
	
	target->Unstuck();
	target->SetObjectLayer(nil);
	
	target->SetAction("Jump");
	ExplosionEffect(effect.Size2, target->GetX(), target->GetY(),0,0,0);
	
	for(var o in FindObjects(Find_Distance(effect.Size2, target->GetX(), target->GetY()), Find_Func("CanBeHit", target)))
	{
		if(o->GetOwner() == target->GetOwner())
			continue;
			
		var angle = Angle(target->GetX(), target->GetY(), o->GetX(), o->GetY());
		
		o->AddFireHitEffect();
		o->Fling(Sin(angle, 8), -Cos(angle, 8) - 2);
		target->WeaponDamage(o, effect.SpellDamage2);
	}
	
	target->CastObjects(Flame, RandomX(6,8), RandomX(10,25));
	//effect.marker->RemoveObject();
	//effect.clonk->MakeHitable(true);

}
Example #2
0
func Dlg_Pyrit_Init(object clonk)
{
	// Clonk moves slowly.
	clonk.ActMap = { Prototype = Clonk.ActMap, Walk = { Prototype = Clonk.ActMap.Walk } };
	clonk.ActMap.Walk.Speed /= 3;
	clonk->SetAction("Walk");
	// Hammering animation
	AddEffect("PyritHammering", clonk, 1, Pyrit_Hammer_SwingTime+5, this);
	return true;
}
Example #3
0
func Dlg_Lara_Init(object clonk)
{
	// Clonk movement speed adjustment.
	clonk.ActMap = { Prototype = Clonk.ActMap, Walk = { Prototype = Clonk.ActMap.Walk } };
	clonk.ActMap.Walk.Speed /= 2;
	clonk->SetAction("Walk");
	// Carrying stuff around
	AddEffect("LaraWalking", clonk, 1, 12, this);
  return true;
}
Example #4
0
func Dlg_Pyrit_Init(object clonk)
{
	// Pyit has a red hat!
	clonk->AttachMesh(Hat, "skeleton_head", "main", Trans_Translate(5500, 0, 0));
	// Clonk moves slowly.
	clonk.ActMap = { Prototype = Clonk.ActMap, Walk = { Prototype = Clonk.ActMap.Walk } };
	clonk.ActMap.Walk.Speed /= 3;
	clonk->SetAction("Walk");
	// Hammering animation
	AddEffect("PyritHammering", clonk, 1, Pyrit_Hammer_SwingTime+5, this);
	return true;
}
Example #5
0
func FxAttack_PanicStart(object c, proplist fx, int temp)
{
	if (temp) return;
	// high walk speed
	c.ActMap = { Prototype = Clonk.ActMap, Walk = { Prototype = Clonk.ActMap.Walk } };
	c.ActMap.Walk.Speed = c.ActMap.Walk.Speed * 3 / 2;
	c->SetAction("Walk");
	// drop heavy stuff
	var item = c->Contents();
	if (item && item->~IsBarrel()) item->Exit();
	// start running
	FxAttack_PanicTimer(c, fx, 0);
	return FX_OK;
}
Example #6
0
public func ControlUse(object clonk, int x, int y)
{
	x = LandscapeWidth() / 2 + 100;
	y = baseHeight - 20;	
	DrawParticleLine("Flash", 0,0,-GetX()+x,-GetY()+y, 3, 0, 0, 8, {Prototype = Particles_Flash(), Size = 20, R = 50, G = 50, B = 255});

	// Make sure the clonk loses the attach procedure.
	var action = clonk->GetAction();
	if (action && clonk.ActMap[action].Procedure == DFA_ATTACH)
		clonk->SetAction("Jump");
	clonk->SetPosition(x, y);
	clonk->SetXDir(0);
	clonk->SetYDir(-5);

	RemoveObject();	
	return 1;
}