PDA

View Full Version : Cogging Challenge



Xak
06-13-2002, 01:53 PM
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

zagibu
06-13-2002, 03:19 PM
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:


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)

zagibu
06-13-2002, 03:23 PM
If you only want the functionality described in the example of your posting, put this instead of the previous code below activated:


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)