Editor Props: Invincibility and player color.

qteditor
Sven Eberhardt 2016-04-16 22:03:43 -04:00
parent 901399f5c2
commit 4e7df72c4c
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,7 @@
[DefCore]
id=EditorBase
Version=8,0
Category=C4D_None
Width=8
Height=8
Offset=-4,-4

View File

@ -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;

View File

@ -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