hi perr

perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: hi perr

Post by perrinoia »

Yes, and/or sub groups of the control switches... It doesn't matter.

For instance:

Code: Select all

	instant SimGroup "Zone A" {
		instant Trigger "GroupTrigger1" {
			dataBlock = "GroupTrigger";
			name = "CaptureTrigger";
			position = "0 0 20";
			rotation = "0 0 0";
			boundingBox = "-1 -1 -1 1 1 1";
			isSphere = "False";
		};
		instant StaticShape "Switch" {
			dataBlock = "TowerSwitch";
			name = "Southwest Tower Switch";
			position = "-332.044 -147.125 154.814";
			rotation = "0 -0 -1.65978";
			destroyable = "True";
			deleteOnDestroy = "False";
			objectiveLine = "16";
			rotates = "False";
			collideable = "False";
			count = "0";
			deltaTeamScore = "12";
			objectiveName = "the Southwest Tower";
		};
		instant SimGroup "DropPoints" {
			instant SimGroup "random" {
				instant Marker "Drop Point1" {
					dataBlock = "DropPointMarker";
					name = "";
					position = "321.436 -64.8788 47.0098";
					rotation = "0 -0 -1.59991";
					locked = "1";
				};
			};
		};
	};
	
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: hi perr

Post by perrinoia »

Code: Select all

// Runs TowerSwitch::getSpawns for every TowerSwitch in the mission.
function Game::pickRandomSpawn(%team)
{
	%tmp = newObject("Random", SimSet);
	Group::iterateRecursive("MissionGroup", GameBase::virtual, "getSpawns", %team, %tmp);
	return Group::getObject(%tmp, floor(getRandom() * Group::objectCount(%tmp)));
	deleteObject(%tmp);
}
I forgot to put "MissionGroup" in quotes.
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: hi perr

Post by perrinoia »

Well, the problem is definitely within that function...

In fact, I do see another problem, but it's not related to the fact that it's not calling the other function....

Try this...

Code: Select all

// Runs TowerSwitch::getSpawns for every TowerSwitch in the mission.
function Game::pickRandomSpawn(%team)
{
	%tmp = newObject("Random", SimSet);
	Group::iterateRecursive(nameToID("MissionGroup"), GameBase::virtual, "getSpawns", %team, %tmp);
	%ret = Group::getObject(%tmp, floor(getRandom() * Group::objectCount(%tmp)));
	deleteObject(%tmp);
	return %ret;
}
BTW: Are you running a dedicated server or a listening server?

I suspect you are running a listening server, and that would explain why the script that needs to know what MissionGroup is doesn't work.
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: hi perr

Post by perrinoia »

Ugh.... Your capture post group is in MissionCleanup, not MissionGroup.

Just change that one "word" and problem should be solved.
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: hi perr

Post by perrinoia »

Woah... I'll take a look at that on a full PC when I get home...
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: hi perr

Post by perrinoia »

So, there's no TowerSwitch anymore? You're using an instant StaticShape "Laser", instead?

Does the Laser have a team? Does its team match the player's?

Tribes is finicky about things named Laser... I think it gets confused because Laser is already a specific projectile name and a class of projectiles. This is probably why damage caused by a laser is always damage type 6, regardless of which laser causes the damage.

I think GameBase::virtual navigates the object classes much like Group::iterateRecursive navigates the mission groups. I think it stops on the first object it finds called Laser, and it's probably a class of projectiles, not a specific projectile, or your static shape.

I'd suggest renaming your static shape datablock, and all of the associated functions, just to avoid this confusion. Maybe call it "TeamLaser" or "LaserIndicator", or something like that.
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: hi perr

Post by perrinoia »

Won't have time for a couple of days.
I've gotta do some maintenance on my brother's boat and clean up the apartment in anticipation of his arrival, on the 18th...
Image
User avatar
KILROY
Posts: 1315
Joined: Sat Apr 05, 2014 8:59 pm
Location: Texas

Re: hi perr

Post by KILROY »

And.....I relayed this to Perr already in a PM, but Thanks Again Man, for all you do!
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: hi perr

Post by perrinoia »

Syntax error on line: 1

Edit: you edited your pseudo code before I could critique it...
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: hi perr

Post by perrinoia »

Nah. Been busy as fuck.
Gonna look at it now, even though it's so hot in my room, I want to shut my computer off so it doesn't contribute to the temperature.
Image
Post Reply