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 → blasted elevator ver.2
blasted elevator ver.2
2001-04-27, 9:00 AM #1
*After foolishly posting this on the wrong forum, here's another attempt...*

I've transported a couple of Stormies onto a lift (in a different cog; during a cutscene) with the intention of the lift activating and going to the floor the player is on when he activates a certain door or crosses a certain adjoin. I've tried both ways with no luck. I'm completely baffled because it's not supposed to be a complicated cog...
#Jedi Knight Cog Script
#
#troopelev.cog
#
#Moves an elevator with troopers on it when the player moves past a certain point
#
#Scripted by Chewbubba
#
#This file was not made or supported by LucasArts Entertainment Company
#

symbols

message activated
message killed

sector storage

thing trooper5 linkid=1
thing elevator
thing maindoor linkid=2

sound ouch=ouch.wav

int elevdone=0
int dead=0

end

code

activated:
if(GetSenderRef() == 2)
{
if(elevdone) return;
//The next line checks to see if the troopers have been moved from the storage sector onto the elevator
if(GetThingSector(trooper5) == storage) return;
MoveToFrame(elevator, 1, 5);
elevdone=1;
}
return;

killed:
if(GetSenderRef() == 1)
{
if(dead) return;
PlaySoundLocal(ouch, 1.0, 0, 0);
Print("ouch...");
dead=1;
}
return;

end

Rhettman: No, I don't use such long comments, I added that here for clarification. Also, I wasn't clear about the "storage" sector in the other post. I think it is less misleading now.

------------------
And you thought Chewie was hairy...
2001-04-27, 10:43 AM #2
The only thing I see to change is that when you check for LinkID numbers you should use
" if (GetSenderId() == 2) " and " if (GetSenderId() == 1) " rather than using GetSenderRef().
Hope that helps. [http://forums.massassi.net/html/smile.gif]

------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2001-04-28, 2:50 AM #3
Gah! I knew it would be something simple and stupid. That got it. Thanks!

------------------
And you thought Chewie was hairy...

<A HREF="http://"http://www.cswnet.com/~linde/lightsabers_edge.htm"" TARGET=_blank>The Lightsaber's Edge</A>
"Harriet, sweet Harriet - hard-hearted harbinger of haggis."

↑ Up to the top!