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 → Quick FField cog......
Quick FField cog......
2002-07-24, 10:03 AM #1
There is a forceield blocking a small room. In another part of the level, there is a 2 cell surface. When the surface get damage from either the saber or and explosion, it changes to the next cell and forciefiled deactivates and end of story. Nothing resets, just 'bam' forcefield gone.

------------------
Sanctum de la Mort
2002-07-24, 12:24 PM #2
Here's the cog:

Code:
# quickff.cog
#
# Deactivate a forcefield when a switch is damaged.
#
# [SM]
#====================================================#
symbols

surface	switch	mask=0x8
surface	field		nolink

int		done=0		local

message	damaged

end
#====================================================#
code
#-------------------------------------------
damaged:
	if(done) Return;
	done=1;
	SetAdjoinFlags(field, 0x2);
	SetFaceGeoMode(field, 0);
	SetSurfaceCel(switch, 1);

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


I'm not sure whether you are using the 0x2 (Passable) or 0x10 (Impassable for player) Adjoin flags to stop the player from going through the force field. If you're using the 0x10 flag, replace the SetAdjoinFlags() command in the cog with:
Code:
ClearAdjoinFlags(field, 0x10);


Ask if you need anything else. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

[This message has been edited by SaberMaster (edited July 24, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-07-24, 12:56 PM #3
Yeah, but it needs to be just like slashgrate. Wil only change from explosion, or saber.

------------------
Sanctum de la Mort
2002-07-24, 2:42 PM #4
Ah, I misunderstood you before. Replace the line:
Code:
if(done) Return;

with this:
Code:
if(done || GetParam(1) != 0x4 && GetParam(1) != 0x10) Return;


------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!