forked from Mirrors/openclonk
Editor Props: Invincibility and player color.
parent
901399f5c2
commit
4e7df72c4c
|
@ -0,0 +1,7 @@
|
|||
[DefCore]
|
||||
id=EditorBase
|
||||
Version=8,0
|
||||
Category=C4D_None
|
||||
Width=8
|
||||
Height=8
|
||||
Offset=-4,-4
|
|
@ -0,0 +1,8 @@
|
|||
/* Global editor props for all objects */
|
||||
|
||||
// Do not create
|
||||
public func Construction() { RemoveObject(); }
|
||||
|
||||
local EditorProp_Invincibility = { Type = "has_effect", Effect = "IntInvincible", Set = "SetInvincibility" };
|
||||
local EditorProp_PlayerColor = { Type = "color", AsyncGet = "GetColor", Set = "SetColor" };
|
||||
local Plane = 1;
|
|
@ -78,6 +78,15 @@ global func MakeInvincible(bool allow_fire)
|
|||
return true;
|
||||
}
|
||||
|
||||
global func SetInvincibility(bool to_val)
|
||||
{
|
||||
// Turn invincibility on or off
|
||||
if (to_val)
|
||||
return MakeInvincible(false);
|
||||
else
|
||||
return ClearInvincible();
|
||||
}
|
||||
|
||||
global func FxIntInvincibleDamage(target)
|
||||
{
|
||||
// avert all damage
|
||||
|
|
Loading…
Reference in New Issue