Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → healing plant cog help
healing plant cog help
2000-12-19, 1:42 PM #1
this cog that i made that is connected to a plant 3do that heals the player that steps into it gradually isnt working heres the code--

Code:
# Jedi Knight Cog Script
#
# This cog is not supported by LucasArts


# ========================================================================================
symbols                                                       
message      Touched                                                           
sector       damageSector                       #                             the
flex         damageInterval=1.0                 #                             how
flex         damage=4.0                         #                             how
thing        player                             local                         #
sound        bushsound=bossk-1.wav              local
int          type                               local                         
end                                                                           
# ========================================================================================
code
# ........................................................................................
Touched:
player = GetSourceRef();
PlaySoundThing(bushsound, player, 1.0, -1, -1, 0x80);
DamageThing(victim, damage, 0x1, victim);
else
{
HealThing(victim, -damage);
}
return;
# ........................................................................................
end


can someone correct it please?
2000-12-19, 6:35 PM #2
it must be:
HealThing(Victim, damage);
then you need to change flex damage to negative [http://forums.massassi.net/html/wink.gif]...


------------------
He loves best who prayed best,
all things both great and small,
for the dear God who loved us,
He may ain't love at all.
WHAT?
2000-12-20, 12:34 AM #3
Ok, you have an else in the code when it's not needed. Just remove that and the brackets. Also, as Cave said, you can't have the opposite of variables. You have to manually set them yourself.
2000-12-20, 8:51 AM #4
ohh oops thanks guys

↑ Up to the top!