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 → Cogging Challenge
Cogging Challenge
2002-06-13, 10:53 AM #1
Hey guys. Here it is: I need a cog that will make doors that can only be opened if the player who activates it is either lightside or darkside. EX: You're a light jedi and you come to a door. The door will open for you, but if were you a darkside user, then the door will not function. I don't know if this is possible, but if it is, show me how asap. I'd like the cog to be for multiplayer. Thanks! -Xak
"He called me a murderer and I grabbed his hair and smashed his face into his dinner."
2002-06-13, 12:19 PM #2
The player's choice is stored in bin 18. 0 is neutral, 1 is lightside and 2 is darkside. Put this at the beginning of the activated message in your door cog:
Code:
player = GetSourceRef();
choice = GetInv(player, 18);
if(choice == 0)
{
 //Do action for neutral players
}
if(choice == 1)
{
 //Do Action for lightside weaklings
}
if(choice == 2)
{
 //Do action for darkside players
}

I heard that you don't have to declare variables, so that should work, but if it doesn't, just declare choice and player as an int in the symbols section...

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-06-13, 12:23 PM #3
If you only want the functionality described in the example of your posting, put this instead of the previous code below activated:
Code:
player = GetSourceRef();
choice = GetInv(player, 18);
if(choice != 1) return;
//Normal door code below


------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)

↑ Up to the top!