Windmill tweaks and fixes

Charles Spurrill 2011-10-14 23:04:16 -07:00
parent 114e127e2f
commit aa7216aa49
3 changed files with 20 additions and 6 deletions

View File

@ -32,6 +32,8 @@ protected func Hit()
return 1;
}
public func IsMillIngredient() { return true; }
local Collectible = 1;
local Name = "$Name$";
local Description = "$Description$";

View File

@ -9,12 +9,12 @@ Height=96
Offset=-25,-48
Vertices=5
VertexX=0,25,15,-15,-25
VertexY=-47,-20,48,48,-20
VertexY=-47,-20,47,47,-20
VertexFriction=50,50,100,100,50
Value=150
Mass=2500
Components=Rock=6;Wood=2;
Collection=-10,35,15,15
Collection=-18,35,15,15
Exclusive=1
BlastIncinerate=100
Construction=1

View File

@ -9,11 +9,16 @@
local wind_anim;
protected func Construction()
{
SetProperty("MeshTransformation", Trans_Rotate(-30,0,1,0));
return _inherited(...);
}
protected func Initialize()
{
SetProperty("MeshTransformation", Trans_Rotate(RandomX(-15,15),0,1,0));
wind_anim = PlayAnimation("Spin", 5, Anim_Const(0), Anim_Const(1000));
// Set initial position
wind_anim = PlayAnimation("Spin", 5, Anim_Const(0), Anim_Const(1000));
Wind2Turn();
return _inherited(...);
}
@ -101,19 +106,26 @@ protected func Collection()
public func FxCrushingTimer(object target, proplist effect, int time)
{
CreateParticle("Axe_WoodChip", -5, 40, 5 - Random(11), RandomX(6,13) * -1, 20, RGB(255,255,255), this);
CreateParticle("Axe_WoodChip", -12, 40, 5 - Random(11), RandomX(6,13) * -1, 20, RGB(255,255,255), this);
return 1;
}
public func OnProductEjection(object product)
{
product->SetPosition(GetX() + 30, GetY() + 40);
product->SetPosition(GetX() + 25, GetY() + 40);
product->SetSpeed(0, -17);
product->SetR(30 - Random(59));
Sound("Pop");
return;
}
protected func RejectCollect(id item, object collect)
{
if(collect->~IsMillIngredient()) return false;
else
return true;
}
func Definition(def) {
SetProperty("PictureTransformation", Trans_Mul(Trans_Translate(2000,0,7000),Trans_Rotate(-20,1,0,0),Trans_Rotate(30,0,1,0)), def);
}