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 → quick question
quick question
2004-01-05, 3:03 PM #1
i have been stumped on this problem for a few days now.... i want to create uneven teams in a jk mp level. say 3vs1, the only problem is i want it all to be in the level so users can use mods with it. so i need a way to make the 3 unable to damage each other and only to damage the 1. i would like to make the 3 invincible and then check to see if the 1 player damaged them and then apply the damage, or apply the damage if it was self inflicted. this would be very simple to do if i changed the kyle.cog but i don't want to. so any insight into how to do this would be greatly apperciated. if my question made any sense.....

------------------
roses are red, violets are blue, I am schizophrenic, and I am too!
roses are red, violets are blue, I am schizophrenic, and I am too!
2004-01-05, 3:26 PM #2
The Rbots project had implemented that. I haven't looked at it but you'll be sure to find something there.

------------------
It's Peanut Butter Jelly Time!
/Banana starts dancing
May the mass times acceleration be with you.
2004-01-05, 4:00 PM #3
thanks ill look through there... just downloaded it cause i was interested in something else in there. if you find where specifically post please, just in case i can't find it [http://forums.massassi.net/html/tongue.gif]

------------------
roses are red, violets are blue, I am schizophrenic, and I am too!
roses are red, violets are blue, I am schizophrenic, and I am too!
2004-01-05, 5:25 PM #4
Not sure if i understand your question completely, but can't you use:

GetNumPlayersInTeam(team int);
SetPlayerTeam(player,team int);
GetPlayerTeam(player);

some how in conjunction with a join, or startup, or maybe new player message to get what you want done?

------------------
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
2004-01-07, 3:32 PM #5
i think i tried that but ran into a problem.... can't remember what it was, but that was the method i had wanted to use

------------------
roses are red, violets are blue, I am schizophrenic, and I am too!
roses are red, violets are blue, I am schizophrenic, and I am too!
2004-01-07, 3:38 PM #6
I can't tell you much more about the Rbots except that it would most likely be in a "damaged" message. The only reason I know you can't hurt teammates in Rbots Teams is because I REALLY tried to kill one of the reb bots (my team) and I just couldn't. I fired at him for like 5 minutes straight.
I'll take a quick look and see if I can't find something else.

[edit]
Ok, here's the code you want. It's in rbot-srv.cog and is in the "damaged" section
Code:
if (BitTest(gamemode,0x8) && ((GetThingType(GetThingParent(damager)) == 10 && GetPlayerTeam(GetThingParent(damager)) == team) || (GetThingType(GetThingParent(damager)) == 2 && GetThingUserData(GetThingParent(damager)) == team))) damage=0;
ReturnEx(damage);


This code checks the gamemode for teamplay (I'm almost positive). It also check for the damager's type (2=actor, 10=player); if the damager is one of those 2 types and it's on the 'damaged' bot's team, it cancels the damage (the bot is not a player, so the code has the bot's team info stored in its userdata).

Unfortunately, it looks like you'll have to edit the kyle.cog 'damaged' message to use this. Maybe there's a way around it, though...

------------------
It's Peanut Butter Jelly Time!
/Banana starts dancing

[This message has been edited by Darth Slaw (edited January 07, 2004).]
May the mass times acceleration be with you.

↑ Up to the top!