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 → whats wrong with this cog
whats wrong with this cog
2002-11-04, 2:00 AM #1
i want it when u hit a surface a sector's tint changes then after X amount of time, it chages back. (im new, and yes i posted about someone making me this cog, but it was before i learned that i could do some cogging)

# TQB 11-4-02
# JK Cog
# activation tint

symbols
message activated
message timer
surface face
sector sec
sectortint color

flex waittime

end

code
activated:
GetSectorTint(sector);
SetSectorTint(sector,000.000.000);
sleep(waittime);
settimer(delay);

return;

timer:

staus=0

end
-------------------------
It's Me, It's Me, It's TQB
-------------------------
2002-11-04, 4:27 AM #2
Two things, first, this should go with your previous topic. Second, this applies to Everyone, use code tags! Here is a cog to use.
Code:
# Jedi Knight Cog Script
#
# Changes sector by use of switch
#
# [DP]
#

symbols
vector          rgb               local
surface         switch
sector          targetSector      nolink
flex            delay

message         activated
message         timer
end

code
Activated:
   SetWallCel(switch, 1);     // Switch the wall cell, no sound
   rgb = GetSectorTint(targetSector);     // Old tint stores as vector
   SetSectorTing(targetSector, '0 0 0');
   KillTimerEx(1);     // Resets the delay
   SetTimerEx(delay, 1, 0, 0);     // Actual delay
   Return;

Timer:
   SetSectorTint(targetSector, rgb);
   SetWallCel(switch, 0);
   Return;
end
There were a few things wrong with your code to begin with, try to find them and tell me.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!