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 → is it possible to..
is it possible to..
2001-12-17, 3:56 PM #1
Im just wondering if its possible to make a cog that makes a player get 100 life and shields when they enter a sector, even if they have over 100 shields?
I have a guns level, and im making a saber area in it, and i want it to beable to make the players have 100 life/shields so they cant enter with 200 shields so it takes longer to kill them. Im using the no guns cog for it, and once u enter the area u cant leave, so people cant go in just to refill life and shields.

------------------
PluG
Forum moderator for the WolfensteinWorld.com forums
keke~~
2001-12-18, 12:41 PM #2
Beat you to it, GBK. [http://forums.massassi.net/html/biggrin.gif]

Code:
# Setstats.cog
#
# Set the player's health and shields to 100 when he enters a sector.
#
# [SM]
#======================================================================#
symbols

sector	yoursect
thing		player		local

end
#======================================================================#
code
#----------------------------------------------------------------
entered:
	player=GetSourceRef();		// Find the player who entered the sector.

	// Let only the player who entered set his stats.
	if(GetLocalPlayerThing() != GetSourceRef()) Return;

	SetHealth(player, 100);		// Health to 100.
	SetInv(player, 60, 100);		// Shields to 100.

Return;
#----------------------------------------------------------------
end


I think that's what you wanted. Good luck. [http://forums.massassi.net/html/wink.gif]

------------------
Incognito
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-12-18, 4:57 PM #3
I let you have it... [http://forums.massassi.net/html/tongue.gif]

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-12-19, 12:39 PM #4
thanks!

im gonna go add it.

------------------
PluG
Forum moderator for the WolfensteinWorld.com forums
keke~~

↑ Up to the top!