Page 2 of 3
Re: hi perr
Posted: Sat Jun 13, 2015 3:52 pm
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";
};
};
};
};
Re: hi perr
Posted: Sat Jun 13, 2015 9:59 pm
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.
Re: hi perr
Posted: Sun Jun 14, 2015 5:49 am
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.
Re: hi perr
Posted: Mon Jun 15, 2015 8:34 am
by perrinoia
Ugh.... Your capture post group is in MissionCleanup, not MissionGroup.
Just change that one "word" and problem should be solved.
Re: hi perr
Posted: Mon Jun 15, 2015 6:04 pm
by perrinoia
Woah... I'll take a look at that on a full PC when I get home...
Re: hi perr
Posted: Tue Jun 16, 2015 8:51 am
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.
Re: hi perr
Posted: Tue Jun 16, 2015 2:44 pm
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...
Re: hi perr
Posted: Tue Jun 16, 2015 9:46 pm
by KILROY
And.....I relayed this to Perr already in a PM, but Thanks Again Man, for all you do!
Re: hi perr
Posted: Wed Jun 17, 2015 7:49 am
by perrinoia
Syntax error on line: 1
Edit: you edited your pseudo code before I could critique it...
Re: hi perr
Posted: Tue Jun 23, 2015 7:34 am
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.