Posted by Raptor [JiB] on February 03, 1998 at 16:26:22:
In Reply to: Re: Is health a flex? In JKspecs it says int (nt) posted by CogKIng on February 03, 1998 at 16:09:26:
I have the following things OK:
doesn't work without ammo
doesn't work if you are alredy controlling mouse (player model is mouse's)
create a "dummy" at the placing position to make it look like kyle has been left behind.
I can probably do other things, but this is the problem:
When the mouse or kyle dummy is damaged, the mouse involuntarily explodes, and the player is teleported to the dummy position and given back their normal model. This gives the effect that kyles lost control of mouse and we see again from his POV.
I don't know how, though
I couldn't get anything to do with
message damaged
to work, so I tried getting the original health when the mouse is activated
symbols
flex orighealth
message activated
orighealth = (GetThingHealth(player));
I then set the pulse to 0.1, and
said in pulse:
if(GetThingModel(player) == mousemodel defined in symbols)
{
if(GetThingHealth(player) < orighealth)
{
Carry out remodel, teleport and things like that
SetThingHealth(player, orighealth); //the mouse is damaged, not the player.
}
}
return;
These bits of code are not exact (I deleted all but good bits) but they're not far off what I used.
So, is this a load of rubbish or am I committing a simple mistake.
p.s. Is there a way of finding errors in cogs by having dodgy values printed to the console or something? Thanks a lot for any help.