forked from Mirrors/openclonk
renamed DynamicParticles* to Particles* and CreateParticleEx to CreateParticle
parent
02f54ba1eb
commit
a10c9316ef
|
@ -323,8 +323,8 @@ set(OC_CLONK_SOURCES
|
||||||
src/landscape/C4Material.h
|
src/landscape/C4Material.h
|
||||||
src/landscape/C4MaterialList.cpp
|
src/landscape/C4MaterialList.cpp
|
||||||
src/landscape/C4MaterialList.h
|
src/landscape/C4MaterialList.h
|
||||||
src/landscape/C4DynamicParticles.cpp
|
src/landscape/C4Particles.cpp
|
||||||
src/landscape/C4DynamicParticles.h
|
src/landscape/C4Particles.h
|
||||||
src/landscape/C4PathFinder.cpp
|
src/landscape/C4PathFinder.cpp
|
||||||
src/landscape/C4PathFinder.h
|
src/landscape/C4PathFinder.h
|
||||||
src/landscape/C4PXS.cpp
|
src/landscape/C4PXS.cpp
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<text>The coordinates for the source rectangle within Graphics.png of a particle specify the first phase of the particle graphics the other phases should follow to the right and can be continued in the next row. The animation length is then automatically determined from the image size.</text>
|
<text>The coordinates for the source rectangle within Graphics.png of a particle specify the first phase of the particle graphics the other phases should follow to the right and can be continued in the next row. The animation length is then automatically determined from the image size.</text>
|
||||||
<h id="properties">Properties</h>
|
<h id="properties">Properties</h>
|
||||||
<text>Each particle has different attributes like position, lifetime, size and more. These are set by script when creating the particle.</text>
|
<text>Each particle has different attributes like position, lifetime, size and more. These are set by script when creating the particle.</text>
|
||||||
<text>The following properties can be contained in a proplist passed to <funclink>CreateParticleEx</funclink>. For an example, see <funclink>CreateParticleEx</funclink></text>
|
<text>The following properties can be contained in a proplist passed to <funclink>CreateParticle</funclink>. For an example, see <funclink>CreateParticle</funclink></text>
|
||||||
<text>You can assign either constants to the properties (f.e. <code>R = 200</code>) or use certain value provider functions (f.e. <code>R = <funclink>PV_Linear</funclink>(200, 0)</code>). Available value provider functions are:
|
<text>You can assign either constants to the properties (f.e. <code>R = 200</code>) or use certain value provider functions (f.e. <code>R = <funclink>PV_Linear</funclink>(200, 0)</code>). Available value provider functions are:
|
||||||
<funclink>PV_Linear</funclink>
|
<funclink>PV_Linear</funclink>
|
||||||
<funclink>PV_Direction</funclink>
|
<funclink>PV_Direction</funclink>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
||||||
<funcs>
|
<funcs>
|
||||||
<func>
|
<func>
|
||||||
<title>CreateParticleEx</title>
|
<title>CreateParticle</title>
|
||||||
<category>Particles</category>
|
<category>Particles</category>
|
||||||
<version>5.3.4 OC</version>
|
<version>5.3.4 OC</version>
|
||||||
<syntax>
|
<syntax>
|
||||||
|
@ -72,7 +72,7 @@ var particles =
|
||||||
ForceX = <funclink>PV_Random</funclink>(-5, 5, 15),
|
ForceX = <funclink>PV_Random</funclink>(-5, 5, 15),
|
||||||
Phase = <funclink>PV_Step</funclink>(1, 0, 10)
|
Phase = <funclink>PV_Step</funclink>(1, 0, 10)
|
||||||
};
|
};
|
||||||
<funclink>CreateParticleEx</funclink>("Fire", 0, 0, <funclink>PV_Random(-200, 200)</funclink>, <funclink>PV_Random</funclink>(-200, 200), <funclink>PV_Random</funclink>(18, 38 * 5), particles, 100);
|
<funclink>CreateParticle</funclink>("Fire", 0, 0, <funclink>PV_Random(-200, 200)</funclink>, <funclink>PV_Random</funclink>(-200, 200), <funclink>PV_Random</funclink>(18, 38 * 5), particles, 100);
|
||||||
</code>
|
</code>
|
||||||
<text>Casts 100 particles with a previously defined behavior.</text>
|
<text>Casts 100 particles with a previously defined behavior.</text>
|
||||||
</example>
|
</example>
|
|
@ -20,7 +20,7 @@
|
||||||
<desc>A particle collision function. The particle will bounce off the ground on collision. If your particles get stuck instead of bouncing, you might need to increase the CollisionVertex value a bit.</desc>
|
<desc>A particle collision function. The particle will bounce off the ground on collision. If your particles get stuck instead of bouncing, you might need to increase the CollisionVertex value a bit.</desc>
|
||||||
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
||||||
<related>
|
<related>
|
||||||
<funclink>CreateParticleEx</funclink>
|
<funclink>CreateParticle</funclink>
|
||||||
<funclink>PV_Linear</funclink>
|
<funclink>PV_Linear</funclink>
|
||||||
<funclink>PV_Direction</funclink>
|
<funclink>PV_Direction</funclink>
|
||||||
<funclink>PV_Random</funclink>
|
<funclink>PV_Random</funclink>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<desc>A particle collision function. The particle will die on collision.</desc>
|
<desc>A particle collision function. The particle will die on collision.</desc>
|
||||||
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
||||||
<related>
|
<related>
|
||||||
<funclink>CreateParticleEx</funclink>
|
<funclink>CreateParticle</funclink>
|
||||||
<funclink>PV_Linear</funclink>
|
<funclink>PV_Linear</funclink>
|
||||||
<funclink>PV_Direction</funclink>
|
<funclink>PV_Direction</funclink>
|
||||||
<funclink>PV_Random</funclink>
|
<funclink>PV_Random</funclink>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<desc>A particle collision function. The particle will set its velocity to zero on collision.</desc>
|
<desc>A particle collision function. The particle will set its velocity to zero on collision.</desc>
|
||||||
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
||||||
<related>
|
<related>
|
||||||
<funclink>CreateParticleEx</funclink>
|
<funclink>CreateParticle</funclink>
|
||||||
<funclink>PV_Linear</funclink>
|
<funclink>PV_Linear</funclink>
|
||||||
<funclink>PV_Direction</funclink>
|
<funclink>PV_Direction</funclink>
|
||||||
<funclink>PV_Random</funclink>
|
<funclink>PV_Random</funclink>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<desc>The value depends on the current angle of movement of the particle. Usually the factor-parameter can be left out, since the original purpose of this function is to be used for the rotation-property.</desc>
|
<desc>The value depends on the current angle of movement of the particle. Usually the factor-parameter can be left out, since the original purpose of this function is to be used for the rotation-property.</desc>
|
||||||
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
||||||
<related>
|
<related>
|
||||||
<funclink>CreateParticleEx</funclink>
|
<funclink>CreateParticle</funclink>
|
||||||
<funclink>PV_Linear</funclink>
|
<funclink>PV_Linear</funclink>
|
||||||
<funclink>PV_Random</funclink>
|
<funclink>PV_Random</funclink>
|
||||||
<funclink>PV_Step</funclink>
|
<funclink>PV_Step</funclink>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<desc>The value returned will be an interpolated value of the (smoothed) curve between the up to 4 key frames. PV_KeyFrames(0, 0, X, 1000, Y) is equivalent to PV_Linear(X, Y).</desc>
|
<desc>The value returned will be an interpolated value of the (smoothed) curve between the up to 4 key frames. PV_KeyFrames(0, 0, X, 1000, Y) is equivalent to PV_Linear(X, Y).</desc>
|
||||||
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
||||||
<related>
|
<related>
|
||||||
<funclink>CreateParticleEx</funclink>
|
<funclink>CreateParticle</funclink>
|
||||||
<funclink>PV_Linear</funclink>
|
<funclink>PV_Linear</funclink>
|
||||||
<funclink>PV_Direction</funclink>
|
<funclink>PV_Direction</funclink>
|
||||||
<funclink>PV_Random</funclink>
|
<funclink>PV_Random</funclink>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<desc>The value will go linearly from start_value to end_value over the life of the particle.</desc>
|
<desc>The value will go linearly from start_value to end_value over the life of the particle.</desc>
|
||||||
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
||||||
<related>
|
<related>
|
||||||
<funclink>CreateParticleEx</funclink>
|
<funclink>CreateParticle</funclink>
|
||||||
<funclink>PV_Direction</funclink>
|
<funclink>PV_Direction</funclink>
|
||||||
<funclink>PV_Random</funclink>
|
<funclink>PV_Random</funclink>
|
||||||
<funclink>PV_Step</funclink>
|
<funclink>PV_Step</funclink>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<desc>The value will be a random number in the interval from start_value to (not including) end_value. The values in between are not whole integers, but are also in fraction of integers. This means that PV_Random(0, 1) can not only return one value (the 0) but a lot of different values in the interval between 0 and 1.</desc>
|
<desc>The value will be a random number in the interval from start_value to (not including) end_value. The values in between are not whole integers, but are also in fraction of integers. This means that PV_Random(0, 1) can not only return one value (the 0) but a lot of different values in the interval between 0 and 1.</desc>
|
||||||
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
||||||
<related>
|
<related>
|
||||||
<funclink>CreateParticleEx</funclink>
|
<funclink>CreateParticle</funclink>
|
||||||
<funclink>PV_Linear</funclink>
|
<funclink>PV_Linear</funclink>
|
||||||
<funclink>PV_Direction</funclink>
|
<funclink>PV_Direction</funclink>
|
||||||
<funclink>PV_Step</funclink>
|
<funclink>PV_Step</funclink>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<desc>The value will depend on the speed of the particle.</desc>
|
<desc>The value will depend on the speed of the particle.</desc>
|
||||||
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
||||||
<related>
|
<related>
|
||||||
<funclink>CreateParticleEx</funclink>
|
<funclink>CreateParticle</funclink>
|
||||||
<funclink>PV_Linear</funclink>
|
<funclink>PV_Linear</funclink>
|
||||||
<funclink>PV_Direction</funclink>
|
<funclink>PV_Direction</funclink>
|
||||||
<funclink>PV_Random</funclink>
|
<funclink>PV_Random</funclink>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<desc>PV_Step can be used for values that do not depend on the particle age (unlike f.e. <funclink>PV_Linear</funclink>).</desc>
|
<desc>PV_Step can be used for values that do not depend on the particle age (unlike f.e. <funclink>PV_Linear</funclink>).</desc>
|
||||||
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
||||||
<related>
|
<related>
|
||||||
<funclink>CreateParticleEx</funclink>
|
<funclink>CreateParticle</funclink>
|
||||||
<funclink>PV_Linear</funclink>
|
<funclink>PV_Linear</funclink>
|
||||||
<funclink>PV_Direction</funclink>
|
<funclink>PV_Direction</funclink>
|
||||||
<funclink>PV_Random</funclink>
|
<funclink>PV_Random</funclink>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<desc>The value will depend on the wind at the current position of the particle.</desc>
|
<desc>The value will depend on the wind at the current position of the particle.</desc>
|
||||||
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
<remark>See the <emlink href="particle/index.html">particle documentation</emlink> for further explanations of the particle system.</remark>
|
||||||
<related>
|
<related>
|
||||||
<funclink>CreateParticleEx</funclink>
|
<funclink>CreateParticle</funclink>
|
||||||
<funclink>PV_Direction</funclink>
|
<funclink>PV_Direction</funclink>
|
||||||
<funclink>PV_Random</funclink>
|
<funclink>PV_Random</funclink>
|
||||||
<funclink>PV_Step</funclink>
|
<funclink>PV_Step</funclink>
|
||||||
|
|
|
@ -99,7 +99,7 @@ global func FxGeysirExplosionTimer(object target, effect)
|
||||||
y-=3;
|
y-=3;
|
||||||
for(var i=0; i<(45); i++)InsertMaterial(Material("Water"),x+RandomX(-9,9),y-Random(5),RandomX(-10,10)+RandomX(-5,5)+RandomX(-10,10),-(10+Random(50)+Random(30)+Random(60)));
|
for(var i=0; i<(45); i++)InsertMaterial(Material("Water"),x+RandomX(-9,9),y-Random(5),RandomX(-10,10)+RandomX(-5,5)+RandomX(-10,10),-(10+Random(50)+Random(30)+Random(60)));
|
||||||
for(var i=0; i<(25); i++)InsertMaterial(Material("Water"),x+RandomX(-16,16),y-Random(5),RandomX(-10,10)+RandomX(-15,15)+RandomX(-20,20),-(10+Random(50)));
|
for(var i=0; i<(25); i++)InsertMaterial(Material("Water"),x+RandomX(-16,16),y-Random(5),RandomX(-10,10)+RandomX(-15,15)+RandomX(-20,20),-(10+Random(50)));
|
||||||
CreateParticleEx("Air", PV_Random(x-6, x+6), PV_Random(y-3, y), PV_Random(-15, 15), PV_Random(-90, -5), PV_Random(20, 100), Particles_Air());
|
CreateParticle("Air", PV_Random(x-6, x+6), PV_Random(y-3, y), PV_Random(-15, 15), PV_Random(-90, -5), PV_Random(20, 100), Particles_Air());
|
||||||
if(effect.counter>2072) effect.counter=0;
|
if(effect.counter>2072) effect.counter=0;
|
||||||
for(var obj in FindObjects(Find_InRect(x-30,y-200,60,210)))
|
for(var obj in FindObjects(Find_InRect(x-30,y-200,60,210)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,8 +85,8 @@ public func FxFrostboltTimer(pTarget, effect, iEffectTime)
|
||||||
effect.x=x;
|
effect.x=x;
|
||||||
effect.y=y;
|
effect.y=y;
|
||||||
|
|
||||||
CreateParticleEx("Air", PV_Random(x - 3, x + 3), PV_Random(y - 3, y + 3), PV_Random(-10, 10), PV_Random(-10, 10), 5, effect.air_particles, 10);
|
CreateParticle("Air", PV_Random(x - 3, x + 3), PV_Random(y - 3, y + 3), PV_Random(-10, 10), PV_Random(-10, 10), 5, effect.air_particles, 10);
|
||||||
CreateParticleEx("MagicFire", PV_Random(x - 3, x + 3), PV_Random(y - 3, y + 3), PV_Random(-10, 10), PV_Random(-10, 10), 10, effect.air_particles, 10);
|
CreateParticle("MagicFire", PV_Random(x - 3, x + 3), PV_Random(y - 3, y + 3), PV_Random(-10, 10), PV_Random(-10, 10), 10, effect.air_particles, 10);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ public func FxHardeningSpellTimer(pTarget, effect, iEffectTime)
|
||||||
var x = effect.x;
|
var x = effect.x;
|
||||||
var y = effect.y;
|
var y = effect.y;
|
||||||
|
|
||||||
CreateParticleEx("Air", PV_Random(x - 10, x + 10), PV_Random(y - 10, y + 10), xdir, ydir, PV_Random(20, 40), Particles_Air(), 4);
|
CreateParticle("Air", PV_Random(x - 10, x + 10), PV_Random(y - 10, y + 10), xdir, ydir, PV_Random(20, 40), Particles_Air(), 4);
|
||||||
|
|
||||||
if(!GBackSolid(x,y))
|
if(!GBackSolid(x,y))
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ public func FxHardeningSpellTimer(pTarget, effect, iEffectTime)
|
||||||
if(GetMaterial(x,y) == Material("Snow"))
|
if(GetMaterial(x,y) == Material("Snow"))
|
||||||
{
|
{
|
||||||
DrawMaterialQuad("Ice",x,y,x+1,y,x+1,y+1,x,y+1);
|
DrawMaterialQuad("Ice",x,y,x+1,y,x+1,y+1,x,y+1);
|
||||||
CreateParticleEx("Air", x , y, xdir/3, ydir/3, PV_Random(20, 40), Particles_Air());
|
CreateParticle("Air", x , y, xdir/3, ydir/3, PV_Random(20, 40), Particles_Air());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(iEffectTime > 360) { return -1; }
|
if(iEffectTime > 360) { return -1; }
|
||||||
|
|
|
@ -41,12 +41,12 @@ public func FxWindScrollStormTimer(pTarget, effect, iEffectTime)
|
||||||
{
|
{
|
||||||
var r=Random(360);
|
var r=Random(360);
|
||||||
var d=Random(40);
|
var d=Random(40);
|
||||||
CreateParticleEx("Air", Sin(r,d)+x,-Cos(r,d)+y, xdir/3, ydir/3, PV_Random(10, 30), effect.particles, 1);
|
CreateParticle("Air", Sin(r,d)+x,-Cos(r,d)+y, xdir/3, ydir/3, PV_Random(10, 30), effect.particles, 1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(iEffectTime<180 )
|
else if(iEffectTime<180 )
|
||||||
{
|
{
|
||||||
CreateParticleEx("Air", PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), xdir/2, ydir/2, PV_Random(10, 30), effect.particles, 5);
|
CreateParticle("Air", PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), xdir/2, ydir/2, PV_Random(10, 30), effect.particles, 5);
|
||||||
for(var obj in FindObjects(Find_Distance(40,x,y),Find_Not(Find_Category(C4D_Structure))))
|
for(var obj in FindObjects(Find_Distance(40,x,y),Find_Not(Find_Category(C4D_Structure))))
|
||||||
{
|
{
|
||||||
if(PathFree(x,y,obj->GetX(),obj->GetY()))
|
if(PathFree(x,y,obj->GetX(),obj->GetY()))
|
||||||
|
|
|
@ -87,9 +87,9 @@ global func BlueExplosionEffect(int level, int x, int y)
|
||||||
Size = PV_Random(level - 5, level + 5)
|
Size = PV_Random(level - 5, level + 5)
|
||||||
};
|
};
|
||||||
// Blast particle.
|
// Blast particle.
|
||||||
CreateParticleEx("SmokeDirty", x, y, PV_Random(-2, 2), PV_Random(-2, 2), PV_Random(20, 40), smoke, 10);
|
CreateParticle("SmokeDirty", x, y, PV_Random(-2, 2), PV_Random(-2, 2), PV_Random(20, 40), smoke, 10);
|
||||||
CreateParticleEx("MagicFire", x, y, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(5, 10), fire, 20);
|
CreateParticle("MagicFire", x, y, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(5, 10), fire, 20);
|
||||||
if(!GBackLiquid(x,y)) CreateParticleEx("SphereSpark", x, y, PV_Random(-100, 100), PV_Random(-100, 100), PV_Random(5, 36 * 3), glimmer, level);
|
if(!GBackLiquid(x,y)) CreateParticle("SphereSpark", x, y, PV_Random(-100, 100), PV_Random(-100, 100), PV_Random(5, 36 * 3), glimmer, level);
|
||||||
|
|
||||||
if(GBackLiquid(x,y)) CastObjects(Fx_Bubble, level * 4 / 10, level, x, y);
|
if(GBackLiquid(x,y)) CastObjects(Fx_Bubble, level * 4 / 10, level, x, y);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -29,7 +29,7 @@ func FxSparkleStart(target, effect, temp)
|
||||||
func FxSparkleTimer(target, effect, effect_time)
|
func FxSparkleTimer(target, effect, effect_time)
|
||||||
{
|
{
|
||||||
if(this()->Contained() || !Random(2)) return FX_OK;
|
if(this()->Contained() || !Random(2)) return FX_OK;
|
||||||
CreateParticleEx("MagicRing", 0, 0, 0, 0, effect.Interval, effect.particles, 1);
|
CreateParticle("MagicRing", 0, 0, 0, 0, effect.Interval, effect.particles, 1);
|
||||||
return FX_OK;
|
return FX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,10 +74,10 @@ func FxGemHealingTimer(target, effect, effect_time)
|
||||||
|
|
||||||
target->DoEnergy(500, true);
|
target->DoEnergy(500, true);
|
||||||
|
|
||||||
target->CreateParticleEx("Magic", PV_Random(-5, +5), PV_Random(-8, 8), PV_Random(-1, 1), PV_Random(-10, -5), PV_Random(10, 20), effect.glimmer_particles, 3);
|
target->CreateParticle("Magic", PV_Random(-5, +5), PV_Random(-8, 8), PV_Random(-1, 1), PV_Random(-10, -5), PV_Random(10, 20), effect.glimmer_particles, 3);
|
||||||
if(!Random(10)) effect.switcher = !effect.switcher;
|
if(!Random(10)) effect.switcher = !effect.switcher;
|
||||||
if(effect.switcher)
|
if(effect.switcher)
|
||||||
target->CreateParticleEx("MagicSpark", PV_Random(-3, 3), PV_Random(0, 8), PV_Random(-1, 1), PV_Random(-2, -1), PV_Random(20, 30), effect.sparks, 2);
|
target->CreateParticle("MagicSpark", PV_Random(-3, 3), PV_Random(0, 8), PV_Random(-1, 1), PV_Random(-2, -1), PV_Random(20, 30), effect.sparks, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
func FxGemHealingDamage(target, effect, damage, cause)
|
func FxGemHealingDamage(target, effect, damage, cause)
|
||||||
|
|
|
@ -87,7 +87,7 @@ global func FxGemPyreTimer(object target, effect, int time)
|
||||||
if(e)clr=RGB(190+Random(10),0,20+Random(20));
|
if(e)clr=RGB(190+Random(10),0,20+Random(20));
|
||||||
var xoff = Sin(r, d);
|
var xoff = Sin(r, d);
|
||||||
var yoff = -Cos(r, d);
|
var yoff = -Cos(r, d);
|
||||||
CreateParticleEx("Air", x + xoff, y + yoff, PV_Random(xoff - 3, xoff + 3), PV_Random(yoff - 3, yoff + 3), PV_Random(5, 10), effect.particles, 2);
|
CreateParticle("Air", x + xoff, y + yoff, PV_Random(xoff - 3, xoff + 3), PV_Random(yoff - 3, yoff + 3), PV_Random(5, 10), effect.particles, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var obj in FindObjects(Find_NoContainer(), Find_OCF(OCF_Alive), Find_Distance(((time/2)+1)*6,x,y),Find_Not(Find_Distance((time/2)*4,x,y)),Find_ID(Clonk)))
|
for(var obj in FindObjects(Find_NoContainer(), Find_OCF(OCF_Alive), Find_Distance(((time/2)+1)*6,x,y),Find_Not(Find_Distance((time/2)*4,x,y)),Find_ID(Clonk)))
|
||||||
|
@ -99,7 +99,7 @@ global func FxGemPyreTimer(object target, effect, int time)
|
||||||
if(PathFree(x,y,obj->GetX(),obj->GetY()))
|
if(PathFree(x,y,obj->GetX(),obj->GetY()))
|
||||||
{
|
{
|
||||||
obj->DoEnergy((-BoundBy((30-time),1,26)*3)/5,0,0,effect.thrower);
|
obj->DoEnergy((-BoundBy((30-time),1,26)*3)/5,0,0,effect.thrower);
|
||||||
obj->CreateParticleEx("MagicFire", 0, 0, PV_Random(-15, 15), PV_Random(-15, 15), PV_Random(5, 10), effect.particles, 20);
|
obj->CreateParticle("MagicFire", 0, 0, PV_Random(-15, 15), PV_Random(-15, 15), PV_Random(5, 10), effect.particles, 20);
|
||||||
obj->Fling(RandomX(-2,2),-2-(BoundBy((30-time),10,30)/10));
|
obj->Fling(RandomX(-2,2),-2-(BoundBy((30-time),10,30)/10));
|
||||||
effect.objects[GetLength(effect.objects)] = obj;
|
effect.objects[GetLength(effect.objects)] = obj;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,12 +74,12 @@ global func FxGemShieldCreationTimer(object target, effect, int time)
|
||||||
var shield=CreateObject(CrystalShield,x+Sin(time*7,35),y+Cos(time*7,35));
|
var shield=CreateObject(CrystalShield,x+Sin(time*7,35),y+Cos(time*7,35));
|
||||||
shield->SetR(-time*7);
|
shield->SetR(-time*7);
|
||||||
shield->SetClrModulation(clr);
|
shield->SetClrModulation(clr);
|
||||||
CreateParticleEx("MagicSpark", x+Sin(time*7,39),y+Cos(time*7,39), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(10, 20), effect.particles, 10);
|
CreateParticle("MagicSpark", x+Sin(time*7,39),y+Cos(time*7,39), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(10, 20), effect.particles, 10);
|
||||||
|
|
||||||
var shield=CreateObject(CrystalShield,x-Sin(-7+time*7,35),y+Cos(-7+time*7,35));
|
var shield=CreateObject(CrystalShield,x-Sin(-7+time*7,35),y+Cos(-7+time*7,35));
|
||||||
shield->SetR(-7 + time*7);
|
shield->SetR(-7 + time*7);
|
||||||
shield->SetClrModulation(clr);
|
shield->SetClrModulation(clr);
|
||||||
CreateParticleEx("MagicSpark", x-Sin(-7+time*7,39),y+Cos(-7+time*7,39), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(10, 20), effect.particles, 10);
|
CreateParticle("MagicSpark", x-Sin(-7+time*7,39),y+Cos(-7+time*7,39), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(10, 20), effect.particles, 10);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ func FxSelfdestructionStart(target, effect, temp)
|
||||||
|
|
||||||
func FxSelfdestructionTimer(object target, effect, int timer)
|
func FxSelfdestructionTimer(object target, effect, int timer)
|
||||||
{
|
{
|
||||||
CreateParticleEx("Magic", PV_Random(-4, 4), PV_Random(-4, 4), PV_Random(-3, 3), PV_Random(-3, 3), PV_Random(10, 30), effect.particles, 3);
|
CreateParticle("Magic", PV_Random(-4, 4), PV_Random(-4, 4), PV_Random(-3, 3), PV_Random(-3, 3), PV_Random(10, 30), effect.particles, 3);
|
||||||
if(timer>175) target->RemoveObject();
|
if(timer>175) target->RemoveObject();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ global func FxGemSlowFieldTimer(object target, effect, int time)
|
||||||
var r=Random(360);
|
var r=Random(360);
|
||||||
var d=Min(Random(20)+Random(130),62);
|
var d=Min(Random(20)+Random(130),62);
|
||||||
if(!PathFree(x,y,x + Sin(r,d), y - Cos(r,d))) continue;
|
if(!PathFree(x,y,x + Sin(r,d), y - Cos(r,d))) continue;
|
||||||
CreateParticleEx("MagicFire", x + Sin(r,d), y - Cos(r,d), PV_Random(-2, 2), PV_Random(0, 4), PV_Random(10, 40), effect.particles, 2);
|
CreateParticle("MagicFire", x + Sin(r,d), y - Cos(r,d), PV_Random(-2, 2), PV_Random(0, 4), PV_Random(10, 40), effect.particles, 2);
|
||||||
}
|
}
|
||||||
for(var obj in FindObjects(Find_Distance(62,x,y)))
|
for(var obj in FindObjects(Find_Distance(62,x,y)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,7 +73,7 @@ global func FxBlessTheKingTimer(object target, effect, int timer)
|
||||||
|
|
||||||
if(king->Contents(0)) king->Contents(0)->~MakeKingSize();
|
if(king->Contents(0)) king->Contents(0)->~MakeKingSize();
|
||||||
if(king->Contents(1)) king->Contents(1)->~MakeKingSize();
|
if(king->Contents(1)) king->Contents(1)->~MakeKingSize();
|
||||||
king->CreateParticleEx("Fire", PV_Random(-4, 4), PV_Random(-11, 8), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(10, 30), effect.particles, 10);
|
king->CreateParticle("Fire", PV_Random(-4, 4), PV_Random(-11, 8), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(10, 30), effect.particles, 10);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ global func FxDeathByFireTimer(object target, effect, int timer)
|
||||||
for(var obj in FindObjects(Find_InRect(55,0,50,30),Find_OCF(OCF_Alive),Find_Not(Find_ID(MovingBrick))))
|
for(var obj in FindObjects(Find_InRect(55,0,50,30),Find_OCF(OCF_Alive),Find_Not(Find_ID(MovingBrick))))
|
||||||
obj->RemoveObject();
|
obj->RemoveObject();
|
||||||
|
|
||||||
CreateParticleEx("Fire", PV_Random(55, 90), PV_Random(0, 40), PV_Random(-1, 1), PV_Random(0, 20), PV_Random(10, 40), Particles_Fire(), 20);
|
CreateParticle("Fire", PV_Random(55, 90), PV_Random(0, 40), PV_Random(-1, 1), PV_Random(0, 20), PV_Random(10, 40), Particles_Fire(), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
global func FxLavaBrickResetTimer(object target, effect, int timer)
|
global func FxLavaBrickResetTimer(object target, effect, int timer)
|
||||||
|
|
|
@ -37,7 +37,7 @@ public func FinishedAiming(object clonk, int angle)
|
||||||
|
|
||||||
public func FxExplosiveArrowTimer(pTarget, effect, iEffectTime)
|
public func FxExplosiveArrowTimer(pTarget, effect, iEffectTime)
|
||||||
{
|
{
|
||||||
pTarget->CreateParticleEx("Fire", 0, 0, PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(10, 20), Particles_Glimmer(), 5);
|
pTarget->CreateParticle("Fire", 0, 0, PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(10, 20), Particles_Glimmer(), 5);
|
||||||
effect.timer++;
|
effect.timer++;
|
||||||
if(!pTarget->GetXDir() && !pTarget->GetYDir()) effect.timer = Max(effect.timer,65);
|
if(!pTarget->GetXDir() && !pTarget->GetYDir()) effect.timer = Max(effect.timer,65);
|
||||||
if(effect.timer>90) pTarget->Explode(15+Random(7));
|
if(effect.timer>90) pTarget->Explode(15+Random(7));
|
||||||
|
|
|
@ -48,8 +48,8 @@ private func FireWeapon(object clonk, int angle)
|
||||||
|
|
||||||
var x = Sin(angle, 20);
|
var x = Sin(angle, 20);
|
||||||
var y = -Cos(angle, 20);
|
var y = -Cos(angle, 20);
|
||||||
CreateParticleEx("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
|
CreateParticle("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
|
||||||
clonk->CreateMuzzleFlash(IX, IY, angle, 20);
|
clonk->CreateMuzzleFlash(IX, IY, angle, 20);
|
||||||
|
|
||||||
CreateParticleEx("Flash", 0, 0, 0, 0, 8, Particles_Flash());
|
CreateParticle("Flash", 0, 0, 0, 0, 8, Particles_Flash());
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@ global func FxWindChannelTimer(object target, proplist effect)
|
||||||
continue;
|
continue;
|
||||||
obj->SetYDir(speed - 36, 100);
|
obj->SetYDir(speed - 36, 100);
|
||||||
}
|
}
|
||||||
CreateParticleEx("Air", 464+Random(40), 344+Random(112), RandomX(-1,1), -30, PV_Random(10, 40), Overcast_air_particles);
|
CreateParticle("Air", 464+Random(40), 344+Random(112), RandomX(-1,1), -30, PV_Random(10, 40), Overcast_air_particles);
|
||||||
|
|
||||||
// Divider with random wind.
|
// Divider with random wind.
|
||||||
if (!Random(100))
|
if (!Random(100))
|
||||||
|
@ -212,11 +212,11 @@ global func FxWindChannelTimer(object target, proplist effect)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (effect.Divider == 1)
|
if (effect.Divider == 1)
|
||||||
CreateParticleEx("Air", 464+Random(40), 280+Random(10), RandomX(-1,1), -30, PV_Random(10, 40), Overcast_air_particles);
|
CreateParticle("Air", 464+Random(40), 280+Random(10), RandomX(-1,1), -30, PV_Random(10, 40), Overcast_air_particles);
|
||||||
if (effect.Divider == 0)
|
if (effect.Divider == 0)
|
||||||
CreateParticleEx("Air", 464+Random(40), 280+Random(10), RandomX(-20,-10), -20, PV_Random(10, 40), Overcast_air_particles);
|
CreateParticle("Air", 464+Random(40), 280+Random(10), RandomX(-20,-10), -20, PV_Random(10, 40), Overcast_air_particles);
|
||||||
if (effect.Divider == 2)
|
if (effect.Divider == 2)
|
||||||
CreateParticleEx("Air", 464+Random(40), 280+Random(10), RandomX(10,20), -20, PV_Random(10, 40), Overcast_air_particles);
|
CreateParticle("Air", 464+Random(40), 280+Random(10), RandomX(10,20), -20, PV_Random(10, 40), Overcast_air_particles);
|
||||||
|
|
||||||
// Second shaft with upward wind.
|
// Second shaft with upward wind.
|
||||||
for (var obj in FindObjects(Find_InRect(464, 96, 40, 144)))
|
for (var obj in FindObjects(Find_InRect(464, 96, 40, 144)))
|
||||||
|
@ -243,7 +243,7 @@ global func FxWindChannelTimer(object target, proplist effect)
|
||||||
continue;
|
continue;
|
||||||
obj->SetYDir(speed - 36, 100);
|
obj->SetYDir(speed - 36, 100);
|
||||||
}
|
}
|
||||||
CreateParticleEx("Air", 464+Random(40), 160+Random(96), RandomX(-1,1), -30, PV_Random(10, 40), Overcast_air_particles);
|
CreateParticle("Air", 464+Random(40), 160+Random(96), RandomX(-1,1), -30, PV_Random(10, 40), Overcast_air_particles);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -340,7 +340,7 @@ func OnClonkLeftRelaunch(object clonk)
|
||||||
{
|
{
|
||||||
var pos = GetRandomSpawn();
|
var pos = GetRandomSpawn();
|
||||||
clonk->SetPosition(pos[0],pos[1]);
|
clonk->SetPosition(pos[0],pos[1]);
|
||||||
CreateParticleEx("Air", pos[0],pos[1], PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(5, 10), Overcast_air_particles, 25);
|
CreateParticle("Air", pos[0],pos[1], PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(5, 10), Overcast_air_particles, 25);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ public func FxFireballTimer(pTarget, effect, iEffectTime)
|
||||||
var xspeed = Sin(angle, 6);
|
var xspeed = Sin(angle, 6);
|
||||||
var yspeed = -Cos(angle, 6);
|
var yspeed = -Cos(angle, 6);
|
||||||
|
|
||||||
CreateParticleEx("SmokeDirty", x, y, PV_Random(-2, 2), PV_Random(-2, 2), PV_Random(30, 60), Particles_SmokeTrail(), 1);
|
CreateParticle("SmokeDirty", x, y, PV_Random(-2, 2), PV_Random(-2, 2), PV_Random(30, 60), Particles_SmokeTrail(), 1);
|
||||||
CreateParticleEx("FireDense", x, y, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(5, 20), Particles_Fire(), 10);
|
CreateParticle("FireDense", x, y, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(5, 20), Particles_Fire(), 10);
|
||||||
CreateParticleEx("Fire", x, y, PV_Random(0, - 10 * xspeed), PV_Random(0, - 10 * yspeed), PV_Random(20, 90), Particles_Glimmer(), 10);
|
CreateParticle("Fire", x, y, PV_Random(0, - 10 * xspeed), PV_Random(0, - 10 * yspeed), PV_Random(20, 90), Particles_Glimmer(), 10);
|
||||||
|
|
||||||
effect.x += xspeed;
|
effect.x += xspeed;
|
||||||
effect.y += yspeed;
|
effect.y += yspeed;
|
||||||
|
|
|
@ -42,12 +42,12 @@ public func FxWindScrollStormTimer(pTarget, effect, iEffectTime)
|
||||||
{
|
{
|
||||||
var r=Random(360);
|
var r=Random(360);
|
||||||
var d=Random(40);
|
var d=Random(40);
|
||||||
CreateParticleEx("Air", Sin(r,d)+x,-Cos(r,d)+y, xdir/3, ydir/3, PV_Random(10, 30), effect.particles, 1);
|
CreateParticle("Air", Sin(r,d)+x,-Cos(r,d)+y, xdir/3, ydir/3, PV_Random(10, 30), effect.particles, 1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(iEffectTime<180 )
|
else if(iEffectTime<180 )
|
||||||
{
|
{
|
||||||
CreateParticleEx("Air", PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), xdir/2, ydir/2, PV_Random(10, 30), effect.particles, 5);
|
CreateParticle("Air", PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), xdir/2, ydir/2, PV_Random(10, 30), effect.particles, 5);
|
||||||
|
|
||||||
for(var obj in FindObjects(Find_Distance(40,x,y),Find_Not(Find_Category(C4D_Structure))))
|
for(var obj in FindObjects(Find_Distance(40,x,y),Find_Not(Find_Category(C4D_Structure))))
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@ private func Destroy()
|
||||||
G = 50,
|
G = 50,
|
||||||
B = 50
|
B = 50
|
||||||
};
|
};
|
||||||
CreateParticleEx("Grass", 0, 0, PV_Random(-20, 20), PV_Random(-20, 10), PV_Random(30, 100), particles, 30);
|
CreateParticle("Grass", 0, 0, PV_Random(-20, 20), PV_Random(-20, 10), PV_Random(30, 100), particles, 30);
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ protected func OnPlayerRelaunch(int plr)
|
||||||
|
|
||||||
func OnClonkLeftRelaunch(object clonk)
|
func OnClonkLeftRelaunch(object clonk)
|
||||||
{
|
{
|
||||||
clonk->CreateParticleEx("Fire", 0, 0, PV_Random(-20, 20), PV_Random(-40, 5), PV_Random(20, 90), Particles_Glimmer(), 30);
|
clonk->CreateParticle("Fire", 0, 0, PV_Random(-20, 20), PV_Random(-40, 5), PV_Random(20, 90), Particles_Glimmer(), 30);
|
||||||
clonk->SetYDir(-5);
|
clonk->SetYDir(-5);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ global func FxBlessTheKingTimer(object target, effect, int timer)
|
||||||
particles = ThunderousSkies_air_particles_red;
|
particles = ThunderousSkies_air_particles_red;
|
||||||
duration *= 2;
|
duration *= 2;
|
||||||
}
|
}
|
||||||
king->CreateParticleEx("Air", 0, 8, PV_Random(-10, 10),PV_Random(0, 10), PV_Random(duration, 2 * duration), particles, 4);
|
king->CreateParticle("Air", 0, 8, PV_Random(-10, 10),PV_Random(0, 10), PV_Random(duration, 2 * duration), particles, 4);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,8 +128,8 @@ global func FxChanneledWindTimer()
|
||||||
obj->SetYDir(Max(obj->GetYDir()-5,-50));
|
obj->SetYDir(Max(obj->GetYDir()-5,-50));
|
||||||
obj->SetXDir(obj->GetXDir()+RandomX(-1,1));
|
obj->SetXDir(obj->GetXDir()+RandomX(-1,1));
|
||||||
}
|
}
|
||||||
CreateParticleEx("Air", 230+Random(40),398,RandomX(-1,1),-30, PV_Random(10, 30), ThunderousSkies_air_particles);
|
CreateParticle("Air", 230+Random(40),398,RandomX(-1,1),-30, PV_Random(10, 30), ThunderousSkies_air_particles);
|
||||||
CreateParticleEx("Air", 700+Random(60),348,RandomX(-1,1),-30, PV_Random(10, 30), ThunderousSkies_air_particles);
|
CreateParticle("Air", 700+Random(60),348,RandomX(-1,1),-30, PV_Random(10, 30), ThunderousSkies_air_particles);
|
||||||
}
|
}
|
||||||
|
|
||||||
global func FxBalloonsTimer()
|
global func FxBalloonsTimer()
|
||||||
|
@ -159,7 +159,7 @@ global func FxBalloonsTimer()
|
||||||
var balloon = CreateObject(TargetBalloon, x, y-30, NO_OWNER);
|
var balloon = CreateObject(TargetBalloon, x, y-30, NO_OWNER);
|
||||||
balloon->SetProperty("load",target);
|
balloon->SetProperty("load",target);
|
||||||
target->SetAction("Attach", balloon);
|
target->SetAction("Attach", balloon);
|
||||||
CreateParticleEx("Flash", x, y, 0, 0, 8, Particles_Flash());
|
CreateParticle("Flash", x, y, 0, 0, 8, Particles_Flash());
|
||||||
AddEffect("HorizontalMoving", balloon, 1, 1, balloon);
|
AddEffect("HorizontalMoving", balloon, 1, 1, balloon);
|
||||||
balloon->SetXDir(((Random(2)*2)-1) * (Random(4)+3));
|
balloon->SetXDir(((Random(2)*2)-1) * (Random(4)+3));
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ private func MakeTarget(int x, int y)
|
||||||
var balloon = CreateObject(TargetBalloon, x, y-30, NO_OWNER);
|
var balloon = CreateObject(TargetBalloon, x, y-30, NO_OWNER);
|
||||||
balloon->SetProperty("load",target);
|
balloon->SetProperty("load",target);
|
||||||
target->SetAction("Attach", balloon);
|
target->SetAction("Attach", balloon);
|
||||||
CreateParticleEx("Flash", x, y, 0, 0, 8, Particles_Flash());
|
CreateParticle("Flash", x, y, 0, 0, 8, Particles_Flash());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,9 @@ public func FxFireballTimer(pTarget, effect, iEffectTime)
|
||||||
var xspeed = Sin(angle, 6);
|
var xspeed = Sin(angle, 6);
|
||||||
var yspeed = -Cos(angle, 6);
|
var yspeed = -Cos(angle, 6);
|
||||||
|
|
||||||
CreateParticleEx("SmokeDirty", x, y, PV_Random(-2, 2), PV_Random(-2, 2), PV_Random(30, 60), Particles_SmokeTrail(), 1);
|
CreateParticle("SmokeDirty", x, y, PV_Random(-2, 2), PV_Random(-2, 2), PV_Random(30, 60), Particles_SmokeTrail(), 1);
|
||||||
CreateParticleEx("FireDense", x, y, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(5, 20), Particles_Fire(), 10);
|
CreateParticle("FireDense", x, y, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(5, 20), Particles_Fire(), 10);
|
||||||
CreateParticleEx("Fire", x, y, PV_Random(0, - 10 * xspeed), PV_Random(0, - 10 * yspeed), PV_Random(20, 90), Particles_Glimmer(), 10);
|
CreateParticle("Fire", x, y, PV_Random(0, - 10 * xspeed), PV_Random(0, - 10 * yspeed), PV_Random(20, 90), Particles_Glimmer(), 10);
|
||||||
|
|
||||||
effect.x += xspeed;
|
effect.x += xspeed;
|
||||||
effect.y += yspeed;
|
effect.y += yspeed;
|
||||||
|
|
|
@ -59,14 +59,14 @@ global func FxThunderStrikeTimer(pTarget, effect, iEffectTime)
|
||||||
if(!(i%5))
|
if(!(i%5))
|
||||||
for(var k=0; k<y[i+wdt]; k+=10+Random(5))
|
for(var k=0; k<y[i+wdt]; k+=10+Random(5))
|
||||||
{
|
{
|
||||||
CreateParticleEx("ElectroSpark", i+move,k, PV_Random(-12, 12), PV_Random(-40, -10), PV_Random(20, 40), Particles_ElectroSpark1(), 3);
|
CreateParticle("ElectroSpark", i+move,k, PV_Random(-12, 12), PV_Random(-40, -10), PV_Random(20, 40), Particles_ElectroSpark1(), 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var l=0; l<3; l++)
|
for(var l=0; l<3; l++)
|
||||||
CreateParticleEx("ElectroSpark", i+move, y[i+wdt]-l-2, PV_Random(-20, 20), PV_Random(-20, -30), PV_Random(10, 20), particles, 3);
|
CreateParticle("ElectroSpark", i+move, y[i+wdt]-l-2, PV_Random(-20, 20), PV_Random(-20, -30), PV_Random(10, 20), particles, 3);
|
||||||
|
|
||||||
if(i%3 == 0)
|
if(i%3 == 0)
|
||||||
CreateParticleEx("LightningStrike", i+move, y[i+wdt]-32, 0, 0, PV_Random(3, 10), particles_lightning);
|
CreateParticle("LightningStrike", i+move, y[i+wdt]-32, 0, 0, PV_Random(3, 10), particles_lightning);
|
||||||
for(var t in FindObjects(Find_Or(Find_And(Find_ID(Clonk),Find_OCF(OCF_Alive)), Find_ID(TargetBalloon)),Find_OnLine(i+move,-0,i+move,y[i+wdt])))
|
for(var t in FindObjects(Find_Or(Find_And(Find_ID(Clonk),Find_OCF(OCF_Alive)), Find_ID(TargetBalloon)),Find_OnLine(i+move,-0,i+move,y[i+wdt])))
|
||||||
{
|
{
|
||||||
var add=true;
|
var add=true;
|
||||||
|
@ -103,7 +103,7 @@ global func FxThunderStrikeTimer(pTarget, effect, iEffectTime)
|
||||||
while(!GBackSolid(x+move+5,y) && y < LandscapeHeight())
|
while(!GBackSolid(x+move+5,y) && y < LandscapeHeight())
|
||||||
{
|
{
|
||||||
var add=Random((iEffectTime*5))*((Random(2)*2) -1);
|
var add=Random((iEffectTime*5))*((Random(2)*2) -1);
|
||||||
CreateParticleEx("Air", x+move+5+add, y, PV_Random(-2, 2), PV_Random(-10, -5), PV_Random(5, 20), effect.particles_air);
|
CreateParticle("Air", x+move+5+add, y, PV_Random(-2, 2), PV_Random(-10, -5), PV_Random(5, 20), effect.particles_air);
|
||||||
y+=Random(4)+3;
|
y+=Random(4)+3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,12 +42,12 @@ public func FxWindScrollStormTimer(pTarget, effect, iEffectTime)
|
||||||
{
|
{
|
||||||
var r=Random(360);
|
var r=Random(360);
|
||||||
var d=Random(40);
|
var d=Random(40);
|
||||||
CreateParticleEx("Air", Sin(r,d)+x,-Cos(r,d)+y, xdir/3, ydir/3, PV_Random(10, 30), effect.particles, 1);
|
CreateParticle("Air", Sin(r,d)+x,-Cos(r,d)+y, xdir/3, ydir/3, PV_Random(10, 30), effect.particles, 1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(iEffectTime<180 )
|
else if(iEffectTime<180 )
|
||||||
{
|
{
|
||||||
CreateParticleEx("Air", PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), xdir/2, ydir/2, PV_Random(10, 30), effect.particles, 5);
|
CreateParticle("Air", PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), xdir/2, ydir/2, PV_Random(10, 30), effect.particles, 5);
|
||||||
|
|
||||||
for(var obj in FindObjects(Find_Distance(40,x,y),Find_Not(Find_Category(C4D_Structure))))
|
for(var obj in FindObjects(Find_Distance(40,x,y),Find_Not(Find_Category(C4D_Structure))))
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@ public func IsProjectileTarget(target,shooter)
|
||||||
|
|
||||||
public func OnProjectileHit(object projectile)
|
public func OnProjectileHit(object projectile)
|
||||||
{
|
{
|
||||||
CreateParticleEx("Air", 0, -10, PV_Random(-30, 30), PV_Random(-30,30), PV_Random(30, 120), Particles_Air(), 10);
|
CreateParticle("Air", 0, -10, PV_Random(-30, 30), PV_Random(-30,30), PV_Random(30, 120), Particles_Air(), 10);
|
||||||
if(load) load->~Fall(projectile->GetController());
|
if(load) load->~Fall(projectile->GetController());
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ protected func FxFlightTimer(object pTarget, effect, int iEffectTime)
|
||||||
|
|
||||||
var xdir = GetXDir() / 2;
|
var xdir = GetXDir() / 2;
|
||||||
var ydir = GetYDir() / 2;
|
var ydir = GetYDir() / 2;
|
||||||
CreateParticleEx("FireDense", x, y, PV_Random(xdir - 20, xdir + 20), PV_Random(ydir - 20, ydir + 20), PV_Random(16 * 6, 38 * 6), {Prototype = Particles_Thrust(), Size = PV_Random(40, 60)}, 5);
|
CreateParticle("FireDense", x, y, PV_Random(xdir - 20, xdir + 20), PV_Random(ydir - 20, ydir + 20), PV_Random(16 * 6, 38 * 6), {Prototype = Particles_Thrust(), Size = PV_Random(40, 60)}, 5);
|
||||||
|
|
||||||
fuel--;
|
fuel--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ protected func FxFlightTimer(object pTarget, effect, int iEffectTime)
|
||||||
|
|
||||||
var xdir = GetXDir() / 2;
|
var xdir = GetXDir() / 2;
|
||||||
var ydir = GetYDir() / 2;
|
var ydir = GetYDir() / 2;
|
||||||
CreateParticleEx("FireDense", x, y, PV_Random(xdir - 4, xdir + 4), PV_Random(ydir - 4, ydir + 4), PV_Random(16, 38), Particles_Thrust(), 5);
|
CreateParticle("FireDense", x, y, PV_Random(xdir - 4, xdir + 4), PV_Random(ydir - 4, ydir + 4), PV_Random(16, 38), Particles_Thrust(), 5);
|
||||||
|
|
||||||
|
|
||||||
fuel--;
|
fuel--;
|
||||||
|
|
|
@ -56,7 +56,7 @@ private func Destroy()
|
||||||
Rotation = PV_Direction(PV_Random(900, 1100)),
|
Rotation = PV_Direction(PV_Random(900, 1100)),
|
||||||
Phase = PV_Random(0, 1)
|
Phase = PV_Random(0, 1)
|
||||||
};
|
};
|
||||||
CreateParticleEx("Lichen", PV_Random(-5, 5), PV_Random(-5, 5), PV_Random(-30, 30), PV_Random(-30, 30), PV_Random(36, 36 * 4), particles, 40);
|
CreateParticle("Lichen", PV_Random(-5, 5), PV_Random(-5, 5), PV_Random(-30, 30), PV_Random(-30, 30), PV_Random(36, 36 * 4), particles, 40);
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,5 +39,5 @@ public func ObjectControl(int plr, int ctrl, int x, int y, int strength, bool re
|
||||||
protected func FxParticlesTimer(object target, effect, int time)
|
protected func FxParticlesTimer(object target, effect, int time)
|
||||||
{
|
{
|
||||||
var angle = time*10 % 360;
|
var angle = time*10 % 360;
|
||||||
CreateParticleEx("SphereSpark", Sin(angle, 13), -Cos(angle, 13), 0, 0, PV_Random(20, 30), Particles_Spark());
|
CreateParticle("SphereSpark", Sin(angle, 13), -Cos(angle, 13), 0, 0, PV_Random(20, 30), Particles_Spark());
|
||||||
}
|
}
|
|
@ -33,7 +33,7 @@ func Footstep()
|
||||||
G = (clr >> 8) & 0xff,
|
G = (clr >> 8) & 0xff,
|
||||||
B = clr & 0xff,
|
B = clr & 0xff,
|
||||||
};
|
};
|
||||||
CreateParticleEx("Dust", PV_Random(dir * -5, dir * -3), 8, PV_Random(dir * 2, dir * 1), PV_Random(-2, -3), PV_Random(36, 2 * 36), particles, 5);
|
CreateParticle("Dust", PV_Random(dir * -5, dir * -3), 8, PV_Random(dir * 2, dir * 1), PV_Random(-2, -3), PV_Random(36, 2 * 36), particles, 5);
|
||||||
Sound("StepSoft?");
|
Sound("StepSoft?");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ protected func Construction() {
|
||||||
|
|
||||||
private func Shining()
|
private func Shining()
|
||||||
{
|
{
|
||||||
CreateParticleEx("Fire", 0, -5, 0, PV_Random(-1, 1), 20, Particles_Fire(), 2);
|
CreateParticle("Fire", 0, -5, 0, PV_Random(-1, 1), 20, Particles_Fire(), 2);
|
||||||
|
|
||||||
//check if position changed
|
//check if position changed
|
||||||
if (x != GetX() && y != GetY())
|
if (x != GetX() && y != GetY())
|
||||||
|
|
|
@ -19,6 +19,6 @@ global func FxFireScorchingTimer(object target, proplist effect, int time)
|
||||||
if (time >= effect.duration) { RemoveObject(); return FX_Execute_Kill; }
|
if (time >= effect.duration) { RemoveObject(); return FX_Execute_Kill; }
|
||||||
// particles
|
// particles
|
||||||
var wind = BoundBy(GetWind(), -5, 5);
|
var wind = BoundBy(GetWind(), -5, 5);
|
||||||
CreateParticleEx("SmokeDirty", PV_Random(-5, 5), PV_Random(-5, 5), wind, -effect.strength/8, PV_Random(20, 40), Particles_SmokeTrail(), 2);
|
CreateParticle("SmokeDirty", PV_Random(-5, 5), PV_Random(-5, 5), wind, -effect.strength/8, PV_Random(20, 40), Particles_SmokeTrail(), 2);
|
||||||
return FX_OK;
|
return FX_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,7 +215,7 @@ private func ExecuteStream(proplist s)
|
||||||
//Log("segment %d", i_segment);
|
//Log("segment %d", i_segment);
|
||||||
if (!s.is_blocked[i_segment+1]) StreamBlockVertex(s, i_segment+1);
|
if (!s.is_blocked[i_segment+1]) StreamBlockVertex(s, i_segment+1);
|
||||||
if (storm_debug)
|
if (storm_debug)
|
||||||
CreateParticleEx("SphereSpark", s.x[i_segment], s.y[i_segment], 0, 0, 36, {Size = 12});
|
CreateParticle("SphereSpark", s.x[i_segment], s.y[i_segment], 0, 0, 36, {Size = 12});
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// current segment base point
|
// current segment base point
|
||||||
|
@ -312,7 +312,7 @@ private func ExecuteStream(proplist s)
|
||||||
var v = Distance(vx,vy);
|
var v = Distance(vx,vy);
|
||||||
vx = vx * s.dir_len / v;
|
vx = vx * s.dir_len / v;
|
||||||
vy = vy * s.dir_len / v / 2;
|
vy = vy * s.dir_len / v / 2;
|
||||||
CreateParticleEx("Dust", PV_Random(x - 10, x + 10), PV_Random(y - 10, y + 10), PV_Random(vx * 80 / 100, vx * 120 / 100), PV_Random(vy, vy * 140 / 100), PV_Random(20, 40), storm_particles,local_strength);
|
CreateParticle("Dust", PV_Random(x - 10, x + 10), PV_Random(y - 10, y + 10), PV_Random(vx * 80 / 100, vx * 120 / 100), PV_Random(vy, vy * 140 / 100), PV_Random(20, 40), storm_particles,local_strength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -392,7 +392,7 @@ func Footstep()
|
||||||
G = (clr >> 8) & 0xff,
|
G = (clr >> 8) & 0xff,
|
||||||
B = clr & 0xff,
|
B = clr & 0xff,
|
||||||
};
|
};
|
||||||
CreateParticleEx("Dust", PV_Random(dir * -2, dir * -1), 8, PV_Random(dir * 2, dir * 1), PV_Random(-2, -3), PV_Random(36, 2 * 36), particles, 5);
|
CreateParticle("Dust", PV_Random(dir * -2, dir * -1), 8, PV_Random(dir * 2, dir * 1), PV_Random(-2, -3), PV_Random(36, 2 * 36), particles, 5);
|
||||||
Sound("StepSoft?");
|
Sound("StepSoft?");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -976,7 +976,7 @@ func FxIntSwimTimer(pTarget, effect, iTime)
|
||||||
B = (color >> 0) & 0xff,
|
B = (color >> 0) & 0xff,
|
||||||
Attach = ATTACH_Front,
|
Attach = ATTACH_Front,
|
||||||
};
|
};
|
||||||
CreateParticleEx("Wave", 0, -4, (RandomX(-5,5)-(-1+2*GetDir())*4)/4, 0, 16, particles);
|
CreateParticle("Wave", 0, -4, (RandomX(-5,5)-(-1+2*GetDir())*4)/4, 0, 16, particles);
|
||||||
}
|
}
|
||||||
Sound("Splash?");
|
Sound("Splash?");
|
||||||
}
|
}
|
||||||
|
@ -1052,7 +1052,7 @@ func Hit(int iXSpeed, int iYSpeed)
|
||||||
G = (clr >> 8) & 0xff,
|
G = (clr >> 8) & 0xff,
|
||||||
B = clr & 0xff,
|
B = clr & 0xff,
|
||||||
};
|
};
|
||||||
CreateParticleEx("Dust", PV_Random(-4, 4), 8, PV_Random(-3, 3), PV_Random(-2, -4), PV_Random(36, 2 * 36), particles, 12);
|
CreateParticle("Dust", PV_Random(-4, 4), 8, PV_Random(-3, 3), PV_Random(-2, -4), PV_Random(36, 2 * 36), particles, 12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1069,7 +1069,7 @@ func Hit(int iXSpeed, int iYSpeed)
|
||||||
G = (clr >> 8) & 0xff,
|
G = (clr >> 8) & 0xff,
|
||||||
B = clr & 0xff,
|
B = clr & 0xff,
|
||||||
};
|
};
|
||||||
CreateParticleEx("Dust", PV_Random(-4, 4), 8, PV_Random(-3, 3), PV_Random(-2, -4), PV_Random(36, 2 * 36), particles, 12);
|
CreateParticle("Dust", PV_Random(-4, 4), 8, PV_Random(-3, 3), PV_Random(-2, -4), PV_Random(36, 2 * 36), particles, 12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1138,7 +1138,7 @@ func FxRollingTimer(object target, int num, int timer)
|
||||||
G = (clr >> 8) & 0xff,
|
G = (clr >> 8) & 0xff,
|
||||||
B = clr & 0xff,
|
B = clr & 0xff,
|
||||||
};
|
};
|
||||||
CreateParticleEx("Dust", PV_Random(dir * -2, dir * -1), 8, PV_Random(dir * 2, dir * 1), PV_Random(-2, -5), PV_Random(36, 2 * 36), particles, 6);
|
CreateParticle("Dust", PV_Random(dir * -2, dir * -1), 8, PV_Random(dir * 2, dir * 1), PV_Random(-2, -5), PV_Random(36, 2 * 36), particles, 6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ func Show(int clr, int layer, int size,bool diffuse)
|
||||||
x = Sin(angle,+radius);
|
x = Sin(angle,+radius);
|
||||||
y = Cos(angle,-radius/3);
|
y = Cos(angle,-radius/3);
|
||||||
|
|
||||||
CreateParticleEx("Cloud", x, y, PV_Random(-diffuse, +diffuse), 0, 0, particles);
|
CreateParticle("Cloud", x, y, PV_Random(-diffuse, +diffuse), 0, 0, particles);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ global func AddTrajectory(object pObj, int iX, int iY, int iXDir, int iYDir, int
|
||||||
// If we are far enough away insert a new point
|
// If we are far enough away insert a new point
|
||||||
if(Distance((iXOld - iX) / iFaktor, (iYOld - iY) / iFaktor) >= spacing)
|
if(Distance((iXOld - iX) / iFaktor, (iYOld - iY) / iFaktor) >= spacing)
|
||||||
{
|
{
|
||||||
pTrajectory->CreateParticleEx("Magic", iX/iFaktor - pTrajectory->GetX(), iY/iFaktor - pTrajectory->GetY(), 0, 0, 0, particles);
|
pTrajectory->CreateParticle("Magic", iX/iFaktor - pTrajectory->GetX(), iY/iFaktor - pTrajectory->GetY(), 0, 0, 0, particles);
|
||||||
iXOld = iX; iYOld = iY;
|
iXOld = iX; iYOld = iY;
|
||||||
}
|
}
|
||||||
// Or is it here already?
|
// Or is it here already?
|
||||||
|
|
|
@ -128,7 +128,7 @@ private func DrawRotatedParticleLine(string particle, int x1, int y1, int x2, in
|
||||||
};
|
};
|
||||||
for (var i = count+1; --i; )
|
for (var i = count+1; --i; )
|
||||||
{
|
{
|
||||||
CreateParticleEx(particle, x1 + deltax * i / count, y1 + deltay * i / count, 0, 0, 18, particle_prop);
|
CreateParticle(particle, x1 + deltax * i / count, y1 + deltay * i / count, 0, 0, 18, particle_prop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,10 +91,10 @@ protected func FxIntMeteorTimer()
|
||||||
ydir -= size * ydir ** 2 / 11552000; // Magic number.
|
ydir -= size * ydir ** 2 / 11552000; // Magic number.
|
||||||
SetYDir(ydir, 100);
|
SetYDir(ydir, 100);
|
||||||
// Smoke trail.
|
// Smoke trail.
|
||||||
CreateParticleEx("Smoke", PV_Random(-2, 2), PV_Random(-2, 2), PV_Random(-3, 3), PV_Random(-3, 3), 30 + Random(60), Particles_SmokeTrail(), 5);
|
CreateParticle("Smoke", PV_Random(-2, 2), PV_Random(-2, 2), PV_Random(-3, 3), PV_Random(-3, 3), 30 + Random(60), Particles_SmokeTrail(), 5);
|
||||||
// Fire trail.
|
// Fire trail.
|
||||||
CreateParticleEx("MagicSpark", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), 16, Particles_SparkFire(), 4);
|
CreateParticle("MagicSpark", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), 16, Particles_SparkFire(), 4);
|
||||||
CreateParticleEx("Fire", PV_Random(-size / 8, size / 8), PV_Random(-size / 8, size / 8), PV_Random(-1, 1), PV_Random(-1, 1), 30, Particles_FireTrail(), 6 + size / 10);
|
CreateParticle("Fire", PV_Random(-size / 8, size / 8), PV_Random(-size / 8, size / 8), PV_Random(-1, 1), PV_Random(-1, 1), 30, Particles_FireTrail(), 6 + size / 10);
|
||||||
// Sound.
|
// Sound.
|
||||||
|
|
||||||
// Burning and friction decrease size.
|
// Burning and friction decrease size.
|
||||||
|
@ -114,7 +114,7 @@ protected func Hit(int xdir, int ydir)
|
||||||
Prototype = Particles_Fire(),
|
Prototype = Particles_Fire(),
|
||||||
Attach = nil
|
Attach = nil
|
||||||
};
|
};
|
||||||
CreateParticleEx("Fire", PV_Random(-size / 4, size / 4), PV_Random(-size / 4, size / 4), PV_Random(-size/4, size/4), PV_Random(-size/4, size/4), 30, particles, 20 + size);
|
CreateParticle("Fire", PV_Random(-size / 4, size / 4), PV_Random(-size / 4, size / 4), PV_Random(-size/4, size/4), PV_Random(-size/4, size/4), 30, particles, 20 + size);
|
||||||
// Explode meteor, explode size scales with the energy of the meteor.
|
// Explode meteor, explode size scales with the energy of the meteor.
|
||||||
var dam = size * speed2 / 500;
|
var dam = size * speed2 / 500;
|
||||||
dam = BoundBy(size/2, 5, 30);
|
dam = BoundBy(size/2, 5, 30);
|
||||||
|
|
|
@ -112,7 +112,7 @@ protected func FxFlagCarriedTimer(object target, effect)
|
||||||
// Draw partical line following the flag.
|
// Draw partical line following the flag.
|
||||||
if (Distance(x, y, newx, newy) > 5)
|
if (Distance(x, y, newx, newy) > 5)
|
||||||
{
|
{
|
||||||
target->CreateParticleEx("SphereSpark", 0, 0, 0, 0, PV_Random(36 * 3, 36 * 3 + 10), effect.tracer_particles);
|
target->CreateParticle("SphereSpark", 0, 0, 0, 0, PV_Random(36 * 3, 36 * 3 + 10), effect.tracer_particles);
|
||||||
effect.x=newx;
|
effect.x=newx;
|
||||||
effect.y=newy;
|
effect.y=newy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,7 @@ protected func UpdateGraphics(int time)
|
||||||
checkpoint_particles.R = (color >> 16) & 0xff;
|
checkpoint_particles.R = (color >> 16) & 0xff;
|
||||||
checkpoint_particles.G = (color >> 8) & 0xff;
|
checkpoint_particles.G = (color >> 8) & 0xff;
|
||||||
checkpoint_particles.B = (color >> 0) & 0xff;
|
checkpoint_particles.B = (color >> 0) & 0xff;
|
||||||
CreateParticleEx("SphereSpark", Sin(angle, cp_size), -Cos(angle, cp_size), 0, 0, 18 * 5, checkpoint_particles);
|
CreateParticle("SphereSpark", Sin(angle, cp_size), -Cos(angle, cp_size), 0, 0, 18 * 5, checkpoint_particles);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,8 +126,8 @@ func FxCheckStuckTimer(_, effect)
|
||||||
|
|
||||||
func FxSparkleTimer(_, effect)
|
func FxSparkleTimer(_, effect)
|
||||||
{
|
{
|
||||||
CreateParticleEx("ItemSpark", PV_Random(0, GetXDir()/10), PV_Random(0, GetYDir()/10), GetXDir(), GetYDir(), 36, ItemSpark_particle, 5);
|
CreateParticle("ItemSpark", PV_Random(0, GetXDir()/10), PV_Random(0, GetYDir()/10), GetXDir(), GetYDir(), 36, ItemSpark_particle, 5);
|
||||||
CreateParticleEx("ItemSpark", PV_Random(0, GetXDir()/10), PV_Random(0, GetYDir()/10), GetXDir(), GetYDir(), 20, ItemSpark_particle_additive, 5);
|
CreateParticle("ItemSpark", PV_Random(0, GetXDir()/10), PV_Random(0, GetYDir()/10), GetXDir(), GetYDir(), 20, ItemSpark_particle_additive, 5);
|
||||||
|
|
||||||
if(!Random(36))
|
if(!Random(36))
|
||||||
for(var i=0;i<3;++i)
|
for(var i=0;i<3;++i)
|
||||||
|
@ -161,8 +161,8 @@ func FxSparkleDeathTimer(_, effect, effect_time)
|
||||||
effect.velY*=-1;
|
effect.velY*=-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
effect.from->CreateParticleEx("ItemSpark", AbsX(effect.x), AbsY(effect.y), 0, 0, 18, ItemSpark_particle, 1);
|
effect.from->CreateParticle("ItemSpark", AbsX(effect.x), AbsY(effect.y), 0, 0, 18, ItemSpark_particle, 1);
|
||||||
effect.from->CreateParticleEx("ItemSpark", AbsX(effect.x), AbsY(effect.y), 0, 0, 10, ItemSpark_particle_additive, 1);
|
effect.from->CreateParticle("ItemSpark", AbsX(effect.x), AbsY(effect.y), 0, 0, 10, ItemSpark_particle_additive, 1);
|
||||||
|
|
||||||
effect.xT+=effect.velX;
|
effect.xT+=effect.velX;
|
||||||
effect.yT+=effect.velY;
|
effect.yT+=effect.velY;
|
||||||
|
|
|
@ -90,7 +90,7 @@ protected func FxRestoreTimer(object target, effect, int time)
|
||||||
var y = init_y - Cos(angle, 2 * time);
|
var y = init_y - Cos(angle, 2 * time);
|
||||||
target->SetPosition(x, y);
|
target->SetPosition(x, y);
|
||||||
|
|
||||||
CreateParticleEx("SphereSpark", 0, 0, 0, 0, 36, particles, 1);
|
CreateParticle("SphereSpark", 0, 0, 0, 0, 36, particles, 1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ protected func FxRestoreStop(object target, effect, int reason, bool temporary)
|
||||||
to_x = to_container->GetX();
|
to_x = to_container->GetX();
|
||||||
to_y = to_container->GetY();
|
to_y = to_container->GetY();
|
||||||
}
|
}
|
||||||
CreateParticleEx("SphereSpark", to_x - GetX(), to_y - GetY(), PV_Random(-50, 50), PV_Random(-50, 50), PV_Random(2, 10), particles, 10);
|
CreateParticle("SphereSpark", to_x - GetX(), to_y - GetY(), PV_Random(-50, 50), PV_Random(-50, 50), PV_Random(2, 10), particles, 10);
|
||||||
}
|
}
|
||||||
// Sound.
|
// Sound.
|
||||||
//TODO new sound.
|
//TODO new sound.
|
||||||
|
|
|
@ -35,7 +35,7 @@ func FxSparkleStart(target, effect, temp)
|
||||||
func FxSparkleTimer(target, effect, effect_time)
|
func FxSparkleTimer(target, effect, effect_time)
|
||||||
{
|
{
|
||||||
if(this()->Contained() || !Random(2)) return FX_OK;
|
if(this()->Contained() || !Random(2)) return FX_OK;
|
||||||
CreateParticleEx("MagicRing", 0, 0, 0, 0, effect.Interval, effect.particles, 1);
|
CreateParticle("MagicRing", 0, 0, 0, 0, effect.Interval, effect.particles, 1);
|
||||||
return FX_OK;
|
return FX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ func FxIntAxeTimer(object clonk, effect, int time)
|
||||||
// need to be behind the Clonk?
|
// need to be behind the Clonk?
|
||||||
if (clonk.Plane > effect.tree.Plane)
|
if (clonk.Plane > effect.tree.Plane)
|
||||||
particles = {Prototype = Particles_WoodChip(), Attach = ATTACH_Back};
|
particles = {Prototype = Particles_WoodChip(), Attach = ATTACH_Back};
|
||||||
clonk->CreateParticleEx("WoodChip", x, 4, PV_Random(-12, 12), PV_Random(-13, -6), PV_Random(36 * 3, 36 * 10), particles, 10);
|
clonk->CreateParticle("WoodChip", x, 4, PV_Random(-12, 12), PV_Random(-13, -6), PV_Random(36 * 3, 36 * 10), particles, 10);
|
||||||
// Damage tree
|
// Damage tree
|
||||||
effect.tree->DoDamage(this.ChopStrength, 3, clonk->GetOwner()); // 3 = FX_Call_DmgChop
|
effect.tree->DoDamage(this.ChopStrength, 3, clonk->GetOwner()); // 3 = FX_Call_DmgChop
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ func FxIntSplitTimer(object clonk, effect, int time)
|
||||||
if(clonk->GetDirection() == COMD_Left) x = x * -1;
|
if(clonk->GetDirection() == COMD_Left) x = x * -1;
|
||||||
|
|
||||||
//Create the woodchip particle
|
//Create the woodchip particle
|
||||||
clonk->CreateParticleEx("WoodChip", x, 4, PV_Random(-12, 12), PV_Random(-13, -6), PV_Random(36 * 3, 36 * 10), Particles_WoodChip(), 10);
|
clonk->CreateParticle("WoodChip", x, 4, PV_Random(-12, 12), PV_Random(-13, -6), PV_Random(36 * 3, 36 * 10), Particles_WoodChip(), 10);
|
||||||
}
|
}
|
||||||
// Tree split!
|
// Tree split!
|
||||||
if ((axe_swing_time * 12) / time == 1)
|
if ((axe_swing_time * 12) / time == 1)
|
||||||
|
|
|
@ -13,7 +13,7 @@ protected func Initialize()
|
||||||
AddEffect("Float",this,1,1,this);
|
AddEffect("Float",this,1,1,this);
|
||||||
|
|
||||||
//Special Effects
|
//Special Effects
|
||||||
CreateParticleEx("Air", PV_Random(-1, 1), PV_Random(15, 17), PV_Random(-3, 3), PV_Random(0, 2), 18, Particles_Air(), 20);
|
CreateParticle("Air", PV_Random(-1, 1), PV_Random(15, 17), PV_Random(-3, 3), PV_Random(0, 2), 18, Particles_Air(), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
private func Deflate()
|
private func Deflate()
|
||||||
|
@ -29,7 +29,7 @@ private func Deflate()
|
||||||
private func DeflateEffect()
|
private func DeflateEffect()
|
||||||
{
|
{
|
||||||
var act_time = GetActTime();
|
var act_time = GetActTime();
|
||||||
CreateParticleEx("Air", PV_Random(-1, 1), PV_Random(-1, 5), PV_Random(-act_time, act_time), PV_Random(-act_time, act_time), 18, Particles_Air(), act_time);
|
CreateParticle("Air", PV_Random(-1, 1), PV_Random(-1, 5), PV_Random(-act_time, act_time), PV_Random(-act_time, act_time), 18, Particles_Air(), act_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
private func Pack()
|
private func Pack()
|
||||||
|
@ -73,7 +73,7 @@ public func IsProjectileTarget(target,shooter)
|
||||||
public func OnProjectileHit()
|
public func OnProjectileHit()
|
||||||
{
|
{
|
||||||
//Pop!
|
//Pop!
|
||||||
CreateParticleEx("Air", 0, -10, PV_Random(-10, 10), PV_Random(-10, 10), 10, Particles_Air(), 30);
|
CreateParticle("Air", 0, -10, PV_Random(-10, 10), PV_Random(-10, 10), 10, Particles_Air(), 30);
|
||||||
Sound("BalloonPop");
|
Sound("BalloonPop");
|
||||||
if (rider)
|
if (rider)
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,7 +134,7 @@ protected func FxFlightTimer(object pTarget, effect, int iEffectTime)
|
||||||
|
|
||||||
var xdir = GetXDir() / 2;
|
var xdir = GetXDir() / 2;
|
||||||
var ydir = GetYDir() / 2;
|
var ydir = GetYDir() / 2;
|
||||||
CreateParticleEx("FireDense", x, y, PV_Random(xdir - 4, xdir + 4), PV_Random(ydir - 4, ydir + 4), PV_Random(16, 38), Particles_Thrust(), 5);
|
CreateParticle("FireDense", x, y, PV_Random(xdir - 4, xdir + 4), PV_Random(ydir - 4, ydir + 4), PV_Random(16, 38), Particles_Thrust(), 5);
|
||||||
|
|
||||||
fuel--;
|
fuel--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ private func Fusing()
|
||||||
|
|
||||||
// Effekt
|
// Effekt
|
||||||
if(GetActTime() < FuseTime() - 20)
|
if(GetActTime() < FuseTime() - 20)
|
||||||
CreateParticleEx("Fire", x, y, PV_Random(x - 5, x + 5), PV_Random(y - 15, y + 5), PV_Random(10, 40), Particles_Glimmer(), 3);
|
CreateParticle("Fire", x, y, PV_Random(x - 5, x + 5), PV_Random(y - 15, y + 5), PV_Random(10, 40), Particles_Glimmer(), 3);
|
||||||
// Explosion
|
// Explosion
|
||||||
else if(GetActTime() > FuseTime())
|
else if(GetActTime() > FuseTime())
|
||||||
DoExplode();
|
DoExplode();
|
||||||
|
|
|
@ -90,7 +90,7 @@ func FxIntFusingTimer()
|
||||||
fuse_x += Sin(iAngle, speed);
|
fuse_x += Sin(iAngle, speed);
|
||||||
fuse_y +=-Cos(iAngle, speed);
|
fuse_y +=-Cos(iAngle, speed);
|
||||||
|
|
||||||
CreateParticleEx("Fire", fuse_x/10-GetX(), fuse_y/10-GetY(), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(10, 40), Particles_Glimmer(), 3);
|
CreateParticle("Fire", fuse_x/10-GetX(), fuse_y/10-GetY(), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(10, 40), Particles_Glimmer(), 3);
|
||||||
SetVertexXY(fuse_vertex, fuse_x/10, fuse_y/10);
|
SetVertexXY(fuse_vertex, fuse_x/10, fuse_y/10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,13 +120,13 @@ protected func DoSwing(object clonk, int ix, int iy)
|
||||||
B = clr & 0xff,
|
B = clr & 0xff,
|
||||||
Size = PV_KeyFrames(0, 0, 0, 200, PV_Random(2, 50), 1000, 0),
|
Size = PV_KeyFrames(0, 0, 0, 200, PV_Random(2, 50), 1000, 0),
|
||||||
};
|
};
|
||||||
CreateParticleEx("Dust", x2, y2, PV_Random(-3, 3), PV_Random(-3, -3), PV_Random(18, 1 * 36), particles, 3);
|
CreateParticle("Dust", x2, y2, PV_Random(-3, 3), PV_Random(-3, -3), PV_Random(18, 1 * 36), particles, 3);
|
||||||
Sound("Dig?");
|
Sound("Dig?");
|
||||||
}
|
}
|
||||||
//It's solid, but not diggable. So it is a hard mineral.
|
//It's solid, but not diggable. So it is a hard mineral.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CreateParticleEx("Spark", x2*9/10,y2*9/10, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(10, 20), Particles_Glimmer(), 10);
|
CreateParticle("Spark", x2*9/10,y2*9/10, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(10, 20), Particles_Glimmer(), 10);
|
||||||
Sound("Clang?");
|
Sound("Clang?");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ public func Incineration()
|
||||||
|
|
||||||
public func FxFuseTimer(object target, effect, int timer)
|
public func FxFuseTimer(object target, effect, int timer)
|
||||||
{
|
{
|
||||||
CreateParticleEx("Fire", 0, 0, PV_Random(-10, 10), PV_Random(-20, 10), PV_Random(10, 40), Particles_Glimmer(), 6);
|
CreateParticle("Fire", 0, 0, PV_Random(-10, 10), PV_Random(-20, 10), PV_Random(10, 40), Particles_Glimmer(), 6);
|
||||||
if(timer > 90)
|
if(timer > 90)
|
||||||
{
|
{
|
||||||
//17-32 explosion radius
|
//17-32 explosion radius
|
||||||
|
|
|
@ -152,7 +152,7 @@ public func Dust(object target)
|
||||||
B = clr & 0xff,
|
B = clr & 0xff,
|
||||||
Size = PV_KeyFrames(0, 0, 0, 300, 40, 1000, 15),
|
Size = PV_KeyFrames(0, 0, 0, 300, 40, 1000, 15),
|
||||||
};
|
};
|
||||||
CreateParticleEx("Dust", groundx, groundy, PV_Random(-3, 3), PV_Random(-3, 3), PV_Random(18, 1 * 36), particles, 3);
|
CreateParticle("Dust", groundx, groundy, PV_Random(-3, 3), PV_Random(-3, 3), PV_Random(18, 1 * 36), particles, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ public func ControlUseHolding(object clonk, ix, iy)
|
||||||
if(distp < reach)
|
if(distp < reach)
|
||||||
{
|
{
|
||||||
//Particles moving towards object
|
//Particles moving towards object
|
||||||
CreateParticleEx("ElectroSpark", ix + xs, iy + ys, PV_Random(-xs/2, -xs/4), PV_Random(-ys/2, -ys/4), PV_Random(5, 10), particles, 5);
|
CreateParticle("ElectroSpark", ix + xs, iy + ys, PV_Random(-xs/2, -xs/4), PV_Random(-ys/2, -ys/4), PV_Random(5, 10), particles, 5);
|
||||||
|
|
||||||
//Particles emitting from clonk
|
//Particles emitting from clonk
|
||||||
var wp = 1;
|
var wp = 1;
|
||||||
|
@ -143,7 +143,7 @@ public func ControlUseHolding(object clonk, ix, iy)
|
||||||
var xdir = Sin(xp, 10);
|
var xdir = Sin(xp, 10);
|
||||||
var ydir = -Cos(yp, 10);
|
var ydir = -Cos(yp, 10);
|
||||||
var distance = Random(distp);
|
var distance = Random(distp);
|
||||||
CreateParticleEx("ElectroSpark", Sin(xp, distance), -Cos(yp, distance), PV_Random(xdir - 5, xdir + 5), PV_Random(ydir - 2, ydir + 2), PV_Random(5, 10), particles, 5);
|
CreateParticle("ElectroSpark", Sin(xp, distance), -Cos(yp, distance), PV_Random(xdir - 5, xdir + 5), PV_Random(ydir - 2, ydir + 2), PV_Random(5, 10), particles, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
var target;
|
var target;
|
||||||
|
@ -188,7 +188,7 @@ public func ControlUseHolding(object clonk, ix, iy)
|
||||||
target_object->SetSpeed(Sin(angle, speed), -Cos(angle, speed));
|
target_object->SetSpeed(Sin(angle, speed), -Cos(angle, speed));
|
||||||
|
|
||||||
//Particles emitting from object
|
//Particles emitting from object
|
||||||
target_object->CreateParticleEx("ElectroSpark", 0, 0, PV_Random(xs/8, xs/10), PV_Random(ys/8, ys/10), PV_Random(5, 10), particles, 5);
|
target_object->CreateParticle("ElectroSpark", 0, 0, PV_Random(xs/8, xs/10), PV_Random(ys/8, ys/10), PV_Random(5, 10), particles, 5);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
LostTargetObject(target_object);
|
LostTargetObject(target_object);
|
||||||
|
|
|
@ -84,7 +84,7 @@ protected func Load()
|
||||||
sound=true;
|
sound=true;
|
||||||
}
|
}
|
||||||
Amount += 2; //Air is sucked in.
|
Amount += 2; //Air is sucked in.
|
||||||
CreateParticleEx("Air", SX, SY, Sin(A + R,-D / 2), Cos(A + R,-D / 2), 18, {Prototype = Particles_Air(), Size = PV_KeyFrames(0, 0, 0, 250, 3, 1000, 0)});
|
CreateParticle("Air", SX, SY, Sin(A + R,-D / 2), Cos(A + R,-D / 2), 18, {Prototype = Particles_Air(), Size = PV_KeyFrames(0, 0, 0, 250, 3, 1000, 0)});
|
||||||
}
|
}
|
||||||
else if(GBackSolid(0,0) || GBackLiquid(0,0))
|
else if(GBackSolid(0,0) || GBackLiquid(0,0))
|
||||||
{
|
{
|
||||||
|
@ -124,7 +124,7 @@ private func FireWeapon(object pClonk,iX,iY)
|
||||||
|
|
||||||
if(!GBackSolid(SX,SY))
|
if(!GBackSolid(SX,SY))
|
||||||
{
|
{
|
||||||
CreateParticleEx("Air", SX, SY, Sin(180 - iAngle + (R),(Amount / 2) + 25), Cos(180 - iAngle + (R),(Amount / 2) + 25), 36, Particles_Air());
|
CreateParticle("Air", SX, SY, Sin(180 - iAngle + (R),(Amount / 2) + 25), Cos(180 - iAngle + (R),(Amount / 2) + 25), 36, Particles_Air());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,10 +172,10 @@ private func FireWeapon(object clonk, int angle)
|
||||||
|
|
||||||
var x = Sin(angle, 20);
|
var x = Sin(angle, 20);
|
||||||
var y = -Cos(angle, 20);
|
var y = -Cos(angle, 20);
|
||||||
CreateParticleEx("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
|
CreateParticle("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
|
||||||
|
|
||||||
clonk->CreateMuzzleFlash(IX, IY, angle, 40);
|
clonk->CreateMuzzleFlash(IX, IY, angle, 40);
|
||||||
CreateParticleEx("Flash", 0, 0, 0, 0, 8, Particles_Flash());
|
CreateParticle("Flash", 0, 0, 0, 0, 8, Particles_Flash());
|
||||||
}
|
}
|
||||||
|
|
||||||
func RejectCollect(id shotid, object shot)
|
func RejectCollect(id shotid, object shot)
|
||||||
|
|
|
@ -32,7 +32,7 @@ func FxFuseBurnTimer(object bomb, int num, int timer)
|
||||||
var i = 3;
|
var i = 3;
|
||||||
var x = +Sin(GetR(), i);
|
var x = +Sin(GetR(), i);
|
||||||
var y = -Cos(GetR(), i);
|
var y = -Cos(GetR(), i);
|
||||||
CreateParticleEx("Smoke", x, y, x, y, PV_Random(18, 36), Particles_Smoke(), 2);
|
CreateParticle("Smoke", x, y, x, y, PV_Random(18, 36), Particles_Smoke(), 2);
|
||||||
|
|
||||||
if(timer == 1) Sound("FuseLoop",nil,nil,nil,+1);
|
if(timer == 1) Sound("FuseLoop",nil,nil,nil,+1);
|
||||||
if(timer >= 90)
|
if(timer >= 90)
|
||||||
|
@ -59,7 +59,7 @@ func DoExplode()
|
||||||
Sound("BlastLiquid2");
|
Sound("BlastLiquid2");
|
||||||
else
|
else
|
||||||
Sound("BlastMetal");
|
Sound("BlastMetal");
|
||||||
CreateParticleEx("Smoke", PV_Random(-30, 30), PV_Random(-30, 30), 0, 0, PV_Random(40, 60), Particles_Smoke(), 60);
|
CreateParticle("Smoke", PV_Random(-30, 30), PV_Random(-30, 30), 0, 0, PV_Random(40, 60), Particles_Smoke(), 60);
|
||||||
Explode(24);
|
Explode(24);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ protected func Hit()
|
||||||
ShakeFree(6);
|
ShakeFree(6);
|
||||||
RemoveEffect("HitCheck",this);
|
RemoveEffect("HitCheck",this);
|
||||||
Sound("BulletHitGround?");
|
Sound("BulletHitGround?");
|
||||||
CreateParticleEx("Spark", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(10, 20), Particles_Glimmer(), 3);
|
CreateParticle("Spark", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(10, 20), Particles_Glimmer(), 3);
|
||||||
|
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ protected func Hit()
|
||||||
|
|
||||||
Sound("BulletHitGround?");
|
Sound("BulletHitGround?");
|
||||||
|
|
||||||
CreateParticleEx("Spark", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(10, 20), Particles_Glimmer(), 3);
|
CreateParticle("Spark", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(10, 20), Particles_Glimmer(), 3);
|
||||||
|
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,10 +170,10 @@ private func FireWeapon(object clonk, int angle)
|
||||||
// Muzzle Flash & gun smoke
|
// Muzzle Flash & gun smoke
|
||||||
var x = Sin(angle, 20);
|
var x = Sin(angle, 20);
|
||||||
var y = -Cos(angle, 20);
|
var y = -Cos(angle, 20);
|
||||||
CreateParticleEx("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
|
CreateParticle("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
|
||||||
clonk->CreateMuzzleFlash(IX, IY, angle, 20);
|
clonk->CreateMuzzleFlash(IX, IY, angle, 20);
|
||||||
|
|
||||||
CreateParticleEx("Flash", 0, 0, 0, 0, 8, Particles_Flash());
|
CreateParticle("Flash", 0, 0, 0, 0, 8, Particles_Flash());
|
||||||
}
|
}
|
||||||
|
|
||||||
func RejectCollect(id shotid, object shot)
|
func RejectCollect(id shotid, object shot)
|
||||||
|
|
|
@ -254,7 +254,7 @@ func CheckStrike(iTime)
|
||||||
{
|
{
|
||||||
particle.Phase = PV_Linear(4, 7);
|
particle.Phase = PV_Linear(4, 7);
|
||||||
}
|
}
|
||||||
obj->CreateParticleEx("SwordSlice", RandomX(-1,1), RandomX(-1,1), 0, 0, 6, particle);
|
obj->CreateParticle("SwordSlice", RandomX(-1,1), RandomX(-1,1), 0, 0, 6, particle);
|
||||||
}
|
}
|
||||||
|
|
||||||
// sound and done. We can only hit one target
|
// sound and done. We can only hit one target
|
||||||
|
|
|
@ -82,8 +82,8 @@ func FxAutoSellValuablesTimer(_, effect, time)
|
||||||
|
|
||||||
value += valuable->GetValue();
|
value += valuable->GetValue();
|
||||||
|
|
||||||
CreateParticleEx("Flash", valuable->GetX() - GetX(), valuable->GetY() - GetY(), 0, 0, 8, { Prototype = Particles_Flash(), Size = 2 * Max(5, Max(valuable->GetDefWidth(), valuable->GetDefHeight())) });
|
CreateParticle("Flash", valuable->GetX() - GetX(), valuable->GetY() - GetY(), 0, 0, 8, { Prototype = Particles_Flash(), Size = 2 * Max(5, Max(valuable->GetDefWidth(), valuable->GetDefHeight())) });
|
||||||
CreateParticleEx("Dust", valuable->GetX() - GetX(), valuable->GetY() - GetY(), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(18, 36), dust_particles, 10);
|
CreateParticle("Dust", valuable->GetX() - GetX(), valuable->GetY() - GetY(), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(18, 36), dust_particles, 10);
|
||||||
valuable->RemoveObject();
|
valuable->RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public func FxIntGravestoneStart(object clonk, proplist effect)
|
||||||
B = 50,
|
B = 50,
|
||||||
Size = PV_KeyFrames(0, 0, 0, 300, 40, 1000, 15)
|
Size = PV_KeyFrames(0, 0, 0, 300, 40, 1000, 15)
|
||||||
};
|
};
|
||||||
effect.grave->CreateParticleEx("Dust", 0, 0, PV_Random(-3, 3), PV_Random(-3, 3), PV_Random(18, 1 * 36), particles, 6);
|
effect.grave->CreateParticle("Dust", 0, 0, PV_Random(-3, 3), PV_Random(-3, 3), PV_Random(18, 1 * 36), particles, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
public func FxIntGravestoneStop(object clonk, proplist effect, int reason)
|
public func FxIntGravestoneStop(object clonk, proplist effect, int reason)
|
||||||
|
|
|
@ -57,7 +57,7 @@ private func Smoking()
|
||||||
if (!Random(2))
|
if (!Random(2))
|
||||||
Smoke(x,y + 4,20);
|
Smoke(x,y + 4,20);
|
||||||
if(!Random(2))
|
if(!Random(2))
|
||||||
CreateParticleEx("Fire", PV_Random(x-1, x+1), PV_Random(y-2, y+2), 0, PV_Random(-1, 0), PV_Random(18, 36), Particles_Fire(), 2);
|
CreateParticle("Fire", PV_Random(x-1, x+1), PV_Random(y-2, y+2), 0, PV_Random(-1, 0), PV_Random(18, 36), Particles_Fire(), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
local ActMap = {
|
local ActMap = {
|
||||||
|
|
|
@ -143,7 +143,7 @@ func FxSparkleTimer(target, effect, time)
|
||||||
{
|
{
|
||||||
effect.Interval *= 2;
|
effect.Interval *= 2;
|
||||||
if(effect.Interval > 35*3) return -1;
|
if(effect.Interval > 35*3) return -1;
|
||||||
CreateParticleEx("StarSpark", PV_Random(-3, 3), PV_Random(-14, -10), PV_Random(-5, 5), PV_Random(-8, 0), 10, Particles_Magic(), 4);
|
CreateParticle("StarSpark", PV_Random(-3, 3), PV_Random(-14, -10), PV_Random(-5, 5), PV_Random(-8, 0), 10, Particles_Magic(), 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
func FxProducePowerTimer(target, effect, time)
|
func FxProducePowerTimer(target, effect, time)
|
||||||
|
|
|
@ -76,7 +76,7 @@ public func FxSmeltingTimer(object target, proplist effect, int time)
|
||||||
{
|
{
|
||||||
//Message(Format("Smelting %d",timer));
|
//Message(Format("Smelting %d",timer));
|
||||||
// Fire in the furnace.
|
// Fire in the furnace.
|
||||||
CreateParticleEx("Fire", -10 * GetCalcDir(), 20, PV_Random(-1, 1), PV_Random(-1, 1), PV_Random(18, 36), Particles_Fire(), 2);
|
CreateParticle("Fire", -10 * GetCalcDir(), 20, PV_Random(-1, 1), PV_Random(-1, 1), PV_Random(18, 36), Particles_Fire(), 2);
|
||||||
|
|
||||||
// Smoke from the pipes.
|
// Smoke from the pipes.
|
||||||
Smoke( -9*GetCalcDir(), -31, 6);
|
Smoke( -9*GetCalcDir(), -31, 6);
|
||||||
|
@ -96,7 +96,7 @@ public func FxSmeltingTimer(object target, proplist effect, int time)
|
||||||
|
|
||||||
// Fire from the pouring exit.
|
// Fire from the pouring exit.
|
||||||
if (Inside(time, 244, 290))
|
if (Inside(time, 244, 290))
|
||||||
CreateParticleEx("Fire", 17 * GetCalcDir(), 19, PV_Random(-2, 0), PV_Random(1, 3), PV_Random(18, 36), Particles_Fire(), 2);
|
CreateParticle("Fire", 17 * GetCalcDir(), 19, PV_Random(-2, 0), PV_Random(1, 3), PV_Random(18, 36), Particles_Fire(), 2);
|
||||||
|
|
||||||
if (time == 290)
|
if (time == 290)
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,7 +62,7 @@ private func Smoking()
|
||||||
if (!Random(6)) Smoke(10 * GetCalcDir(),-14,15+Random(3));
|
if (!Random(6)) Smoke(10 * GetCalcDir(),-14,15+Random(3));
|
||||||
|
|
||||||
//Fire
|
//Fire
|
||||||
CreateParticleEx("Fire", 13 * GetCalcDir(), 16, PV_Random(-1, 1), PV_Random(-1, 1), PV_Random(18, 36), Particles_Fire(), 2);
|
CreateParticle("Fire", 13 * GetCalcDir(), 16, PV_Random(-1, 1), PV_Random(-1, 1), PV_Random(18, 36), Particles_Fire(), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
local ActMap = {
|
local ActMap = {
|
||||||
|
|
|
@ -128,7 +128,7 @@ public func FxSawingTimer(object target, proplist effect, int time)
|
||||||
{
|
{
|
||||||
var dir = GetCalcDir();
|
var dir = GetCalcDir();
|
||||||
if (time >= this.SpinStep * 3 && time % 5)
|
if (time >= this.SpinStep * 3 && time % 5)
|
||||||
CreateParticleEx("WoodChip", PV_Random(-7 * dir, -3 * dir), PV_Random(3, 6), PV_Random(-5 * dir, -11 * dir), PV_Random(-4, -2), PV_Random(36 * 3, 36 * 10), Particles_WoodChip(), 3);
|
CreateParticle("WoodChip", PV_Random(-7 * dir, -3 * dir), PV_Random(3, 6), PV_Random(-5 * dir, -11 * dir), PV_Random(-4, -2), PV_Random(36 * 3, 36 * 10), Particles_WoodChip(), 3);
|
||||||
|
|
||||||
if (!(time % 20))
|
if (!(time % 20))
|
||||||
Smoke(10 * GetCalcDir(),10,10);
|
Smoke(10 * GetCalcDir(),10,10);
|
||||||
|
|
|
@ -119,7 +119,7 @@ public func FxCrushingTimer(object target, proplist effect, int time)
|
||||||
G = 200,
|
G = 200,
|
||||||
B = 100
|
B = 100
|
||||||
};
|
};
|
||||||
CreateParticleEx("Dust", PV_Random(11 * dir, 13 * dir), 40, PV_Random(-5, 5), PV_Random(-13, -6), PV_Random(36 * 3, 36 * 10), particles, 3);
|
CreateParticle("Dust", PV_Random(11 * dir, 13 * dir), 40, PV_Random(-5, 5), PV_Random(-13, -6), PV_Random(36 * 3, 36 * 10), particles, 3);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ private func Initialize()
|
||||||
|
|
||||||
public func Incineration()
|
public func Incineration()
|
||||||
{
|
{
|
||||||
CreateParticleEx("Grass", 0, 0, PV_Random(-20, 20), PV_Random(-20, 10), PV_Random(30, 100), Particles_Straw(), 30);
|
CreateParticle("Grass", 0, 0, PV_Random(-20, 20), PV_Random(-20, 10), PV_Random(30, 100), Particles_Straw(), 30);
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ public func OnShockwaveHit()
|
||||||
|
|
||||||
private func Destroy()
|
private func Destroy()
|
||||||
{
|
{
|
||||||
CreateParticleEx("Grass", 0, 0, PV_Random(-20, 20), PV_Random(-20, 10), PV_Random(30, 100), Particles_Straw(), 30);
|
CreateParticle("Grass", 0, 0, PV_Random(-20, 20), PV_Random(-20, 10), PV_Random(30, 100), Particles_Straw(), 30);
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public func Harvest(object clonk)
|
||||||
Rotation = PV_Direction(PV_Random(900, 1100)),
|
Rotation = PV_Direction(PV_Random(900, 1100)),
|
||||||
Phase = PV_Random(0, 1)
|
Phase = PV_Random(0, 1)
|
||||||
};
|
};
|
||||||
CreateParticleEx("Lichen", PV_Random(-5, 5), PV_Random(-5, 5), PV_Random(-30, 30), PV_Random(-30, 30), PV_Random(36, 36 * 4), particles, 40);
|
CreateParticle("Lichen", PV_Random(-5, 5), PV_Random(-5, 5), PV_Random(-30, 30), PV_Random(-30, 30), PV_Random(36, 36 * 4), particles, 40);
|
||||||
|
|
||||||
if (grow_stage)
|
if (grow_stage)
|
||||||
{
|
{
|
||||||
|
|
|
@ -210,7 +210,7 @@ func Damage()
|
||||||
{
|
{
|
||||||
// splatter
|
// splatter
|
||||||
if(grow_anim)
|
if(grow_anim)
|
||||||
CreateParticleEx("Dust", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(20, 60), Particles_Material(RGB(50, 50, 255)), 30);
|
CreateParticle("Dust", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(20, 60), Particles_Material(RGB(50, 50, 255)), 30);
|
||||||
|
|
||||||
// ouch!
|
// ouch!
|
||||||
Die(false);
|
Die(false);
|
||||||
|
|
|
@ -108,7 +108,7 @@ func BurstIntoAshes()
|
||||||
|
|
||||||
for(var mirror = -1; mirror <= 1; mirror += 2)
|
for(var mirror = -1; mirror <= 1; mirror += 2)
|
||||||
{
|
{
|
||||||
CreateParticleEx("Dust", x * mirror, y * mirror, PV_Random(-3, 3), PV_Random(-3, -3), PV_Random(18, 1 * 36), particles, 2);
|
CreateParticle("Dust", x * mirror, y * mirror, PV_Random(-3, 3), PV_Random(-3, -3), PV_Random(18, 1 * 36), particles, 2);
|
||||||
CastPXS("Ashes", 5, 30, x * mirror, y * mirror);
|
CastPXS("Ashes", 5, 30, x * mirror, y * mirror);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ func BurstIntoAshes()
|
||||||
|
|
||||||
for(var mirror = -1; mirror <= 1; mirror += 2)
|
for(var mirror = -1; mirror <= 1; mirror += 2)
|
||||||
{
|
{
|
||||||
CreateParticleEx("Dust", x * mirror, y * mirror, PV_Random(-3, 3), PV_Random(-3, -3), PV_Random(18, 1 * 36), particles, 2);
|
CreateParticle("Dust", x * mirror, y * mirror, PV_Random(-3, 3), PV_Random(-3, -3), PV_Random(18, 1 * 36), particles, 2);
|
||||||
CastPXS("Ashes", 5, 30, x * mirror, y * mirror);
|
CastPXS("Ashes", 5, 30, x * mirror, y * mirror);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,10 +71,10 @@ public func ContainedUseStop(object clonk, int ix, int iy)
|
||||||
|
|
||||||
var x = Sin(angle, 20);
|
var x = Sin(angle, 20);
|
||||||
var y = -Cos(angle, 20);
|
var y = -Cos(angle, 20);
|
||||||
CreateParticleEx("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
|
CreateParticle("Smoke", IX, IY, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
|
||||||
|
|
||||||
CreateMuzzleFlash(IX, IY, angle, 20);
|
CreateMuzzleFlash(IX, IY, angle, 20);
|
||||||
CreateParticleEx("Flash", 0, 0, GetXDir(), GetYDir(), 8, Particles_Flash());
|
CreateParticle("Flash", 0, 0, GetXDir(), GetYDir(), 8, Particles_Flash());
|
||||||
|
|
||||||
AddEffect("IntCooldown", this,1,1,this);
|
AddEffect("IntCooldown", this,1,1,this);
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ private func FxIntPlaneTimer(object target, effect, int timer)
|
||||||
R = colour, G = colour, B = colour,
|
R = colour, G = colour, B = colour,
|
||||||
Size = PV_Linear(PV_Random(20, 30), PV_Random(70, 100))
|
Size = PV_Linear(PV_Random(20, 30), PV_Random(70, 100))
|
||||||
};
|
};
|
||||||
CreateParticleEx("Smoke", 0, 0, 0, 0, PV_Random(36, 2 * 36), particles, 2);
|
CreateParticle("Smoke", 0, 0, 0, 0, PV_Random(36, 2 * 36), particles, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Throttle-to-thrust lag
|
//Throttle-to-thrust lag
|
||||||
|
|
|
@ -94,7 +94,7 @@ public func FxIntAirshipMovementTimer(object target, proplist effect, int time)
|
||||||
Prototype = Particles_Smoke(),
|
Prototype = Particles_Smoke(),
|
||||||
R = colour, G = colour, B = colour
|
R = colour, G = colour, B = colour
|
||||||
};
|
};
|
||||||
CreateParticleEx("Smoke", i, 18, 0, 0, PV_Random(36, 2 * 36), particles, 2);
|
CreateParticle("Smoke", i, 18, 0, 0, PV_Random(36, 2 * 36), particles, 2);
|
||||||
}
|
}
|
||||||
// Fan-blade sound
|
// Fan-blade sound
|
||||||
if (!enginesound)
|
if (!enginesound)
|
||||||
|
|
|
@ -275,11 +275,11 @@ protected func DoFire(object iammo, object clonk, int angle)
|
||||||
var dist = 25;
|
var dist = 25;
|
||||||
var px = Cos(r/angPrec - 90,dist);
|
var px = Cos(r/angPrec - 90,dist);
|
||||||
var py = Sin(r/angPrec - 90,dist) - 4;
|
var py = Sin(r/angPrec - 90,dist) - 4;
|
||||||
CreateParticleEx("Flash", px, py, 0, 0, 8, Particles_Flash());
|
CreateParticle("Flash", px, py, 0, 0, 8, Particles_Flash());
|
||||||
|
|
||||||
var x = Sin(r/angPrec, 20);
|
var x = Sin(r/angPrec, 20);
|
||||||
var y = -Cos(r/angPrec, 20);
|
var y = -Cos(r/angPrec, 20);
|
||||||
CreateParticleEx("Smoke", px, py, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
|
CreateParticle("Smoke", px, py, PV_Random(x - 20, x + 20), PV_Random(y - 20, y + 20), PV_Random(40, 60), Particles_Smoke(), 20);
|
||||||
CreateMuzzleFlash(px, py, r / angPrec, 60);
|
CreateMuzzleFlash(px, py, r / angPrec, 60);
|
||||||
//sound
|
//sound
|
||||||
Sound("Blast3");
|
Sound("Blast3");
|
||||||
|
|
|
@ -20,7 +20,7 @@ public func ControlUp(object clonk)
|
||||||
var arrw= CreateObject(Arrow,x,y,-1);
|
var arrw= CreateObject(Arrow,x,y,-1);
|
||||||
arrw->Launch(30,80, clonk);
|
arrw->Launch(30,80, clonk);
|
||||||
arrw->SetGraphics("1");
|
arrw->SetGraphics("1");
|
||||||
CreateParticleEx("Straw", 0, 0, PV_Random(-20, 20), PV_Random(-20,20), PV_Random(30, 120), Particles_Straw(), 20);
|
CreateParticle("Straw", 0, 0, PV_Random(-20, 20), PV_Random(-20,20), PV_Random(30, 120), Particles_Straw(), 20);
|
||||||
}
|
}
|
||||||
if(GetEffect("SparklingAttention",this)) RemoveEffect("SparklingAttention",this);
|
if(GetEffect("SparklingAttention",this)) RemoveEffect("SparklingAttention",this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ global func FxAutoOpenTimer(object pTarget, effect, int timer)
|
||||||
|
|
||||||
global func FxSparklingAttentionTimer(object pTarget, effect, int timer)
|
global func FxSparklingAttentionTimer(object pTarget, effect, int timer)
|
||||||
{
|
{
|
||||||
CreateParticleEx("Flash", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(8, 15), {Prototype = Particles_Flash(), Size = 10}, 10);
|
CreateParticle("Flash", 0, 0, PV_Random(-20, 20), PV_Random(-20, 20), PV_Random(8, 15), {Prototype = Particles_Flash(), Size = 10}, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected func Decoration()
|
protected func Decoration()
|
||||||
|
|
|
@ -32,7 +32,7 @@ public func OnProjectileHit()
|
||||||
public func Burst()
|
public func Burst()
|
||||||
{
|
{
|
||||||
DrawParticleLine("Straw", 0, 0, AbsX(gate->GetX()), AbsY(gate->GetY()), 6, PV_Random(-5, 5), PV_Random(-5, 0), PV_Random(30, 60), Particles_Straw());
|
DrawParticleLine("Straw", 0, 0, AbsX(gate->GetX()), AbsY(gate->GetY()), 6, PV_Random(-5, 5), PV_Random(-5, 0), PV_Random(30, 60), Particles_Straw());
|
||||||
CreateParticleEx("Straw", 0, 0, PV_Random(-30, 30), PV_Random(-30,30), PV_Random(30, 120), Particles_Straw(), 200);
|
CreateParticle("Straw", 0, 0, PV_Random(-30, 30), PV_Random(-30,30), PV_Random(30, 120), Particles_Straw(), 200);
|
||||||
gate->OpenDoor();
|
gate->OpenDoor();
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ func Execute()
|
||||||
BlastFree(x,y-3,blast_size,GetController());
|
BlastFree(x,y-3,blast_size,GetController());
|
||||||
// gfx
|
// gfx
|
||||||
var particle_speed = blast_size * 3;
|
var particle_speed = blast_size * 3;
|
||||||
CreateParticleEx("FireDense", PV_Random(x - 1, x + 1), PV_Random(y - 4, y - 2), PV_Random(-particle_speed, particle_speed), PV_Random(-particle_speed, particle_speed), PV_Random(30, 40), Particles_Fire(), 5);
|
CreateParticle("FireDense", PV_Random(x - 1, x + 1), PV_Random(y - 4, y - 2), PV_Random(-particle_speed, particle_speed), PV_Random(-particle_speed, particle_speed), PV_Random(30, 40), Particles_Fire(), 5);
|
||||||
if (!Random(5)) SoundAt("RockHit*", x,y-3, 100);
|
if (!Random(5)) SoundAt("RockHit*", x,y-3, 100);
|
||||||
}
|
}
|
||||||
else if (speed <=50)
|
else if (speed <=50)
|
||||||
|
|
|
@ -132,7 +132,7 @@ global func DrawParticleLine(string particle, int x0, int y0, int x1, int y1, in
|
||||||
i2 = i * 256 / prtnum;
|
i2 = i * 256 / prtnum;
|
||||||
i1 = 256 - i2;
|
i1 = 256 - i2;
|
||||||
|
|
||||||
CreateParticleEx(particle, x0 + (x1 - x0) * i / prtnum, y0 + (y1 - y0) * i-- / prtnum, xdir, ydir, lifetime, properties, 1);
|
CreateParticle(particle, x0 + (x1 - x0) * i / prtnum, y0 + (y1 - y0) * i-- / prtnum, xdir, ydir, lifetime, properties, 1);
|
||||||
}
|
}
|
||||||
// Succes, return number of created particles.
|
// Succes, return number of created particles.
|
||||||
return prtnum;
|
return prtnum;
|
||||||
|
|
|
@ -204,12 +204,12 @@ global func ExplosionEffect(int level, int x, int y, int smoothness)
|
||||||
var star_size = PV_KeyFrames(0, 0, 0, 500, level * 2, 1000, 0);
|
var star_size = PV_KeyFrames(0, 0, 0, 500, level * 2, 1000, 0);
|
||||||
var shockwave_size = PV_Linear(0, level * 4);
|
var shockwave_size = PV_Linear(0, level * 4);
|
||||||
|
|
||||||
CreateParticleEx("SmokeDirty", PV_Random(x - 10,x + 10), PV_Random(y - 10, y + 10), 0, PV_Random(-2, 0), PV_Random(50, 100), {Prototype = ExplosionParticles_Smoke, Size = smoke_size}, Max(2, wilderness_level / 10));
|
CreateParticle("SmokeDirty", PV_Random(x - 10,x + 10), PV_Random(y - 10, y + 10), 0, PV_Random(-2, 0), PV_Random(50, 100), {Prototype = ExplosionParticles_Smoke, Size = smoke_size}, Max(2, wilderness_level / 10));
|
||||||
CreateParticleEx("SmokeDirty", PV_Random(x - 5, x + 5), PV_Random(y - 5, y + 5), PV_Random(-1, 1), PV_Random(-1, 1), PV_Random(20, 40), {Prototype = ExplosionParticles_BlastSmoothBackground, Size = blast_smooth_size}, smoothness_level / 5);
|
CreateParticle("SmokeDirty", PV_Random(x - 5, x + 5), PV_Random(y - 5, y + 5), PV_Random(-1, 1), PV_Random(-1, 1), PV_Random(20, 40), {Prototype = ExplosionParticles_BlastSmoothBackground, Size = blast_smooth_size}, smoothness_level / 5);
|
||||||
CreateParticleEx("SmokeDirty", PV_Random(x - 5, x + 5), PV_Random(y - 5, y + 5), PV_Random(-1, 1), PV_Random(-1, 1), PV_Random(20, 40), {Prototype = ExplosionParticles_BlastSmooth, Size = blast_smooth_size}, smoothness_level / 5);
|
CreateParticle("SmokeDirty", PV_Random(x - 5, x + 5), PV_Random(y - 5, y + 5), PV_Random(-1, 1), PV_Random(-1, 1), PV_Random(20, 40), {Prototype = ExplosionParticles_BlastSmooth, Size = blast_smooth_size}, smoothness_level / 5);
|
||||||
CreateParticleEx("Dust", PV_Random(x - 5, x + 5), PV_Random(y - 5, y + 5), 0, 0, PV_Random(18, 25), {Prototype = ExplosionParticles_Blast, Size = blast_size}, smoothness_level / 5);
|
CreateParticle("Dust", PV_Random(x - 5, x + 5), PV_Random(y - 5, y + 5), 0, 0, PV_Random(18, 25), {Prototype = ExplosionParticles_Blast, Size = blast_size}, smoothness_level / 5);
|
||||||
CreateParticleEx("StarFlash", PV_Random(x - 6, x + 6), PV_Random(y - 6, y + 6), PV_Random(-wilderness_level/4, wilderness_level/4), PV_Random(-wilderness_level/4, wilderness_level/4), PV_Random(10, 12), {Prototype = ExplosionParticles_Star, Size = star_size}, wilderness_level / 3);
|
CreateParticle("StarFlash", PV_Random(x - 6, x + 6), PV_Random(y - 6, y + 6), PV_Random(-wilderness_level/4, wilderness_level/4), PV_Random(-wilderness_level/4, wilderness_level/4), PV_Random(10, 12), {Prototype = ExplosionParticles_Star, Size = star_size}, wilderness_level / 3);
|
||||||
CreateParticleEx("Shockwave", x, y, 0, 0, 15, {Prototype = ExplosionParticles_Shockwave, Size = shockwave_size}, nil);
|
CreateParticle("Shockwave", x, y, 0, 0, 15, {Prototype = ExplosionParticles_Shockwave, Size = shockwave_size}, nil);
|
||||||
|
|
||||||
// cast either some sparks on land or bubbles under water
|
// cast either some sparks on land or bubbles under water
|
||||||
if(GBackLiquid(x, y) && Global.CastBubbles)
|
if(GBackLiquid(x, y) && Global.CastBubbles)
|
||||||
|
@ -218,7 +218,7 @@ global func ExplosionEffect(int level, int x, int y, int smoothness)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CreateParticleEx("Magic", PV_Random(x - 5, x + 5), PV_Random(y - 5, y + 5), PV_Random(-level_pow_fraction, level_pow_fraction), PV_Random(-level_pow_fraction, level_pow_fraction), PV_Random(25, 70), ExplosionParticles_Glimmer, level);
|
CreateParticle("Magic", PV_Random(x - 5, x + 5), PV_Random(y - 5, y + 5), PV_Random(-level_pow_fraction, level_pow_fraction), PV_Random(-level_pow_fraction, level_pow_fraction), PV_Random(25, 70), ExplosionParticles_Glimmer, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
// very wild explosion? Smoke trails!
|
// very wild explosion? Smoke trails!
|
||||||
|
@ -543,9 +543,9 @@ global func FxSmokeTrailTimer(object target, proplist effect, int fxtime)
|
||||||
{
|
{
|
||||||
var x_dir_blast = x_dir / 200;
|
var x_dir_blast = x_dir / 200;
|
||||||
var y_dir_blast = y_dir / 200;
|
var y_dir_blast = y_dir / 200;
|
||||||
CreateParticleEx("SmokeDirty", x, y, PV_Random(x_dir_blast - 2, x_dir_blast + 2), PV_Random(y_dir_blast - 2, y_dir_blast + 2), 18, effect.particles_blast, 2);
|
CreateParticle("SmokeDirty", x, y, PV_Random(x_dir_blast - 2, x_dir_blast + 2), PV_Random(y_dir_blast - 2, y_dir_blast + 2), 18, effect.particles_blast, 2);
|
||||||
}
|
}
|
||||||
CreateParticleEx("Smoke", x, y, PV_Random(-2, 2), PV_Random(-2, 2), 50, effect.particles_smoke, 2);
|
CreateParticle("Smoke", x, y, PV_Random(-2, 2), PV_Random(-2, 2), 50, effect.particles_smoke, 2);
|
||||||
|
|
||||||
|
|
||||||
// then calc next position
|
// then calc next position
|
||||||
|
@ -575,7 +575,7 @@ global func Fireworks(int color, int x, int y)
|
||||||
G = (color >> 8) & 0xff,
|
G = (color >> 8) & 0xff,
|
||||||
B = (color >> 0) & 0xff,
|
B = (color >> 0) & 0xff,
|
||||||
};
|
};
|
||||||
CreateParticleEx("MagicFire", x, y, PV_Random(-100, 100), PV_Random(-100, 100), PV_Random(20, 200), glimmer, 100);
|
CreateParticle("MagicFire", x, y, PV_Random(-100, 100), PV_Random(-100, 100), PV_Random(20, 200), glimmer, 100);
|
||||||
|
|
||||||
Smoke(x, y, 30);
|
Smoke(x, y, 30);
|
||||||
|
|
||||||
|
@ -590,7 +590,7 @@ global func Fireworks(int color, int x, int y)
|
||||||
ForceX = PV_Random(-10, 10),
|
ForceX = PV_Random(-10, 10),
|
||||||
Stretch = PV_Speed(500, 1000)
|
Stretch = PV_Speed(500, 1000)
|
||||||
};
|
};
|
||||||
CreateParticleEx("Spark", x, y, PV_Random(-200, 200), PV_Random(-200, 200), PV_Random(20, 60), sparks, 100);
|
CreateParticle("Spark", x, y, PV_Random(-200, 200), PV_Random(-200, 200), PV_Random(20, 60), sparks, 100);
|
||||||
|
|
||||||
var flash =
|
var flash =
|
||||||
{
|
{
|
||||||
|
@ -599,7 +599,7 @@ global func Fireworks(int color, int x, int y)
|
||||||
G = (color >> 8) & 0xff,
|
G = (color >> 8) & 0xff,
|
||||||
B = (color >> 0) & 0xff,
|
B = (color >> 0) & 0xff,
|
||||||
};
|
};
|
||||||
CreateParticleEx("Flash", x, y, 0, 0, 8, flash);
|
CreateParticle("Flash", x, y, 0, 0, 8, flash);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
global func CreateMuzzleFlash(int x, int y, int angle, int size)
|
global func CreateMuzzleFlash(int x, int y, int angle, int size)
|
||||||
{
|
{
|
||||||
// main muzzle flash
|
// main muzzle flash
|
||||||
CreateParticleEx("MuzzleFlash", x, y, 0, 0, 10, {Prototype = Particles_MuzzleFlash(), Size = size, Rotation = angle});
|
CreateParticle("MuzzleFlash", x, y, 0, 0, 10, {Prototype = Particles_MuzzleFlash(), Size = size, Rotation = angle});
|
||||||
// and some additional little sparks
|
// and some additional little sparks
|
||||||
var xdir = Sin(angle, size * 2);
|
var xdir = Sin(angle, size * 2);
|
||||||
var ydir = -Cos(angle, size * 2);
|
var ydir = -Cos(angle, size * 2);
|
||||||
CreateParticleEx("StarFlash", x, y, PV_Random(xdir - size, xdir + size), PV_Random(ydir - size, ydir + size), PV_Random(20, 60), Particles_Glimmer(), size);
|
CreateParticle("StarFlash", x, y, PV_Random(xdir - size, xdir + size), PV_Random(ydir - size, ydir + size), PV_Random(20, 60), Particles_Glimmer(), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
global func Smoke(int x, int y, int level, int color)
|
global func Smoke(int x, int y, int level, int color)
|
||||||
|
@ -26,7 +26,7 @@ global func Smoke(int x, int y, int level, int color)
|
||||||
particles.B = (color >> 0) & 0xff;
|
particles.B = (color >> 0) & 0xff;
|
||||||
}
|
}
|
||||||
particles.Size = PV_Linear(PV_Random(level/2, level), PV_Random(2 * level, 3 * level));
|
particles.Size = PV_Linear(PV_Random(level/2, level), PV_Random(2 * level, 3 * level));
|
||||||
CreateParticleEx("Smoke", x, y, PV_Random(-level/3, level/3), PV_Random(-level/2, -level/3), PV_Random(level * 2, level * 10), particles, BoundBy(level/5, 3, 20));
|
CreateParticle("Smoke", x, y, PV_Random(-level/3, level/3), PV_Random(-level/2, -level/3), PV_Random(level * 2, level * 10), particles, BoundBy(level/5, 3, 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ func Initialize()
|
||||||
global func Test1()
|
global func Test1()
|
||||||
{
|
{
|
||||||
var t = GetTime();
|
var t = GetTime();
|
||||||
CreateParticleEx("FireDense", PV_Random(0, LandscapeWidth()), PV_Random(0, LandscapeHeight()/2), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(100, 300), PARTICLES, PARTICLES_PER_RUN);
|
CreateParticle("FireDense", PV_Random(0, LandscapeWidth()), PV_Random(0, LandscapeHeight()/2), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(100, 300), PARTICLES, PARTICLES_PER_RUN);
|
||||||
t = GetTime() - t;
|
t = GetTime() - t;
|
||||||
FixLenLog("Test1 - batch creation", t, LOG_LINE_LEN, "ms");
|
FixLenLog("Test1 - batch creation", t, LOG_LINE_LEN, "ms");
|
||||||
MEASUREMENTS[0] = t;
|
MEASUREMENTS[0] = t;
|
||||||
|
@ -41,7 +41,7 @@ global func Test2()
|
||||||
{
|
{
|
||||||
var t = GetTime();
|
var t = GetTime();
|
||||||
for (var i = 0; i < PARTICLES_PER_RUN; ++i)
|
for (var i = 0; i < PARTICLES_PER_RUN; ++i)
|
||||||
CreateParticleEx("FireDense", PV_Random(0, LandscapeWidth()), PV_Random(0, LandscapeHeight()/2), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(100, 300), PARTICLES);
|
CreateParticle("FireDense", PV_Random(0, LandscapeWidth()), PV_Random(0, LandscapeHeight()/2), PV_Random(-10, 10), PV_Random(-10, 10), PV_Random(100, 300), PARTICLES);
|
||||||
t = GetTime() - t;
|
t = GetTime() - t;
|
||||||
FixLenLog("Test2 - seperate creation", t, LOG_LINE_LEN, "ms");
|
FixLenLog("Test2 - seperate creation", t, LOG_LINE_LEN, "ms");
|
||||||
MEASUREMENTS[1] = t;
|
MEASUREMENTS[1] = t;
|
||||||
|
@ -95,14 +95,14 @@ global func FxScorchEverythingTimer(target, effect, time)
|
||||||
var glimmer_count = strength / 2;
|
var glimmer_count = strength / 2;
|
||||||
var fire_density = (strength - 30) / 10;
|
var fire_density = (strength - 30) / 10;
|
||||||
var glimmer_speed = strength / 4;
|
var glimmer_speed = strength / 4;
|
||||||
CreateParticleEx("Fire", effect.x, effect.y, PV_Random(-glimmer_speed, glimmer_speed), PV_Random(-glimmer_speed, 5), PV_Random(Max(30, strength), Max(60, strength * 2)), effect.glimmer, glimmer_count);
|
CreateParticle("Fire", effect.x, effect.y, PV_Random(-glimmer_speed, glimmer_speed), PV_Random(-glimmer_speed, 5), PV_Random(Max(30, strength), Max(60, strength * 2)), effect.glimmer, glimmer_count);
|
||||||
if (fire_density > 0)
|
if (fire_density > 0)
|
||||||
{
|
{
|
||||||
var speed = 2 * fire_density;
|
var speed = 2 * fire_density;
|
||||||
var size = 2 * fire_density;
|
var size = 2 * fire_density;
|
||||||
effect.fire.Size = PV_KeyFrames(0, 0, 0, 100, PV_Random(size, 2 * size), 900, PV_Random(2 * size, 3 * size), 1000, 0);
|
effect.fire.Size = PV_KeyFrames(0, 0, 0, 100, PV_Random(size, 2 * size), 900, PV_Random(2 * size, 3 * size), 1000, 0);
|
||||||
CreateParticleEx("FireDense", effect.x, effect.y, PV_Random(-speed, speed), PV_Random(-speed, speed), PV_Random(30, Min(60, fire_density * 20)), effect.fire_na, fire_density);
|
CreateParticle("FireDense", effect.x, effect.y, PV_Random(-speed, speed), PV_Random(-speed, speed), PV_Random(30, Min(60, fire_density * 20)), effect.fire_na, fire_density);
|
||||||
CreateParticleEx("Fire", effect.x, effect.y, PV_Random(-speed, speed), PV_Random(-speed, speed), PV_Random(30, Min(60, fire_density * 20)), effect.fire, fire_density);
|
CreateParticle("Fire", effect.x, effect.y, PV_Random(-speed, speed), PV_Random(-speed, speed), PV_Random(30, Min(60, fire_density * 20)), effect.fire, fire_density);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,12 +180,12 @@ private func MakeTarget(int x, int y, bool flying)
|
||||||
{
|
{
|
||||||
var balloon = CreateObject(TargetBalloon, x, y-30, NO_OWNER);
|
var balloon = CreateObject(TargetBalloon, x, y-30, NO_OWNER);
|
||||||
target->SetAction("Attach", balloon);
|
target->SetAction("Attach", balloon);
|
||||||
CreateParticleEx("Flash", x, y - 50, 0, 0, 8, Particles_Flash());
|
CreateParticle("Flash", x, y - 50, 0, 0, 8, Particles_Flash());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flying == false)
|
if (flying == false)
|
||||||
{
|
{
|
||||||
CreateParticleEx("Flash", x, y, 0, 0, 8, Particles_Flash());
|
CreateParticle("Flash", x, y, 0, 0, 8, Particles_Flash());
|
||||||
target->SetAction("Float");
|
target->SetAction("Float");
|
||||||
}
|
}
|
||||||
return target;
|
return target;
|
||||||
|
|
|
@ -25,7 +25,7 @@ public func OnProjectileHit()
|
||||||
|
|
||||||
public func Burst()
|
public func Burst()
|
||||||
{
|
{
|
||||||
CreateParticleEx("Straw", 0, 0, PV_Random(-30, 30), PV_Random(-30,30), PV_Random(30, 120), Particles_Straw(), 200);
|
CreateParticle("Straw", 0, 0, PV_Random(-30, 30), PV_Random(-30,30), PV_Random(30, 120), Particles_Straw(), 200);
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ public func IsProjectileTarget(target,shooter)
|
||||||
|
|
||||||
public func OnProjectileHit()
|
public func OnProjectileHit()
|
||||||
{
|
{
|
||||||
CreateParticleEx("Air", 0, -10, PV_Random(-30, 30), PV_Random(-30,30), PV_Random(30, 120), Particles_Air(), 10);
|
CreateParticle("Air", 0, -10, PV_Random(-30, 30), PV_Random(-30,30), PV_Random(30, 120), Particles_Air(), 10);
|
||||||
Sound("BalloonPop");
|
Sound("BalloonPop");
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ protected func Initialize()
|
||||||
|
|
||||||
public func Burst()
|
public func Burst()
|
||||||
{
|
{
|
||||||
CreateParticleEx("Straw", 0, 0, PV_Random(-30, 30), PV_Random(-30,30), PV_Random(30, 120), Particles_Straw(), 200);
|
CreateParticle("Straw", 0, 0, PV_Random(-30, 30), PV_Random(-30,30), PV_Random(30, 120), Particles_Straw(), 200);
|
||||||
RemoveObject();
|
RemoveObject();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#include <C4GameLobby.h>
|
#include <C4GameLobby.h>
|
||||||
#include <C4Network2.h>
|
#include <C4Network2.h>
|
||||||
#include <C4Network2IRC.h>
|
#include <C4Network2IRC.h>
|
||||||
#include <C4DynamicParticles.h>
|
#include <C4Particles.h>
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ bool C4Application::DoInit(int argc, char * argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
// after initializing graphics, the particle system can check for compatibility
|
// after initializing graphics, the particle system can check for compatibility
|
||||||
::DynamicParticles.DoInit();
|
::Particles.DoInit();
|
||||||
|
|
||||||
// Initialize gamepad
|
// Initialize gamepad
|
||||||
if (!pGamePadControl && Config.General.GamepadEnabled)
|
if (!pGamePadControl && Config.General.GamepadEnabled)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue