Windmill-eating rockets - v.1.0
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
@ -3,46 +3,39 @@
|
|||
protected func Initialize()
|
||||
{
|
||||
if(ObjectCount(Find_ID(Grass))>1) RemoveObject(); //Failsafe to stop creation of more than one grass controller.
|
||||
SetGrassDensity(85);
|
||||
PlaceGrass(85);
|
||||
}
|
||||
|
||||
global func SetGrassDensity(int iAmount) //Allows a scenario to change the percentage of earth covered in grass on Initialize().
|
||||
global func PlaceGrass(int iAmount, int start, int end)
|
||||
{
|
||||
for(var allgrass in FindObjects(Find_ID(Grass)))
|
||||
allgrass->RemoveObject();
|
||||
|
||||
FindObject(Find_ID(Environment_Grass))->PlaceGrass(iAmount);
|
||||
}
|
||||
|
||||
public func PlaceGrass(int iAmount)
|
||||
{
|
||||
SetPosition();
|
||||
|
||||
var x=0;
|
||||
while(x<LandscapeWidth())
|
||||
if(!start)
|
||||
start = 0;
|
||||
|
||||
if(!end)
|
||||
end = LandscapeWidth();
|
||||
|
||||
var x=start;
|
||||
while(x<end)
|
||||
{
|
||||
var y = MaterialDepthCheck(x,0,"Sky");
|
||||
var y = MaterialDepthCheck(AbsX(x),0,"Sky");
|
||||
|
||||
if(GetMaterial(x,y) == Material("Earth"))
|
||||
{
|
||||
if(Random(100)>(100-iAmount)) GrowGrass(x,y);
|
||||
if(GetMaterial(AbsX(x),AbsY(y)) == Material("Earth"))
|
||||
{
|
||||
if(Random(100)>(100-iAmount))
|
||||
{
|
||||
var rot;
|
||||
//Rotates grass to form to terrain.
|
||||
if(!GBackSolid(AbsX(x+6),AbsY(y+3))) rot=40;
|
||||
if(!GBackSolid(AbsX(x-6),AbsY(y+3))) rot=-40;
|
||||
if(!GBackSolid(AbsX(x-6),AbsY(y+3)) && !GBackSolid(AbsX(x+6),AbsY(y+3))) rot=0;
|
||||
var grass=CreateObject(Grass,AbsX(x),AbsY(y+3));
|
||||
grass->SetR(rot);
|
||||
grass->DoCon(Random(50));
|
||||
}
|
||||
}
|
||||
|
||||
x+=9;
|
||||
}
|
||||
|
||||
x+=9;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public func GrowGrass(int x, int y)
|
||||
{
|
||||
var rot;
|
||||
//Rotates grass to form to terrain.
|
||||
if(!GBackSolid(x+6,y+3)) rot=40;
|
||||
if(!GBackSolid(x-6,y+3)) rot=-40;
|
||||
if(!GBackSolid(x-6,y+3) && !GBackSolid(x+6,y+3)) rot=0;
|
||||
var grass=CreateObject(Grass,x,y+3);
|
||||
grass->SetR(rot);
|
||||
grass->DoCon(Random(50));
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
|
|
|
@ -21,9 +21,9 @@ public func Update()
|
|||
// short desc
|
||||
var hudinfo = goal->~GetShortDescription(GetOwner());
|
||||
if(hudinfo)
|
||||
CustomMessage(Format("@%s",hudinfo), this, GetOwner(), 0, 75);
|
||||
CustomMessage(Format("@%s",hudinfo), this, GetOwner(), 0, 90);
|
||||
else
|
||||
CustomMessage("", this, GetOwner(), 0, 75);
|
||||
CustomMessage("", this, GetOwner(), 0, 90);
|
||||
|
||||
SetGraphics(nil,goal->GetID(),1,GFXOV_MODE_IngamePicture);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ public func Update()
|
|||
{
|
||||
var val = GetWealth(GetOwner());
|
||||
|
||||
CustomMessage(Format("@%d",val), this, GetOwner(), 0, 75);
|
||||
CustomMessage(Format("@%d",val), this, GetOwner(), 0, 90);
|
||||
|
||||
var num;
|
||||
if(val < 180) num = 4;
|
||||
|
|
|
@ -185,69 +185,13 @@ func Launch(int angle, object clonk)
|
|||
SetVelocity(angle,60);
|
||||
}
|
||||
|
||||
func DoFireworks(int speed)
|
||||
func DoFireworks()
|
||||
{
|
||||
RemoveEffect("Flight",this);
|
||||
|
||||
var color = HSL(Random(8)*32,255,127);
|
||||
|
||||
if(!speed) speed = 12;
|
||||
for(var i=0; i<36; ++i)
|
||||
{
|
||||
var oangle = Random(70);
|
||||
var num = AddEffect("Firework", nil, 300, 1, nil, GetID(), Cos(oangle,speed), i*10+Random(5), GetX(), GetY());
|
||||
EffectVar(4,nil,num) = color;
|
||||
}
|
||||
|
||||
for(var i=0; i<16; ++i)
|
||||
{
|
||||
CreateParticle("ExploSmoke",RandomX(-80,80),RandomX(-80,80),0,0,RandomX(500,700),RGBa(255,255,255,90));
|
||||
}
|
||||
CastParticles("Spark",60,190,0,0,40,70,color,color);
|
||||
|
||||
CreateParticle("Flash",0,0,0,0,3500,color | (200 & 255)<<24);
|
||||
|
||||
Fireworks();
|
||||
Explode(30);
|
||||
}
|
||||
|
||||
func FxFireworkStart(object target, int num, int tmp, speed, angle, x, y, color)
|
||||
{
|
||||
if(tmp) return;
|
||||
|
||||
EffectVar(0, target, num) = speed*100;
|
||||
EffectVar(1, target, num) = angle;
|
||||
EffectVar(2, target, num) = x*100;
|
||||
EffectVar(3, target, num) = y*100;
|
||||
}
|
||||
|
||||
func FxFireworkTimer(object target, int num, int time)
|
||||
{
|
||||
var speed = EffectVar(0, target, num);
|
||||
var angle = EffectVar(1, target, num);
|
||||
var x = EffectVar(2, target, num);
|
||||
var y = EffectVar(3, target, num);
|
||||
|
||||
if(time > 65) return -1;
|
||||
|
||||
if(GBackSemiSolid(x/100,y/100)) return -1;
|
||||
|
||||
// loose speed
|
||||
speed = 25*speed/26;
|
||||
|
||||
var xdir = Sin(angle,speed);
|
||||
var ydir = -Cos(angle,speed);
|
||||
|
||||
CreateParticle("Flash",x/100,y/100,xdir/100,ydir/100,50,EffectVar(4, target, num) | (200 & 255)<<24);
|
||||
|
||||
// gravity
|
||||
ydir += GetGravity()*18/100;
|
||||
|
||||
EffectVar(0, target, num) = speed;
|
||||
EffectVar(1, target, num) = Angle(0,0,xdir,ydir);
|
||||
EffectVar(2, target, num) = x+xdir;
|
||||
EffectVar(3, target, num) = y+ydir;
|
||||
}
|
||||
|
||||
func SetFuel(int new)
|
||||
{
|
||||
fuel = new;
|
||||
|
|
|
@ -96,7 +96,7 @@ public func DoPower(int iDoPower)
|
|||
|
||||
protected func Initialize()
|
||||
{
|
||||
AddEffect("ShowPower",this,100,10,this);
|
||||
//AddEffect("ShowPower",this,100,10,this);
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,9 @@ func Wind2Turn()
|
|||
|
||||
// Number of frames for one revolution: the more wind the more
|
||||
// revolutions per frame.
|
||||
var l = 7200/Abs(GetWind());
|
||||
var wind = Abs(GetWind());
|
||||
if(wind == 0) wind = 1;
|
||||
var l = 4500/wind;
|
||||
|
||||
// Note ending is irrelevant since this is called again after 35 frames
|
||||
if(l > 0)
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
// TODO: docs
|
||||
|
||||
#strict 2
|
||||
|
||||
global func Explode(int iLevel) {
|
||||
// Viewport wackeln
|
||||
ShakeViewPort(iLevel, nil, GetX(), GetY());
|
||||
|
@ -343,3 +341,65 @@ global func FxSmokeTrailTimer(object pTarget, int iEffectNumber, int iEffectTime
|
|||
EffectVar(3, pTarget, iEffectNumber) = iY;
|
||||
EffectVar(5, pTarget, iEffectNumber) = iYDir;
|
||||
}
|
||||
|
||||
/* ------------------ Fireworks ---------------------- */
|
||||
|
||||
global func Fireworks(int color, int x, int y)
|
||||
{
|
||||
if(!color)
|
||||
color = HSL(Random(8)*32,255,127);
|
||||
|
||||
var speed = 12;
|
||||
for(var i=0; i<36; ++i)
|
||||
{
|
||||
var oangle = Random(70);
|
||||
var num = AddEffect("Firework", nil, 300, 1, nil, nil, Cos(oangle,speed), i*10+Random(5), x+GetX(), y+GetY());
|
||||
EffectVar(4,nil,num) = color;
|
||||
}
|
||||
|
||||
for(var i=0; i<16; ++i)
|
||||
{
|
||||
CreateParticle("ExploSmoke",RandomX(-80,80),RandomX(-80,80),0,0,RandomX(500,700),RGBa(255,255,255,90));
|
||||
}
|
||||
CastParticles("Spark",60,190,0,0,40,70,color,color);
|
||||
|
||||
CreateParticle("Flash",0,0,0,0,3500,color | (200 & 255)<<24);
|
||||
}
|
||||
|
||||
global func FxFireworkStart(object target, int num, int tmp, speed, angle, x, y, color)
|
||||
{
|
||||
if(tmp) return;
|
||||
|
||||
EffectVar(0, target, num) = speed*100;
|
||||
EffectVar(1, target, num) = angle;
|
||||
EffectVar(2, target, num) = x*100;
|
||||
EffectVar(3, target, num) = y*100;
|
||||
}
|
||||
|
||||
global func FxFireworkTimer(object target, int num, int time)
|
||||
{
|
||||
var speed = EffectVar(0, target, num);
|
||||
var angle = EffectVar(1, target, num);
|
||||
var x = EffectVar(2, target, num);
|
||||
var y = EffectVar(3, target, num);
|
||||
|
||||
if(time > 65) return -1;
|
||||
|
||||
if(GBackSemiSolid(x/100,y/100)) return -1;
|
||||
|
||||
// loose speed
|
||||
speed = 25*speed/26;
|
||||
|
||||
var xdir = Sin(angle,speed);
|
||||
var ydir = -Cos(angle,speed);
|
||||
|
||||
CreateParticle("Flash",x/100,y/100,xdir/100,ydir/100,50,EffectVar(4, target, num) | (200 & 255)<<24);
|
||||
|
||||
// gravity
|
||||
ydir += GetGravity()*18/100;
|
||||
|
||||
EffectVar(0, target, num) = speed;
|
||||
EffectVar(1, target, num) = Angle(0,0,xdir,ydir);
|
||||
EffectVar(2, target, num) = x+xdir;
|
||||
EffectVar(3, target, num) = y+ydir;
|
||||
}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Connect by pressing dig double.
|
||||
|
|
@ -12,29 +12,6 @@ public func IsProjectileTarget(target,shooter)
|
|||
public func QueryCatchBlow(obj)
|
||||
{
|
||||
// obj->Schedule("RemoveObject", 1);
|
||||
DoFireworks();
|
||||
Fireworks();
|
||||
return 1;
|
||||
}
|
||||
|
||||
func DoFireworks(int speed)
|
||||
{
|
||||
var color = HSL(Random(8)*32,255,127);
|
||||
|
||||
if(!speed) speed = 12;
|
||||
for(var i=0; i<36; ++i)
|
||||
{
|
||||
var oangle = Random(70);
|
||||
var num = AddEffect("Firework", nil, 300, 1, nil, Boompack, Cos(oangle,speed), i*10+Random(5), GetX(), GetY());
|
||||
EffectVar(4,nil,num) = color;
|
||||
}
|
||||
|
||||
for(var i=0; i<16; ++i)
|
||||
{
|
||||
CreateParticle("ExploSmoke",RandomX(-80,80),RandomX(-80,80),0,0,RandomX(500,700),RGBa(255,255,255,90));
|
||||
}
|
||||
CastParticles("Spark",60,190,0,0,40,70,color,color);
|
||||
|
||||
CreateParticle("Flash",0,0,0,0,3500,color | (200 & 255)<<24);
|
||||
|
||||
Explode(30);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
[DefCore]
|
||||
id=Boomattack
|
||||
Version=4,9,10,10
|
||||
Category=C4D_Object
|
||||
MaxUserSelect=15
|
||||
ContactCalls=1
|
||||
Width=15
|
||||
Height=27
|
||||
Offset=-7,-13
|
||||
Vertices=4
|
||||
VertexX=0,0,-6,6
|
||||
VertexY=4,-9,15,15
|
||||
VertexCNAT=4,8,1,2
|
||||
VertexFriction=80,60,60,60
|
||||
Rotate=1
|
||||
StretchGrowth=1
|
||||
Oversize=1
|
|
@ -1,6 +1,6 @@
|
|||
<mesh>
|
||||
<submeshes>
|
||||
<submesh material="Boompack" usesharedvertices="false">
|
||||
<submesh material="Boompack_Big" usesharedvertices="false">
|
||||
<faces count="96">
|
||||
<face v1="0" v2="1" v3="2"/>
|
||||
<face v1="0" v2="2" v3="3"/>
|
||||
|
@ -102,362 +102,362 @@
|
|||
<geometry vertexcount="72">
|
||||
<vertexbuffer positions="true" normals="true" texture_coords="1">
|
||||
<vertex>
|
||||
<position x="3.651916" y="1.525619" z="1.526121"/>
|
||||
<position x="7.303831" y="3.051237" z="3.052242"/>
|
||||
<normal x="0.931781" y="0.362568" z="0.018128"/>
|
||||
<texcoord u="0.217202" v="0.654662"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="3.955022" y="1.644331" z="7.054191"/>
|
||||
<position x="7.910044" y="3.288663" z="14.108381"/>
|
||||
<normal x="0.892667" y="0.347374" z="0.287189"/>
|
||||
<texcoord u="0.243307" v="0.424938"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="4.237127" y="0.046339" z="7.054356"/>
|
||||
<position x="8.474254" y="0.092678" z="14.108711"/>
|
||||
<normal x="0.957642" y="-0.020662" z="0.287219"/>
|
||||
<texcoord u="0.297007" v="0.436310"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="3.911990" y="0.052429" z="1.526273"/>
|
||||
<position x="7.823981" y="0.104858" z="3.052546"/>
|
||||
<normal x="0.999602" y="-0.021577" z="0.018159"/>
|
||||
<texcoord u="0.285460" v="0.659356"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="3.886232" y="-1.537970" z="7.054551"/>
|
||||
<position x="7.772465" y="-3.075939" z="14.109102"/>
|
||||
<normal x="0.876824" y="-0.385552" z="0.287280"/>
|
||||
<texcoord u="0.349557" v="0.440502"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="3.588503" y="-1.408147" z="1.526453"/>
|
||||
<position x="7.177005" y="-2.816293" z="3.052906"/>
|
||||
<normal x="0.915244" y="-0.402489" z="0.018190"/>
|
||||
<texcoord u="0.353117" v="0.660408"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="2.955760" y="-2.867399" z="7.054747"/>
|
||||
<position x="5.911519" y="-5.734797" z="14.109493"/>
|
||||
<normal x="0.662511" y="-0.691748" z="0.287338"/>
|
||||
<texcoord u="0.402193" v="0.437853"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="2.730701" y="-2.633750" z="1.526633"/>
|
||||
<position x="5.461401" y="-5.267499" z="3.053265"/>
|
||||
<normal x="0.691534" y="-0.722114" z="0.018220"/>
|
||||
<texcoord u="0.420433" v="0.657763"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.587364" y="-3.739554" z="7.054912"/>
|
||||
<position x="3.174728" y="-7.479108" z="14.109823"/>
|
||||
<normal x="0.347335" y="-0.892615" z="0.287396"/>
|
||||
<texcoord u="0.456197" v="0.428086"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.469177" y="-3.437792" z="1.526785"/>
|
||||
<position x="2.938354" y="-6.875584" z="3.053571"/>
|
||||
<normal x="0.362567" y="-0.931779" z="0.018250"/>
|
||||
<texcoord u="0.487701" v="0.651673"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-0.010628" y="-4.021658" z="7.055023"/>
|
||||
<position x="-0.021256" y="-8.043316" z="14.110045"/>
|
||||
<normal x="-0.020662" y="-0.957578" z="0.287432"/>
|
||||
<texcoord u="0.513332" v="0.410160"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-0.004012" y="-3.697867" z="1.526887"/>
|
||||
<position x="-0.008025" y="-7.395733" z="3.053774"/>
|
||||
<normal x="-0.021577" y="-0.999600" z="0.018281"/>
|
||||
<texcoord u="0.555237" v="0.642766"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.594937" y="-3.670763" z="7.055060"/>
|
||||
<position x="-3.189873" y="-7.341527" z="14.110121"/>
|
||||
<normal x="-0.385582" y="-0.876761" z="0.287432"/>
|
||||
<texcoord u="0.576608" v="0.381594"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.464588" y="-3.374379" z="1.526923"/>
|
||||
<position x="-2.929175" y="-6.748758" z="3.053846"/>
|
||||
<normal x="-0.402488" y="-0.915243" z="0.018281"/>
|
||||
<texcoord u="0.622156" v="0.632130"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.464588" y="-3.374379" z="1.526923"/>
|
||||
<position x="-2.929175" y="-6.748758" z="3.053846"/>
|
||||
<normal x="-0.402488" y="-0.915243" z="0.018281"/>
|
||||
<texcoord u="0.623116" v="0.630709"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.594937" y="-3.670763" z="7.055060"/>
|
||||
<position x="-3.189873" y="-7.341527" z="14.110121"/>
|
||||
<normal x="-0.385582" y="-0.876761" z="0.287432"/>
|
||||
<texcoord u="0.576859" v="0.380308"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-2.924365" y="-2.740289" z="7.055023"/>
|
||||
<position x="-5.848730" y="-5.480578" z="14.110045"/>
|
||||
<normal x="-0.691758" y="-0.662459" z="0.287434"/>
|
||||
<texcoord u="0.513665" v="0.409055"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-2.690190" y="-2.516577" z="1.526887"/>
|
||||
<position x="-5.380380" y="-5.033154" z="3.053774"/>
|
||||
<normal x="-0.722113" y="-0.691533" z="0.018281"/>
|
||||
<texcoord u="0.556227" v="0.641537"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-3.796520" y="-1.371893" z="7.054912"/>
|
||||
<position x="-7.593039" y="-2.743786" z="14.109823"/>
|
||||
<normal x="-0.892625" y="-0.347308" z="0.287399"/>
|
||||
<texcoord u="0.456581" v="0.427145"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-3.494233" y="-1.255054" z="1.526785"/>
|
||||
<position x="-6.988466" y="-2.510108" z="3.053571"/>
|
||||
<normal x="-0.931779" y="-0.362567" z="0.018250"/>
|
||||
<texcoord u="0.488716" v="0.650637"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-4.078623" y="0.226099" z="7.054747"/>
|
||||
<position x="-8.157246" y="0.452198" z="14.109493"/>
|
||||
<normal x="-0.957605" y="0.020723" z="0.287339"/>
|
||||
<texcoord u="0.402605" v="0.437066"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-3.754308" y="0.218136" z="1.526633"/>
|
||||
<position x="-7.508615" y="0.436271" z="3.053265"/>
|
||||
<normal x="-0.999600" y="0.021608" z="0.018220"/>
|
||||
<texcoord u="0.421465" v="0.656919"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-3.727726" y="1.810407" z="7.054551"/>
|
||||
<position x="-7.455452" y="3.620815" z="14.109102"/>
|
||||
<normal x="-0.876796" y="0.385614" z="0.287280"/>
|
||||
<texcoord u="0.349977" v="0.439865"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-3.430820" y="1.678712" z="1.526453"/>
|
||||
<position x="-6.861639" y="3.357424" z="3.052906"/>
|
||||
<normal x="-0.915244" y="0.402489" z="0.018190"/>
|
||||
<texcoord u="0.354156" v="0.659756"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-2.797252" y="3.139836" z="7.054356"/>
|
||||
<position x="-5.594504" y="6.279671" z="14.108711"/>
|
||||
<normal x="-0.662489" y="0.691818" z="0.287220"/>
|
||||
<texcoord u="0.297415" v="0.435824"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-2.573017" y="2.904315" z="1.526273"/>
|
||||
<position x="-5.146035" y="5.808631" z="3.052546"/>
|
||||
<normal x="-0.691535" y="0.722115" z="0.018159"/>
|
||||
<texcoord u="0.286496" v="0.658897"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.428855" y="4.011989" z="7.054191"/>
|
||||
<position x="-2.857711" y="8.023977" z="14.108381"/>
|
||||
<normal x="-0.347311" y="0.892692" z="0.287187"/>
|
||||
<texcoord u="0.243683" v="0.424605"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.311493" y="3.708357" z="1.526121"/>
|
||||
<position x="-2.622987" y="7.416714" z="3.052242"/>
|
||||
<normal x="-0.362568" y="0.931781" z="0.018128"/>
|
||||
<texcoord u="0.218225" v="0.654397"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="0.169137" y="4.294091" z="7.054080"/>
|
||||
<position x="0.338274" y="8.588181" z="14.108161"/>
|
||||
<normal x="0.020692" y="0.957661" z="0.287155"/>
|
||||
<texcoord u="0.187178" v="0.405141"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="0.161697" y="3.968431" z="1.526019"/>
|
||||
<position x="0.323394" y="7.936863" z="3.052038"/>
|
||||
<normal x="0.021608" y="0.999602" z="0.018129"/>
|
||||
<texcoord u="0.149147" v="0.646642"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.753445" y="3.943193" z="7.054041"/>
|
||||
<position x="3.506890" y="7.886387" z="14.108083"/>
|
||||
<normal x="0.385611" y="0.876849" z="0.287125"/>
|
||||
<texcoord u="0.124960" v="0.375100"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.622273" y="3.644943" z="1.525983"/>
|
||||
<position x="3.244546" y="7.289886" z="3.051966"/>
|
||||
<normal x="0.402490" y="0.915246" z="0.018098"/>
|
||||
<texcoord u="0.090116" v="0.643002"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.622273" y="3.644943" z="1.525983"/>
|
||||
<position x="3.244546" y="7.289886" z="3.051966"/>
|
||||
<normal x="0.402490" y="0.915246" z="0.018098"/>
|
||||
<texcoord u="0.089146" v="0.642870"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.753445" y="3.943193" z="7.054041"/>
|
||||
<position x="3.506890" y="7.886387" z="14.108083"/>
|
||||
<normal x="0.385611" y="0.876849" z="0.287125"/>
|
||||
<texcoord u="0.124727" v="0.375094"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="3.082873" y="3.012718" z="7.054080"/>
|
||||
<position x="6.165746" y="6.025436" z="14.108161"/>
|
||||
<normal x="0.691803" y="0.662535" z="0.287152"/>
|
||||
<texcoord u="0.186859" v="0.405312"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="2.847876" y="2.787140" z="1.526019"/>
|
||||
<position x="5.695752" y="5.574280" z="3.052038"/>
|
||||
<normal x="0.722115" y="0.691535" z="0.018128"/>
|
||||
<texcoord u="0.148147" v="0.646709"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="4.232913" y="1.751693" z="-5.009001"/>
|
||||
<position x="8.465825" y="3.503386" z="-10.018002"/>
|
||||
<normal x="0.682892" y="0.265637" z="-0.680511"/>
|
||||
<texcoord u="0.196607" v="0.956737"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="3.298132" y="3.218342" z="-5.009119"/>
|
||||
<position x="6.596264" y="6.436684" z="-10.018237"/>
|
||||
<normal x="0.529209" y="0.506777" z="-0.680525"/>
|
||||
<texcoord u="0.116351" v="0.950081"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.873241" y="4.215628" z="-5.009160"/>
|
||||
<position x="3.746483" y="8.431255" z="-10.018320"/>
|
||||
<normal x="0.294972" y="0.670729" z="-0.680525"/>
|
||||
<texcoord u="0.046546" v="0.946845"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.873241" y="4.215628" z="-5.009160"/>
|
||||
<position x="3.746483" y="8.431255" z="-10.018320"/>
|
||||
<normal x="0.294972" y="0.670729" z="-0.680525"/>
|
||||
<texcoord u="0.048382" v="0.947098"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="0.175169" y="4.591718" z="-5.009120"/>
|
||||
<position x="0.350339" y="9.183435" z="-10.018240"/>
|
||||
<normal x="0.015779" y="0.732558" z="-0.680522"/>
|
||||
<texcoord u="0.118215" v="0.950105"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.537567" y="4.289354" z="-5.009001"/>
|
||||
<position x="-3.075135" y="8.578709" z="-10.018002"/>
|
||||
<normal x="-0.265761" y="0.682837" z="-0.680518"/>
|
||||
<texcoord u="0.198490" v="0.956531"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-3.004220" y="3.354571" z="-5.008823"/>
|
||||
<position x="-6.008440" y="6.709143" z="-10.017646"/>
|
||||
<normal x="-0.506872" y="0.529152" z="-0.680499"/>
|
||||
<texcoord u="0.278739" v="0.959802"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-4.001505" y="1.929680" z="-5.008613"/>
|
||||
<position x="-8.003011" y="3.859360" z="-10.017226"/>
|
||||
<normal x="-0.670805" y="0.294904" z="-0.680479"/>
|
||||
<texcoord u="0.358837" v="0.959802"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-4.377593" y="0.231608" z="-5.008405"/>
|
||||
<position x="-8.755186" y="0.463216" z="-10.016809"/>
|
||||
<normal x="-0.732617" y="0.015748" z="-0.680459"/>
|
||||
<texcoord u="0.438664" v="0.956507"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-4.075230" y="-1.481129" z="-5.008227"/>
|
||||
<position x="-8.150459" y="-2.962258" z="-10.016455"/>
|
||||
<normal x="-0.682893" y="-0.265790" z="-0.680451"/>
|
||||
<texcoord u="0.518106" v="0.949997"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-3.140446" y="-2.947780" z="-5.008109"/>
|
||||
<position x="-6.280892" y="-5.895561" z="-10.016218"/>
|
||||
<normal x="-0.529240" y="-0.506869" z="-0.680433"/>
|
||||
<texcoord u="0.597066" v="0.940440"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.715555" y="-3.945064" z="-5.008067"/>
|
||||
<position x="-3.431111" y="-7.890129" z="-10.016133"/>
|
||||
<normal x="-0.295000" y="-0.670815" z="-0.680428"/>
|
||||
<texcoord u="0.675451" v="0.928038"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.715555" y="-3.945064" z="-5.008067"/>
|
||||
<position x="-3.431111" y="-7.890129" z="-10.016133"/>
|
||||
<normal x="-0.295000" y="-0.670815" z="-0.680428"/>
|
||||
<texcoord u="0.673642" v="0.929603"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-0.017485" y="-4.321152" z="-5.008109"/>
|
||||
<position x="-0.034969" y="-8.642304" z="-10.016218"/>
|
||||
<normal x="-0.015839" y="-0.732645" z="-0.680427"/>
|
||||
<texcoord u="0.595223" v="0.941782"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.695251" y="-4.018789" z="-5.008227"/>
|
||||
<position x="3.390502" y="-8.037578" z="-10.016455"/>
|
||||
<normal x="0.265671" y="-0.682931" z="-0.680459"/>
|
||||
<texcoord u="0.516237" v="0.951113"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="3.161904" y="-3.084006" z="-5.008405"/>
|
||||
<position x="6.323808" y="-6.168012" z="-10.016809"/>
|
||||
<normal x="0.506774" y="-0.529297" z="-0.680459"/>
|
||||
<texcoord u="0.436777" v="0.957397"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="4.159188" y="-1.659115" z="-5.008613"/>
|
||||
<position x="8.318376" y="-3.318229" z="-10.017226"/>
|
||||
<normal x="0.670741" y="-0.295055" z="-0.680477"/>
|
||||
<texcoord u="0.356943" v="0.960464"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="4.535276" y="0.038957" z="-5.008823"/>
|
||||
<position x="9.070553" y="0.077913" z="-10.017646"/>
|
||||
<normal x="0.732586" y="-0.015901" z="-0.680489"/>
|
||||
<texcoord u="0.276845" v="0.960236"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="0.079530" y="0.136845" z="12.651568"/>
|
||||
<position x="0.159059" y="0.273691" z="25.303137"/>
|
||||
<normal x="0.000031" y="0.000092" z="1.000000"/>
|
||||
<texcoord u="0.353137" v="0.178594"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="3.298132" y="3.218342" z="-5.009119"/>
|
||||
<position x="6.596264" y="6.436684" z="-10.018237"/>
|
||||
<normal x="0.529209" y="0.506777" z="-0.680525"/>
|
||||
<texcoord u="0.733692" v="0.426656"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="4.232913" y="1.751693" z="-5.009001"/>
|
||||
<position x="8.465825" y="3.503386" z="-10.018002"/>
|
||||
<normal x="0.682892" y="0.265637" z="-0.680511"/>
|
||||
<texcoord u="0.814308" v="0.426656"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="0.078842" y="0.135282" z="-5.008615"/>
|
||||
<position x="0.157684" y="0.270565" z="-10.017229"/>
|
||||
<normal x="-0.000031" y="-0.000092" z="-1.000000"/>
|
||||
<texcoord u="0.774000" v="0.224015"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.873241" y="4.215628" z="-5.009160"/>
|
||||
<position x="3.746483" y="8.431255" z="-10.018320"/>
|
||||
<normal x="0.294972" y="0.670729" z="-0.680525"/>
|
||||
<texcoord u="0.659213" v="0.395806"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="0.175169" y="4.591718" z="-5.009120"/>
|
||||
<position x="0.350339" y="9.183435" z="-10.018240"/>
|
||||
<normal x="0.015779" y="0.732558" z="-0.680522"/>
|
||||
<texcoord u="0.602208" v="0.338802"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.537567" y="4.289354" z="-5.009001"/>
|
||||
<position x="-3.075135" y="8.578709" z="-10.018002"/>
|
||||
<normal x="-0.265761" y="0.682837" z="-0.680518"/>
|
||||
<texcoord u="0.571358" v="0.264323"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-3.004220" y="3.354571" z="-5.008823"/>
|
||||
<position x="-6.008440" y="6.709143" z="-10.017646"/>
|
||||
<normal x="-0.506872" y="0.529152" z="-0.680499"/>
|
||||
<texcoord u="0.571358" v="0.183706"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-4.001505" y="1.929680" z="-5.008613"/>
|
||||
<position x="-8.003011" y="3.859360" z="-10.017226"/>
|
||||
<normal x="-0.670805" y="0.294904" z="-0.680479"/>
|
||||
<texcoord u="0.602209" v="0.109227"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-4.377593" y="0.231608" z="-5.008405"/>
|
||||
<position x="-8.755186" y="0.463216" z="-10.016809"/>
|
||||
<normal x="-0.732617" y="0.015748" z="-0.680459"/>
|
||||
<texcoord u="0.659213" v="0.052223"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-4.075230" y="-1.481129" z="-5.008227"/>
|
||||
<position x="-8.150459" y="-2.962258" z="-10.016455"/>
|
||||
<normal x="-0.682893" y="-0.265790" z="-0.680451"/>
|
||||
<texcoord u="0.733692" v="0.021373"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-3.140446" y="-2.947780" z="-5.008109"/>
|
||||
<position x="-6.280892" y="-5.895561" z="-10.016218"/>
|
||||
<normal x="-0.529240" y="-0.506869" z="-0.680433"/>
|
||||
<texcoord u="0.814308" v="0.021373"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-1.715555" y="-3.945064" z="-5.008067"/>
|
||||
<position x="-3.431111" y="-7.890129" z="-10.016133"/>
|
||||
<normal x="-0.295000" y="-0.670815" z="-0.680428"/>
|
||||
<texcoord u="0.888788" v="0.052223"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="-0.017485" y="-4.321152" z="-5.008109"/>
|
||||
<position x="-0.034969" y="-8.642304" z="-10.016218"/>
|
||||
<normal x="-0.015839" y="-0.732645" z="-0.680427"/>
|
||||
<texcoord u="0.945792" v="0.109227"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="1.695251" y="-4.018789" z="-5.008227"/>
|
||||
<position x="3.390502" y="-8.037578" z="-10.016455"/>
|
||||
<normal x="0.265671" y="-0.682931" z="-0.680459"/>
|
||||
<texcoord u="0.976642" v="0.183707"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="3.161904" y="-3.084006" z="-5.008405"/>
|
||||
<position x="6.323808" y="-6.168012" z="-10.016809"/>
|
||||
<normal x="0.506774" y="-0.529297" z="-0.680459"/>
|
||||
<texcoord u="0.976642" v="0.264323"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="4.159188" y="-1.659115" z="-5.008613"/>
|
||||
<position x="8.318376" y="-3.318229" z="-10.017226"/>
|
||||
<normal x="0.670741" y="-0.295055" z="-0.680477"/>
|
||||
<texcoord u="0.945791" v="0.338802"/>
|
||||
</vertex>
|
||||
<vertex>
|
||||
<position x="4.535276" y="0.038957" z="-5.008823"/>
|
||||
<position x="9.070553" y="0.077913" z="-10.017646"/>
|
||||
<normal x="0.732586" y="-0.015901" z="-0.680489"/>
|
||||
<texcoord u="0.888787" v="0.395806"/>
|
||||
</vertex>
|
||||
|
@ -539,5 +539,5 @@
|
|||
</boneassignments>
|
||||
</submesh>
|
||||
</submeshes>
|
||||
<skeletonlink name="Boompack.skeleton"/>
|
||||
<skeletonlink name="Boomattack.skeleton"/>
|
||||
</mesh>
|
|
@ -1,4 +1,4 @@
|
|||
material Boompack
|
||||
material Boompack_Big
|
||||
{
|
||||
receive_shadows on
|
||||
technique
|
||||
|
@ -11,7 +11,7 @@ material Boompack
|
|||
emissive 0.000000 0.000000 0.000000 1.000000
|
||||
texture_unit
|
||||
{
|
||||
texture boompack.png
|
||||
texture boomattack.png
|
||||
tex_address_mode wrap
|
||||
filtering trilinear
|
||||
colour_op alpha_blend
|
|
@ -0,0 +1,132 @@
|
|||
/*--
|
||||
Boom command
|
||||
Authors: Randrian, Newton
|
||||
|
||||
An evil rocket which is hungry on the destruction of windmills
|
||||
--*/
|
||||
|
||||
local fuel;
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
//flight length
|
||||
fuel=1000;
|
||||
|
||||
var iAngle = Angle(GetX(), GetY(), LandscapeWidth()/2, LandscapeHeight()/2);
|
||||
Launch(iAngle);
|
||||
}
|
||||
|
||||
|
||||
protected func FxFlightTimer(object pTarget, int iEffectNumber, int iEffectTime)
|
||||
{
|
||||
if(fuel<=0)
|
||||
{
|
||||
DoFireworks();
|
||||
}
|
||||
|
||||
var ignition = iEffectTime % 10;
|
||||
|
||||
if(!ignition)
|
||||
{
|
||||
var angle = GetR()+RandomX(-3,3);
|
||||
SetXDir(Sin(angle,100), 100);
|
||||
SetYDir(-Cos(angle,100), 100);
|
||||
SetR(angle);
|
||||
}
|
||||
|
||||
|
||||
if(!Random(iEffectTime % 5))
|
||||
{
|
||||
var sizemod = ignition*ignition/3;
|
||||
|
||||
var x = -Sin(GetR(),22);
|
||||
var y = +Cos(GetR(),22);
|
||||
|
||||
CreateParticle("ExploSmoke",x,y,RandomX(-1,1),RandomX(-1,2),RandomX(120,280),RGBa(130,130,130,75));
|
||||
CreateParticle("Thrust",x,y,GetXDir()/2,GetYDir()/2,RandomX(80,120)+sizemod,RGBa(255,200,200,160));
|
||||
}
|
||||
|
||||
if(GetAction() != "Fly")
|
||||
SetAction("Fly");
|
||||
|
||||
fuel--;
|
||||
}
|
||||
|
||||
public func IsProjectileTarget(target,shooter)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public func QueryCatchBlow(obj)
|
||||
{
|
||||
// obj->Schedule("RemoveObject", 1);
|
||||
DoFireworks();
|
||||
var gol = FindObject(Find_ID(Goal_SaveTheWindmills));
|
||||
gol->IncShotScore();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Contact */
|
||||
|
||||
protected func ContactBottom() { return Hit(); }
|
||||
protected func ContactTop() { return Hit(); }
|
||||
protected func ContactLeft() { return Hit(); }
|
||||
protected func ContactRight() { return Hit(); }
|
||||
|
||||
protected func Hit()
|
||||
{
|
||||
//Message("I have hit something",this);
|
||||
if(GetEffect("Flight",this)) DoFireworks();
|
||||
Sound("WoodHit");
|
||||
}
|
||||
|
||||
func Launch(int angle)
|
||||
{
|
||||
SetProperty("Collectible",0);
|
||||
SetCategory(C4D_Vehicle);
|
||||
SetAction("Fly");
|
||||
|
||||
Exit();
|
||||
AddEffect("Flight",this,150,1,this,this);
|
||||
AddEffect("HitCheck", this, 1,1, nil,nil, 0, true);
|
||||
|
||||
SetR(angle);
|
||||
}
|
||||
|
||||
func DoFireworks(int speed)
|
||||
{
|
||||
RemoveEffect("Flight",this);
|
||||
Fireworks();
|
||||
Explode(40);
|
||||
}
|
||||
|
||||
func SetFuel(int new)
|
||||
{
|
||||
fuel = new;
|
||||
}
|
||||
|
||||
func GetFuel()
|
||||
{
|
||||
return fuel;
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("ActMap", {
|
||||
|
||||
Fly = {
|
||||
Prototype = Action,
|
||||
Name = "Fly",
|
||||
Procedure = DFA_FLOAT,
|
||||
Length = 1,
|
||||
Delay = 0,
|
||||
Wdt=15,
|
||||
Hgt=27,
|
||||
},
|
||||
}, def);
|
||||
SetProperty("Name", "$Name$", def);
|
||||
SetProperty("Collectible",1, def);
|
||||
SetProperty("PerspectiveR", 20000, def);
|
||||
SetProperty("PerspectiveTheta", 25, def);
|
||||
SetProperty("PerspectivePhi", 30, def);
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
Name=Boomattack
|
|
@ -0,0 +1 @@
|
|||
Name=Boomattack
|
After Width: | Height: | Size: 32 KiB |
|
@ -1,21 +0,0 @@
|
|||
[DefCore]
|
||||
id=BOOM_Attack
|
||||
Version=4,9,10,10
|
||||
Category=C4D_Object
|
||||
MaxUserSelect=15
|
||||
ContactCalls=1
|
||||
Width=10
|
||||
Height=18
|
||||
Offset=-5,-7
|
||||
Vertices=4
|
||||
VertexX=0,0,-4,4
|
||||
VertexY=3,-6,10,10
|
||||
VertexCNAT=4,8,1,2
|
||||
VertexFriction=80,60,60
|
||||
Picture=0,0,16,16
|
||||
Value=10
|
||||
Mass=5
|
||||
Components=GPDR=2;Wood=1;Metal=1;
|
||||
Rebuy=1
|
||||
Rotate=1
|
||||
ColorByOwner=1
|
|
@ -1,181 +0,0 @@
|
|||
/*--
|
||||
Boom attack
|
||||
Authors: Randrian (based on the boompack)
|
||||
|
||||
An evil rocket which is hungry on the destruction of windmills
|
||||
--*/
|
||||
|
||||
local fuel;
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
//flight length
|
||||
fuel=1000;
|
||||
|
||||
var iAngle = Angle(GetX(), GetY(), LandscapeWidth()/2, LandscapeHeight()/2);
|
||||
Launch(iAngle);
|
||||
}
|
||||
|
||||
|
||||
protected func FxFlightTimer(object pTarget, int iEffectNumber, int iEffectTime)
|
||||
{
|
||||
if(fuel<=0)
|
||||
{
|
||||
DoFireworks();
|
||||
}
|
||||
|
||||
var ignition = iEffectTime % 9;
|
||||
|
||||
if(!ignition)
|
||||
{
|
||||
// var angle = GetR()+RandomX(-12,12);
|
||||
// SetXDir(3*GetXDir()/4+Sin(angle,50), 100);
|
||||
// SetYDir(3*GetYDir()/4-Cos(angle,50), 100);
|
||||
// SetR(angle);
|
||||
}
|
||||
|
||||
var sizemod = ignition*ignition/3;
|
||||
|
||||
var x = -Sin(GetR(),22);
|
||||
var y = +Cos(GetR(),22);
|
||||
|
||||
CreateParticle("ExploSmoke",x,y,RandomX(-1,1),RandomX(-1,2),RandomX(120,280),RGBa(130,130,130,75));
|
||||
CreateParticle("Thrust",x,y,GetXDir()/2,GetYDir()/2,RandomX(80,120)+sizemod,RGBa(255,200,200,160));
|
||||
|
||||
if(GetAction() != "Fly")
|
||||
SetAction("Fly");
|
||||
}
|
||||
|
||||
public func IsProjectileTarget(target,shooter)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public func QueryCatchBlow(obj)
|
||||
{
|
||||
// obj->Schedule("RemoveObject", 1);
|
||||
DoFireworks();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Contact */
|
||||
|
||||
protected func ContactBottom() { return Hit(); }
|
||||
protected func ContactTop() { return Hit(); }
|
||||
protected func ContactLeft() { return Hit(); }
|
||||
protected func ContactRight() { return Hit(); }
|
||||
|
||||
protected func Hit()
|
||||
{
|
||||
//Message("I have hit something",this);
|
||||
if(GetEffect("Flight",this)) DoFireworks();
|
||||
Sound("WoodHit");
|
||||
}
|
||||
|
||||
func Launch(int angle)
|
||||
{
|
||||
SetProperty("Collectible",0);
|
||||
SetCategory(C4D_Vehicle);
|
||||
SetAction("Fly");
|
||||
|
||||
Exit();
|
||||
AddEffect("Flight",this,150,1,this,this);
|
||||
AddEffect("HitCheck", this, 1,1, nil,nil, 0, true);
|
||||
|
||||
SetR(angle);
|
||||
SetVelocity(angle,5);
|
||||
}
|
||||
|
||||
func DoFireworks(int speed)
|
||||
{
|
||||
RemoveEffect("Flight",this);
|
||||
|
||||
var color = HSL(Random(8)*32,255,127);
|
||||
|
||||
if(!speed) speed = 12;
|
||||
for(var i=0; i<36; ++i)
|
||||
{
|
||||
var oangle = Random(70);
|
||||
var num = AddEffect("Firework", nil, 300, 1, nil, GetID(), Cos(oangle,speed), i*10+Random(5), GetX(), GetY());
|
||||
EffectVar(4,nil,num) = color;
|
||||
}
|
||||
|
||||
for(var i=0; i<16; ++i)
|
||||
{
|
||||
CreateParticle("ExploSmoke",RandomX(-80,80),RandomX(-80,80),0,0,RandomX(500,700),RGBa(255,255,255,90));
|
||||
}
|
||||
CastParticles("Spark",60,190,0,0,40,70,color,color);
|
||||
|
||||
CreateParticle("Flash",0,0,0,0,3500,color | (200 & 255)<<24);
|
||||
|
||||
Explode(30);
|
||||
}
|
||||
|
||||
func FxFireworkStart(object target, int num, int tmp, speed, angle, x, y, color)
|
||||
{
|
||||
if(tmp) return;
|
||||
|
||||
EffectVar(0, target, num) = speed*100;
|
||||
EffectVar(1, target, num) = angle;
|
||||
EffectVar(2, target, num) = x*100;
|
||||
EffectVar(3, target, num) = y*100;
|
||||
}
|
||||
|
||||
func FxFireworkTimer(object target, int num, int time)
|
||||
{
|
||||
var speed = EffectVar(0, target, num);
|
||||
var angle = EffectVar(1, target, num);
|
||||
var x = EffectVar(2, target, num);
|
||||
var y = EffectVar(3, target, num);
|
||||
|
||||
if(time > 65) return -1;
|
||||
|
||||
if(GBackSemiSolid(x/100,y/100)) return -1;
|
||||
|
||||
// loose speed
|
||||
speed = 25*speed/26;
|
||||
|
||||
var xdir = Sin(angle,speed);
|
||||
var ydir = -Cos(angle,speed);
|
||||
|
||||
CreateParticle("Flash",x/100,y/100,xdir/100,ydir/100,50,EffectVar(4, target, num) | (200 & 255)<<24);
|
||||
|
||||
// gravity
|
||||
ydir += GetGravity()*18/100;
|
||||
|
||||
EffectVar(0, target, num) = speed;
|
||||
EffectVar(1, target, num) = Angle(0,0,xdir,ydir);
|
||||
EffectVar(2, target, num) = x+xdir;
|
||||
EffectVar(3, target, num) = y+ydir;
|
||||
}
|
||||
|
||||
func SetFuel(int new)
|
||||
{
|
||||
fuel = new;
|
||||
}
|
||||
|
||||
func GetFuel()
|
||||
{
|
||||
return fuel;
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("ActMap", {
|
||||
|
||||
Fly = {
|
||||
Prototype = Action,
|
||||
Name = "Fly",
|
||||
Procedure = DFA_FLOAT,
|
||||
Length = 1,
|
||||
Delay = 0,
|
||||
Wdt=10,
|
||||
Hgt=18,
|
||||
},
|
||||
}, def);
|
||||
SetProperty("Name", "$Name$", def);
|
||||
SetProperty("Collectible",1, def);
|
||||
SetProperty("PerspectiveR", 20000, def);
|
||||
SetProperty("PerspectiveTheta", 25, def);
|
||||
SetProperty("PerspectivePhi", 30, def);
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
Name=Boompack
|
|
@ -1 +0,0 @@
|
|||
Name=Boompack
|
Before Width: | Height: | Size: 16 KiB |
|
@ -1,2 +0,0 @@
|
|||
[Script]
|
||||
GlobalNamed=1;Action=p128
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 40 KiB |
|
@ -1,136 +0,0 @@
|
|||
[Object]
|
||||
id=WindGenerator
|
||||
Number=385
|
||||
Category=1154
|
||||
Size=100000
|
||||
Mass=900
|
||||
FixX=F33161216
|
||||
FixY=F22544384
|
||||
Width=70
|
||||
Height=90
|
||||
Offset=-35,-45
|
||||
Vertices=5
|
||||
VertexX=-1,-10,9,-10,10
|
||||
VertexY=-22,-14,-14,44,44
|
||||
VertexFriction=50,50,100,100
|
||||
Picture=0,0,0,0
|
||||
OCF=740558529
|
||||
Component=WOOD=4;METL=1
|
||||
LocalNamed=2;wind_anim=i0,iPower=i30
|
||||
Effects=ShowPower(1,100,0,10,385,WindGenerator)
|
||||
|
||||
[Object]
|
||||
id=WindGenerator
|
||||
Number=386
|
||||
Category=1154
|
||||
Rotation=20
|
||||
Size=100000
|
||||
Mass=900
|
||||
FixX=F45023232
|
||||
FixY=F23592960
|
||||
FixR=F1310720
|
||||
Width=118
|
||||
Height=118
|
||||
Offset=-59,-59
|
||||
Vertices=5
|
||||
VertexX=7,-5,13,-24,-6
|
||||
VertexY=-21,-17,-10,38,45
|
||||
VertexFriction=50,50,100,100
|
||||
Picture=0,0,0,0
|
||||
OCF=740558529
|
||||
Component=WOOD=4;METL=1
|
||||
LocalNamed=2;wind_anim=i0,iPower=i30
|
||||
Effects=ShowPower(1,100,0,10,386,WindGenerator)
|
||||
|
||||
[Object]
|
||||
id=WindGenerator
|
||||
Number=387
|
||||
Category=1154
|
||||
Rotation=60
|
||||
Size=100000
|
||||
Mass=900
|
||||
FixX=F53739520
|
||||
FixY=F31260672
|
||||
FixR=F3932160
|
||||
Width=118
|
||||
Height=118
|
||||
Offset=-59,-59
|
||||
Vertices=5
|
||||
VertexX=19,7,17,-43,-33
|
||||
VertexY=-12,-16,1,13,31
|
||||
VertexFriction=50,50,100,100
|
||||
Picture=0,0,0,0
|
||||
OCF=740558529
|
||||
Component=WOOD=4;METL=1
|
||||
LocalNamed=2;wind_anim=i0,iPower=i30
|
||||
Effects=ShowPower(1,100,0,10,387,WindGenerator)
|
||||
|
||||
[Object]
|
||||
id=WindGenerator
|
||||
Number=388
|
||||
Category=1154
|
||||
Rotation=170
|
||||
Size=100000
|
||||
Mass=900
|
||||
FixX=F46006272
|
||||
FixY=F42205184
|
||||
FixR=F11141120
|
||||
Width=118
|
||||
Height=118
|
||||
Offset=-59,-59
|
||||
Vertices=5
|
||||
VertexX=5,12,-6,2,-17
|
||||
VertexY=21,12,15,-45,-42
|
||||
VertexFriction=50,50,100,100
|
||||
Picture=0,0,0,0
|
||||
OCF=740558529
|
||||
Component=WOOD=4;METL=1
|
||||
LocalNamed=2;wind_anim=i0,iPower=i30
|
||||
Effects=ShowPower(1,100,0,10,388,WindGenerator)
|
||||
|
||||
[Object]
|
||||
id=WindGenerator
|
||||
Number=389
|
||||
Category=1154
|
||||
Rotation=190
|
||||
Size=100000
|
||||
Mass=900
|
||||
FixX=F29818880
|
||||
FixY=F41549824
|
||||
FixR=F12451840
|
||||
Width=118
|
||||
Height=118
|
||||
Offset=-59,-59
|
||||
Vertices=5
|
||||
VertexX=-3,7,-11,17,-2
|
||||
VertexY=22,16,12,-42,-45
|
||||
VertexFriction=50,50,100,100
|
||||
Picture=0,0,0,0
|
||||
OCF=740558529
|
||||
Component=WOOD=4;METL=1
|
||||
LocalNamed=2;wind_anim=i0,iPower=i0
|
||||
Effects=ShowPower(1,100,0,10,389,WindGenerator)
|
||||
|
||||
[Object]
|
||||
id=WindGenerator
|
||||
Number=390
|
||||
Category=1154
|
||||
Rotation=310
|
||||
Size=100000
|
||||
Mass=900
|
||||
FixX=F24838144
|
||||
FixY=F30015488
|
||||
FixR=F20316160
|
||||
Width=118
|
||||
Height=118
|
||||
Offset=-59,-59
|
||||
Vertices=5
|
||||
VertexX=-17,-17,-5,27,40
|
||||
VertexY=-13,-1,-16,36,21
|
||||
VertexFriction=50,50,100,100
|
||||
Picture=0,0,0,0
|
||||
OCF=740558529
|
||||
Component=WOOD=4;METL=1
|
||||
LocalNamed=2;wind_anim=i0,iPower=i0
|
||||
Effects=ShowPower(1,100,0,10,390,WindGenerator)
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
[DefCore]
|
||||
id=Goal_SaveTheWindmills
|
||||
Version=4,10,0,0
|
||||
Category=C4D_StaticBack|C4D_Goal
|
||||
MaxUserSelect=1
|
||||
Width=1
|
||||
Height=1
|
||||
Picture=0,0,64,64
|
|
@ -0,0 +1 @@
|
|||
Zerstöre die Windrad-fressenden Raketen bevor sie die Windräder erreichen! Wenn kein Windrad mehr übrig ist, verlierst Du
|
|
@ -0,0 +1 @@
|
|||
Destroy the windmill-eating rockets before they reach the windmills! If no windmill remains, you loose.
|
After Width: | Height: | Size: 5.8 KiB |
|
@ -0,0 +1,36 @@
|
|||
/*-- Save the windmills --*/
|
||||
|
||||
#include Library_Goal
|
||||
|
||||
local score;
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
score = 0;
|
||||
}
|
||||
|
||||
public func IsFulfilled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public func Activate(int byplr)
|
||||
{
|
||||
MessageWindow(GetDesc(), byplr);
|
||||
return;
|
||||
}
|
||||
|
||||
public func IncShotScore()
|
||||
{
|
||||
score++;
|
||||
NotifyHUD();
|
||||
}
|
||||
|
||||
public func GetShortDescription(int plr)
|
||||
{
|
||||
return Format("$ShotScore$",score);
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
Name=Rette die Windräder
|
||||
ShotScore=%d abgeschossen
|
|
@ -0,0 +1,2 @@
|
|||
Name=Save the windmills
|
||||
ShotScore=shot %d
|
|
@ -1,9 +1,24 @@
|
|||
/* Windmill Island */
|
||||
/*
|
||||
Boom command
|
||||
Authors: Randrian, Newton
|
||||
|
||||
Funny little survival scenario to train with the bow.
|
||||
*/
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
FxBoomAttackTimer();
|
||||
AddEffect("BoomAttack", 0, 100, 35*10);
|
||||
var offs = 45;
|
||||
CreateObject(WindGenerator, 1147, 938+offs)->SetR(7);
|
||||
CreateObject(WindGenerator, 985, 1130+offs)->SetR(-170);
|
||||
CreateObject(WindGenerator, 1055, 1109+offs)->SetR(140);
|
||||
CreateObject(WindGenerator, 971, 857+offs)->SetR(-20);
|
||||
CreateObject(WindGenerator, 1147, 1059+offs)->SetR(160);
|
||||
CreateObject(WindGenerator, 1036, 870+offs)->SetR(-10);
|
||||
CreateObject(WindGenerator, 1081, 873+offs)->SetR(18);
|
||||
CreateObject(WindGenerator, 858, 930+offs)->SetR(-10);
|
||||
|
||||
CreateObject(Goal_SaveTheWindmills,10,10);
|
||||
PlaceGrass(100, 800, 1400);
|
||||
}
|
||||
|
||||
global func FxBoomAttackTimer()
|
||||
|
@ -12,30 +27,23 @@ global func FxBoomAttackTimer()
|
|||
var radius = Min(LandscapeWidth()/2, LandscapeHeight()/2);
|
||||
var x = Sin(angle, radius)+LandscapeWidth()/2;
|
||||
var y = -Cos(angle, radius)+LandscapeHeight()/2;
|
||||
CreateObject(BOOM_Attack, x, y);
|
||||
CreateObject(Boomattack, x, y);
|
||||
}
|
||||
|
||||
func InitializePlayer(int iPlr, int iX, int iY, object pBase, int iTeam)
|
||||
{
|
||||
SetFoW(false,iPlr);
|
||||
// yeah, for every player there are extra booms
|
||||
AddEffect("BoomAttack", 0, 100, 35*5);
|
||||
JoinPlayer(iPlr);
|
||||
return;
|
||||
}
|
||||
|
||||
func RelaunchPlayer(int iPlr)
|
||||
{
|
||||
var clonk = CreateObject(Clonk, 0, 0, iPlr);
|
||||
clonk->MakeCrewMember(iPlr);
|
||||
SetCursor(iPlr,clonk);
|
||||
SelectCrew(iPlr, clonk, true);
|
||||
JoinPlayer(iPlr);
|
||||
return;
|
||||
}
|
||||
|
||||
func JoinPlayer(int iPlr)
|
||||
func JoinPlayer(int iPlr)
|
||||
{
|
||||
var clonk = GetCrew(iPlr);
|
||||
clonk->DoEnergy(100000);
|
||||
clonk->SetPosition(LandscapeWidth()/2, 0);
|
||||
clonk->DoEnergy(1000);
|
||||
clonk->SetPosition(LandscapeWidth()/2, LandscapeHeight()/2);
|
||||
clonk->CreateContents(Bow);
|
||||
clonk->Collect(CreateObject(Arrow));
|
||||
return;
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#appendto Arrow
|
||||
|
||||
public func SetStackCount(int amount)
|
||||
{
|
||||
count = MaxStackCount();
|
||||
Update();
|
||||
}
|
||||
|
||||
public func Hit()
|
||||
{
|
||||
RemoveObject();
|
||||
}
|
||||
|
||||
public func HitObject(object obj)
|
||||
{
|
||||
inherited(obj,...);
|
||||
Hit();
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
#appendto WindGenerator
|
||||
|
||||
func Damage()
|
||||
{
|
||||
Explode(30);
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
[Teams]
|
||||
Active=false
|
||||
Custom=false
|
||||
AllowHostilityChange=true
|
||||
AutoGenerateTeams=true
|
|
@ -1,2 +1,2 @@
|
|||
DE:Test 1
|
||||
US:Test 1
|
||||
DE:Windradfressende Raketen
|
||||
US:Windmill-eating Rockets
|