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 → blind in the shadows
blind in the shadows
2002-01-29, 6:38 AM #1
is there an editing way to do this or does anyone have suggestions on how to cog this: I was kinda wanting a way to specify sectors that a player (sp) can be in and the ai won't see him. this would be so the whole sneaking around/shadow hiding type of game play could be exploited. I thought it could be like player enters sector 'A' and while in sector 'A' = AI can't see (or force persuasion without the sparkles or sound.? or something similar to what lordx-t_ij is saying in his post

[This message has been edited by kwigibo (edited January 29, 2002).]
"Mmmmm, forbidden doughnut."

2002-01-29, 9:17 AM #2
The 0x80 Actor Flag will make the player invisible to AIs. Haven't tested it, but this cog should work. It should also work correctly with persuasion.
Code:
# shadowsector.cog
#
# Make the player invisible to AI when he enters a sector by setting the 0x80 Actor Flag.
# The pulse is continually setting the flag because persuasion may turn it off.
#
# [SM]
#======================================================================#
symbols

sector	shadows

thing		player	local

message	entered
message	exited
message	pulse

end
#======================================================================#
code
#----------------------------------------------------------------
entered:
	player=GetLocalPlayerThing();
	SetPulse(0.1);

Return;
#----------------------------------------------------------------
exited:
	SetPulse(0);
	// Don't clear the flag if the player has turned on persuasion.
	if(!IsInvActivated(player, 26)) ClearTypeFlags(player, 0x80);

Return;
#----------------------------------------------------------------
pulse:
	SetTypeFlags(player, 0x80);

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


There you go. [http://forums.massassi.net/html/wink.gif]

------------------
Each cog better than the next
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-01-29, 3:47 PM #3
cool, thanks. I'll test it out. If I ever end up actually using, you'll be in there!
"Mmmmm, forbidden doughnut."

↑ Up to the top!