mapping help

Post Reply
User avatar
S_hift
Posts: 1963
Joined: Fri Dec 23, 2011 1:42 pm

mapping help

Post by S_hift »

so i'm working on a map right now, and I need some help. I'm using the anni editor and i'm really liking the extra things to use.

I trying to add a titan armor for display purposes

PROBLEMS
- the armor isn't drawing its primary weapon (i've already tried manually passing the titan armor the particle beam to see if it will auto draw
- i can still kill the armor even with destroyable set to "false"
- I can't see the name tag, even with hm on lol

Code: Select all

	instant Player "armorTitan1" {
		dataBlock = "armorTitan";
		name = "S_hift";
		position = "-302.752 277.175 -7.84691";
		rotation = "0 -0 1.87998";
		destroyable = "False";
		use("Particle Beam");
Image <--Click here to subscribe to S_hift's youtube
Click here for full access to all my tribes downloads
AnniDv6
Posts: 1039
Joined: Mon Dec 12, 2011 3:25 pm

Re: mapping help

Post by AnniDv6 »

I don't think that would work. Maybe if you added the particle beam as a shape to the editor and manually placed it. You might even be able to kill yourself, hop in the editor and grab the particle beam and copy it out of mission cleanup and paste it into a group, but I don't know if it would be a separate shape from the armor or not. Or just make it a bot. This is from BotPracticeMk-III, maybe it will help.

Code: Select all

		instant StaticShape "ArenaBots" {
			dataBlock = "TowerSwitch";
			name = "ArenaBots";
			position = "-16.9701 -588.162 -33.5889";
			rotation = "0 0 0";
			destroyable = "True";
			deleteOnDestroy = "False";
			objectiveLine = "10";
			numSwitchTeams = "0";
			scoreValue = "1";
		};

Code: Select all

	instant SimGroup "AI" {
		instant SimGroup "Bot1" {
			instant Marker "Marker1" {
				dataBlock = "PathMarker";
				name = "";
				position = "26.0118 -537.5 536.125";
				rotation = "0 0 0";
			};
		};

Code: Select all

function AI::wieldWeapons(%aiName)
{
	%aiId = AI::getId(%aiName);
	
   if(Game::missionType == "DM")
   {	
      dbecho(2, "giving DM weapon select...");
      Player::setItemCount(%aiId, blaster, 1);
   }
   else
   {
      dbecho(2, "giving normal weapon select...");
	   Player::setItemCount(%aiId, ParticleBeamWeapon, 1);
	   Player::setItemCount(%aiId, TankShredder, 1);
	   Player::setItemCount(%aiId, TankShredderAmmo, 10000);
   }
   
   Player::mountItem(%aiId, TankShredder, 0);
   AI::SetVar(%aiName, triggerPct, 0.03 );
   AI::setVar(%aiName, iq, 100 );
   AI::setVar(%aiName, attackMode, 1);
   AI::setAutomaticTargets( %aiName );
   ai::callbackPeriodic(%aiName, 5, ai::AnniWeaponChange);
}

Code: Select all

function ai::AnniWeaponChange(%aiName)
{
	dbecho(2, %aiName @ " thinking....");
   %aiId = AI::getId(%aiName);
   %curTarget = ai::getTarget( %aiName );
   
   if(%curTarget == -1)
   {
   	return;
   }
      
   dbecho(1, %aiName @ " target: " @ %curTarget);	
   
   %targLoc = GameBase::getPosition(Client::getOwnedObject(%curTarget));
   %aiLoc = GameBase::getPosition(Client::getOwnedObject(%aiId));
   %targetDist = Vector::getDistance(%aiLoc, %targLoc);
   dbecho(2, "distance to target: " @ %targetDist @ 
                  " targetPosition: " @ targLoc @ " aiLocation: " @ %aiLoc);
                  
   if(%targetDist > 25)
   {
   	Player::mountItem(%aiId, TankShredder, 0);
      AI::SetVar(%aiName, triggerPct, 1.0 );
   }   
   else
   {
      dbecho(2, "checking for target jet...");
      dbecho(2, "jetting? " @ Player::isJetting(%curTarget));
      if(Player::isJetting(%curTarget))
      {	
         Player::mountItem(%aiId, TankShredder, 0);
         AI::SetVar(%aiName, triggerPct, 1.0 );
      }
      else
      {
         Player::mountItem(%aiId, ParticleBeamWeapon, 0);  
         AI::SetVar(%aiName, triggerPct, 0.03 );
      }   
   }
}

Code: Select all

function AI::armdiscWeap(%aiName)
{
	%aiId = AI::getId(%aiName);
	
   if(Game::missionType == "DM")
   {	
      dbecho(2, "giving DM weapon select...");
      Player::setItemCount(%aiId, blaster, 1);
   }
   else
   {
      dbecho(2, "giving normal weapon select...");
	   Player::setItemCount(%aiId, DiscLauncher, 1);
	   Player::setItemCount(%aiId, DiscAmmo, 100);
   }
   
   Player::mountItem(%aiId, DiscLauncher, 0);
   AI::SetVar(%aiName, triggerPct, 0.03 );
   AI::setVar(%aiName, iq, 70 );
   AI::setVar(%aiName, attackMode, 1);
   AI::setAutomaticTargets( %aiName );
}

Code: Select all

function AI::minwieldWeap(%aiName)
{
	%aiId = AI::getId(%aiName);
	
   if(Game::missionType == "DM")
   {	
      dbecho(2, "giving DM weapon select...");
      Player::setItemCount(%aiId, blaster, 1);
   }
   else
   {
      dbecho(2, "giving normal weapon select...");
	   Player::setItemCount(%aiId, Vulcan, 1);
	   Player::setItemCount(%aiId, VulcanAmmo, 200);
   }
   
   Player::mountItem(%aiId, Vulcan, 0);
   AI::SetVar(%aiName, triggerPct, 1.0 );
   AI::setVar(%aiName, iq, 70 );
   AI::setVar(%aiName, attackMode, 1);
   AI::setAutomaticTargets( %aiName );
}

Code: Select all

function TowerSwitch::onCollision(%this, %object) {
if(GameBase::getMapName(%this) == "Switch1") {
  createAI( Dummy1 , "MissionGroup\\AI\\Bot1", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "Switch2") {
  createAI( Dummy2 , "MissionGroup\\AI\\Bot2", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "Switch3") {
  createAI( Dummy3 , "MissionGroup\\AI\\Bot3", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "Switch4") {
  createAI( Dummy4 , "MissionGroup\\AI\\Bot4", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "Switch5") {
  createAI( Dummy5 , "MissionGroup\\AI\\Bot5", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "Switch6") {
  createAI( Dummy6 , "MissionGroup\\AI\\Bot6", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "Closebot") { 
  createAI( Dummy7 , "MissionGroup\\AI\\Gbot1", armorfAngel, Dummy );
  AI::armdiscWeap(Dummy7);
}
if(GameBase::getMapName(%this) == "MidBot") {
  createAI( Dummy8 , "MissionGroup\\AI\\Gbot2", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "Farbot") {
  createAI( Dummy9 , "MissionGroup\\AI\\Gbot3", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "HiBot") {
  createAI( Dummy10 , "MissionGroup\\AI\\HiBot", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "MilBot") {
  createAI( Dummy11 , "MissionGroup\\AI\\MilBot", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "LowBot") {
  createAI( Dummy12 , "MissionGroup\\AI\\LowBot", armorfAngel, Dummy );
}
if(GameBase::getMapName(%this) == "ArenaBots") {
  createAI( Battlebot1 , "MissionGroup\\AI\\BotLord", armorTank, BotLord );
  createAI( Battlebot2 , "MissionGroup\\AI\\Minion1", armormWarrior, BotMinion );
  createAI( Battlebot3 , "MissionGroup\\AI\\Minion2", armormWarrior, BotMinion );
  createAI( Battlebot4 , "MissionGroup\\AI\\Minion3", armormWarrior, BotMinion );
  AI::wieldWeapons(Battlebot1);
  AI::minwieldWeap(Battlebot2);
  AI::minwieldWeap(Battlebot3);
  AI::minwieldWeap(Battlebot4);
}
}

User avatar
S_hift
Posts: 1963
Joined: Fri Dec 23, 2011 1:42 pm

Re: mapping help

Post by S_hift »

i guess i could just MAKE a particle beam in editor....
Image <--Click here to subscribe to S_hift's youtube
Click here for full access to all my tribes downloads
AnniDv6
Posts: 1039
Joined: Mon Dec 12, 2011 3:25 pm

Re: mapping help

Post by AnniDv6 »

Yeah. I just tried dropping the weapon and the shape file is just a targeting laser weapon, probably because the particle beam is a few different things patched together. If you can get all of the shapes it uses and add them to a mission group you would be able to manually place them. The weapons will drop to the ground though so you might have to put them on force beacons or something.
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: mapping help

Post by DaJ4ck3L »

the pbeam is a target laser image. the other stuff get's mounted onto the player when he equips it.

looking at it like, a player has 7 mount slots i think, so pbeam (target laser) would go in the weapons slot, and the other objects (laser / epack) get mounted into the open slots.
Image
Post Reply