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 → Why won't the surface change???
Why won't the surface change???
2002-02-24, 6:57 AM #1
ok I'm workin on a tournament cog for a mod that i'm doin. basically there are four different entrances to a sector. Once the sector has been entered twice then I want the entraces to turn to geo 4 and and transparent. I've already given it a sheild texture so once it changes to visible it should look like the shield. this is what I came up with for the cog
Code:
symbols 
int       dude 0 local
sector	*
surface	1
surface	2
surface	3	
surface	4
surface	5
surface	6
surface	7
surface	8
 
message       entered
message       startup
end 
# ======================================================================================== 
code 
startup:
sleep(2.0);
print("I'm here");
return;

entered:
dude = dude + 1;

if (dude == 2) 
{
for (i=1; i<=8; i=i+1)
{
SetFaceGeoMode(i , 4);
SetSurfaceFlags (i , 0x4);             
}
}

end 

it prints when i enter the sector twice but nothing happens to the surfaces. Any ideas.

lata
C_T

------------------
So young so angry damn that rap music
So young so angry damn that rap music
2002-02-24, 7:02 AM #2
a few things:

"i" is never defined in the symbols

Your array is not specifically searching for surfaces

------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz
2002-02-24, 7:07 AM #3
duh thx for the quick reply I can't believe I forgot that but what do you mean that my arary is not specificly searching for surfaces??
------------------
So young so angry damn that rap music

[This message has been edited by C_T (edited February 24, 2002).]
So young so angry damn that rap music
2002-02-24, 8:21 AM #4
There is some serious problems with this cog:

1) When defining local variables, do it like this:

Int Dude=0 Local

Dont forget the =.

2) Never call a variable a single charecter, and certainly not a numeral.

3) You never defined an object, to enter the sector. Add 'Thing Player Local' to the symbols, and 'Player = JKgetlocalplayer();' to the code.


The fixed version:

Code:
symbols
int dude=0 local
Thing Player Local
Sector Trigger
Surface Shield_0
Surface Shield_1
Surface Shield_2
Surface Shield_3
Surface Shield_4
Surface Shield_5
Surface Shield_6
Surface Shield_7
message entered
message startup
end 
code 
startup: sleep(2.0);
print("I'm here");
Player=JKgetlocalplayer();
return;
entered:
dude=dude+1;
if(dude==2) { for(i=0;i<=7;i=i+1) {
SetFaceGeoMode(Shield_0, 4);
SetSurfaceFlags (Shield_0, 0x4); } }
Stop;
end



------------------
Success is the inverse relationship between effort, gain, and loss.

JK editing resources.

[This message has been edited by GBK (edited February 24, 2002).]
And when the moment is right, I'm gonna fly a kite.
2002-02-24, 12:33 PM #5
Thx GBK but that doesn't work either so I'm pretty much out of ideas now. Anyone else have any???

lata,
C_T

------------------
So young so angry damn that rap music
So young so angry damn that rap music

↑ Up to the top!