Ok, here's the deal. I'm coding a King of the Hill MP game much like Perfect Dark's. The following snippet checks for anyone in the hill. If an enemy team has it, the countdown clock stops, if your team has it, nothing changes, and if nobody has it, your team claims the hill. It is on a .5 second pulse. All I need to know is if the syntax is right, and whether this will work. Give feedback plz.
Thanks so much, as always!
------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance
-Tazz
Code:
////////////////SECTOR CHECK\\\\\\\\\\\\\\\\\\\\\\\ x = GetSenderID(); tester = FirstThingInSector(x); while(tester != -1) { if(GetThingType(tester) == 10) || (GetPlayerTeam(tester) == 1) playerCountgold0[x] = playerCountgold0[x]+1; if(GetThingType(tester) == 10) || (GetPlayerTeam(tester) == 2) playerCountred0[x] = playerCountred0[x]+1; if(GetThingType(tester) == 10) || (GetPlayerTeam(tester) == 3) playerCountgreen0[x] = playerCountgreen0[x]+1; if(GetThingType(tester) == 10) || (GetPlayerTeam(tester) == 4) playerCountblue0[x] = playerCountblue0[x]+1; //Check to see if hill is taken If(lock_capture > 0) || (GetPlayerTeam(tester) != capturing_team) //Hill is taken, Stop the countdown //becuase enemy team has entered { call stop_countdown; Return; } Else //Hill is NOT taken, give it to the //player, and his team { //REPLACE WITH SENDTRIGGER EVENTUALLY //set_tint, get team info, etc... capturing_team = GetPlayerTeam(GetSourceRef()); lock_capture = 1; SetTimerEx(20, 6001, 0, 0); SetTimerEx(1, 6002, 0, 0); Return; } tester = NextThingInSector(tester); }
Thanks so much, as always!
------------------
-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
Tazz