forked from Mirrors/openclonk
Script: Damage callback changed to Damage(Change, Cause, CausedByPlr)
parent
752e945b8d
commit
2510734ad3
|
@ -85,8 +85,8 @@
|
|||
</row>
|
||||
<row id="Damage">
|
||||
<literal_col>Damage</literal_col>
|
||||
<col>int change, int by_player</col>
|
||||
<col>When the object is damage.</col>
|
||||
<col>int change, int cause, int by_player</col>
|
||||
<col>When the object is damaged. See <emlink href="script/Effects.html#damagecause">Fx*Damage</emlink>for <code>cause</code> values.</col>
|
||||
</row>
|
||||
<row id="DeepBreath">
|
||||
<literal_col>DeepBreath</literal_col>
|
||||
|
|
|
@ -557,7 +557,7 @@ global func FxExplodeOnDeathCurseStop(object target, proplist effect, int reason
|
|||
<h>Fx*Damage</h>
|
||||
<text><code>int Fx*Damage (object target, proplist effect, int damage, int cause);</code></text>
|
||||
<text>Every effect receives this callback whenever the energy or damage value of the target object is to change. If the function is defined, it should then return whether to allow the change.</text>
|
||||
<text>This callback is made upon life energy changes in living beings and damage value changes in non-livings - but not vice versa. cause contains the value change and reason:</text>
|
||||
<text id="damagecause">This callback is made upon life energy changes in living beings and damage value changes in non-livings - but not vice versa. cause contains the value change and reason:</text>
|
||||
<text>
|
||||
<table>
|
||||
<rowh>
|
||||
|
|
|
@ -100,7 +100,7 @@ public func IsProjectileTarget(target,shooter)
|
|||
return 1;
|
||||
}
|
||||
|
||||
public func Damage(int change, int byplayer)
|
||||
public func Damage()
|
||||
{
|
||||
Incinerate();
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ func FxLifeTimerTimer(target, effect, time)
|
|||
}
|
||||
}
|
||||
|
||||
func Damage(int damage, object from)
|
||||
func Damage()
|
||||
{
|
||||
// splatter
|
||||
if(grow_anim)
|
||||
|
@ -451,4 +451,4 @@ func FxQuickFadeTimer(target, effect, time)
|
|||
SetClrModulation(RGBa(255, 255, 255, effect.alpha));
|
||||
if(effect.alpha <= 0) return -1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,7 +286,7 @@ public func FaceRight()
|
|||
|
||||
public func IsProjectileTarget(target,shooter) { return true; }
|
||||
|
||||
public func Damage(int change, int byplayer)
|
||||
public func Damage()
|
||||
{
|
||||
if(GetDamage() > health)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ protected func Initialize()
|
|||
|
||||
public func IsProjectileTarget(target,shooter) { return true; }
|
||||
|
||||
public func Damage(int change, int byplayer)
|
||||
public func Damage()
|
||||
{
|
||||
if(GetDamage() > health)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ public func Incineration()
|
|||
return;
|
||||
}
|
||||
|
||||
public func Damage(int change, int byplayer)
|
||||
public func Damage()
|
||||
{
|
||||
if (GetDamage() > (size/4)) Destroy();
|
||||
}
|
||||
|
|
|
@ -1195,7 +1195,7 @@ void C4Object::DoDamage(int32_t iChange, int32_t iCausedBy, int32_t iCause)
|
|||
// Change value
|
||||
Damage = Max<int32_t>( Damage+iChange, 0 );
|
||||
// Engine script call
|
||||
Call(PSF_Damage,&C4AulParSet(C4VInt(iChange), C4VInt(iCausedBy)));
|
||||
Call(PSF_Damage,&C4AulParSet(C4VInt(iChange), C4VInt(iCause), C4VInt(iCausedBy)));
|
||||
}
|
||||
|
||||
void C4Object::DoEnergy(int32_t iChange, bool fExact, int32_t iCause, int32_t iCausedByPlr)
|
||||
|
|
Loading…
Reference in New Issue