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 → Okay I need some more help
Okay I need some more help
2001-08-26, 8:49 AM #1
I would like to know how to make a cog that increases your health as you hold down the key.
Eg, you hold down F5 and it increases your health by 10 every second until you release the key. I'm a pretty newb cogger, so this may be easy or not i dont know.

------------------
'The God of Death is Back from Hell' - Duo Maxwell
'I'll Kill Zechs, that will be my way of saying thanks' - Heero Yuy
'You can try and kill me, but I might struggle a bit' - Trowa Barton
2001-08-26, 2:16 PM #2
Code:
symbols
thing player local
message activated
message startup
end

code
startup:
 player = GetLocalPlayerThing();
 Return;

activated:
 SetThingHealth(player, GetThingHealth(player)+5);
 Return;

end
Capitalization
Commas
Periods
Question Marks
Apostrophes
Confusable Words
Plague Words
2001-08-26, 2:55 PM #3
I think what he wants is:

symbols
thing player local
message activated
message deactivated
message pulse
message startup
end

code
startup:
player = GetLocalPlayerThing();
Return;

activated:
SetPulse(1.0);
return;

deactivated:
SetPulse(0);
return;

pulse:
HealThing(player, 10.0)
Return;

end


-Raze
--
You are all just jealous because you can't hear the small voices!!

↑ Up to the top!