Full Version : dunno whats up?
xmlspawner >>XMLPoints Discussion >>dunno whats up?
<< Prev | Next >>
Ghostwyren- 01-08-2007
alright so the flags supposed to auto go into a players backpack when they get 1 tile away but for some reason it just sits there? even if they pick it up they can run with it but they cant place in pack or on there side or any thing? any ideas? and i was wondering how to make it so they can pick the places that the flags spawn instead of going to green acres?
ArteGordon- 01-09-2007
For CTF, when you set up the game you assign teams by entering a team number in the little text entry next to each name, then click the 'Set Teams' button and pick the location for the bases for each team from the 'Team Status' window.
That is when the flags will be automatically placed.
It sounds like maybe you were trying to place the flags by manually adding them.
Also, go into CTFGump.cs around line 960 and make sure that you have enabled manual targeting for base locations instead of hardcoded locations

CODE
public override void OnResponse(NetState state, RelayInfo info) { if (state == null || info == null || state.Mobile == null || m_gauntlet == null) return; switch (info.ButtonID) {
default:
{
// base buttons
if (info.ButtonID >= 1000)
{
int team = info.ButtonID - 1000;
state.Mobile.Target = new CTFBaseTarget(m_gauntlet, team);
// for hardcoded base locations instead of manually placed
// comment out the Target line above and uncomment the code below
//
/*
Point3D baseloc = Point3D.Zero;
switch (team)
{
// hardcode the base locations for as many teams as you would like
case 1:
baseloc = new Point3D(5450, 1150, 0);
break;
case 2:
baseloc = new Point3D(5500, 1150, 0);
break;
case 3:
baseloc = new Point3D(5450, 1150, 0);
break;
case 4:
baseloc = new Point3D(5500, 1150, 0);
break;
}
CTFBase newbase = m_gauntlet.FindBase(team);
if (baseloc != Point3D.Zero)
{
if (newbase == null)
{
newbase = new CTFBase(m_gauntlet, team);
// add the base to the gauntlet list
m_gauntlet.HomeBases.Add(newbase);
}
newbase.MoveToWorld(new Point3D(baseloc), state.Mobile.Map);
}
*/
state.Mobile.SendGump(new TeamsGump(m_gauntlet, state.Mobile));
}
break;
}
}
}

Ghostwyren- 01-09-2007

QUOTE (ArteGordon @ January 09, 2007 10:50 am)
For CTF, when you set up the game you assign teams by entering a team number in the little text entry next to each name, then click the 'Set Teams' button and pick the location for the bases for each team from the 'Team Status' window. That is when the flags will be automatically placed.
It sounds like maybe you were trying to place the flags by manually adding them.
Also, go into CTFGump.cs around line 960 and make sure that you have enabled manual targeting for base locations instead of hardcoded locations

CODE
public override void OnResponse(NetState state, RelayInfo info) { if (state == null || info == null || state.Mobile == null || m_gauntlet == null) return; switch (info.ButtonID) {
default:
{
// base buttons
if (info.ButtonID >= 1000)
{
int team = info.ButtonID - 1000;
state.Mobile.Target = new CTFBaseTarget(m_gauntlet, team);
// for hardcoded base locations instead of manually placed
// comment out the Target line above and uncomment the code below
//
/*
Point3D baseloc = Point3D.Zero;
switch (team)
{
// hardcode the base locations for as many teams as you would like
case 1:
baseloc = new Point3D(5450, 1150, 0);
break;
case 2:
baseloc = new Point3D(5500, 1150, 0);
break;
case 3:
baseloc = new Point3D(5450, 1150, 0);
break;
case 4:
baseloc = new Point3D(5500, 1150, 0);
break;
}
CTFBase newbase = m_gauntlet.FindBase(team);
if (baseloc != Point3D.Zero)
{
if (newbase == null)
{
newbase = new CTFBase(m_gauntlet, team);
// add the base to the gauntlet list
m_gauntlet.HomeBases.Add(newbase);
}
newbase.MoveToWorld(new Point3D(baseloc), state.Mobile.Map);
}
*/
state.Mobile.SendGump(new TeamsGump(m_gauntlet, state.Mobile));
}
break;
}
}
}

Nah i wish i was but thats how it was for players when we tested it just wouldnt move. we set up a game and it took us to green acres then when we tried to grab the other flag just to see it wouldnt work.
ArteGordon- 01-09-2007
Make sure that you are testing it with players that have Player accesslevel. It wont work with staff.
You could also try commenting out the hardcoded locations as in the example above and set it up with your own bases.