I set up a damage cog that checks for a certain.mat file so that all you have to do is place 1 cog in the level, instead of multiple sector or surface damage cogs. It checks out in CogWriter, but I get nothing in level, just walking on lava. Here it is:
thanks in advance
------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance
-Tazz
Code:
# Jedi Knight Cog Script # # # [YB] # # ---Modified LEC cog for surfaces -Tazz # # (C) 1997 LucasArts Entertainment Co. All Rights Reserved # 00_surfacedamage.cog # # Apply constant amount of damage to a player on a surface # ======================================================================================== symbols message touched material damageSurface # the deadly surface flex damageInterval=1.0 # how often damage is applied in seconds. flex damage=4.0 # how much damage is applied thing victim local # actors and players affected. int type local end # ======================================================================================== code # ........................................................................................ touched: victim = GetSourceRef(); If(GetSurfaceMat(GetSenderRef()) == damageSurface) { Print("Got the surface"); type = GetThingType(victim); // If we have an actor (2) or a player (10) if ((type==2) || (type==10)) { Print("Got the player"); // Do the damage or healing. if (damage > 0) { DamageThing(victim, damage, 0x1, victim); Print("We hurt him"); } else { HealThing(victim, -damage); } } } return; # ........................................................................................ end
thanks in advance
------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance
-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance
Tazz
Tazz