Page 1 of 1

Acidgun fire

Posted: Sat Mar 14, 2015 4:47 am
by Petas
Hi I have a problem idk
I want to ask.
I have a map where I Acid gun and I would like to give me a shot to the soldiers.
How do I do it? :PB

Re: Acidgun fire

Posted: Sat Mar 14, 2015 5:21 am
by TommyCD1
To fight against the acid guns and healers would be the same way you place crates in the level. You must assign the guns to their own team and then make that team enemies with everyone.

Also make sure that the team is not playable. For example:

Playable team:

Code: Select all

  CreateTeam("team1", 0)
  {
    Color(0, 0, 0);

    Relations()
    {
      With("team1", "Ally");       //  Playable teams
      With("team2", "Neutral");  //  need to be set as
      With("team3", "Neutral");  //  neutral so that
      With("team4", "Neutral");  //  multiplayer works.
      With("guns", "Enemy"); // Make players enemies with the guns.
    }

    DefaultClient(1);  // Only the first team should have this set as 1!
    AvailablePlay(1);  // Set this to 1 to make this team playable. Set it to 0 for an npc.
    HasStats(1);
    RequireAI(0);
    Side("army");
    SideFixed(0);
    Objectives();
    StartRegion(210);  // Playable teams require a region.
    StartPoint(0.730244, 0.157607);
    StartYaw(0.000000);
    Personality("None");
    PainCurrentCluster(0);
    UniqueScriptId(0);

    Storage()
    {
      Add("Plastic", 2000);     // Make sure to give your
      Add("Electricity", 800);  // players resources!
    }
  }
Non-playable team:

Code: Select all

  CreateTeam("guns", 4)
  {
    Color(113, 113, 113);

    Relations()
    {
      With("team1", "Enemy");  // Make this team
      With("team2", "Enemy");  // enemies with
      With("team3", "Enemy");  // all of the
      With("team4", "Enemy");  // players.
      With("guns", "Ally");  // A team must be allies with itself.
    }

    DefaultClient(0);
    AvailablePlay(0);  // Set to 0 so this team is not playable.
    HasStats(0);  // This should also be set to 0.
    RequireAI(0);
    Side("army");
    SideFixed(1);  // The side should be fixed, otherwise this team will spawn with a sarge and bulldozer.
    Objectives();
    StartPoint(0.730244, 0.157607);
    StartYaw(0.000000);
    Personality("None");
    PainCurrentCluster(0);
    UniqueScriptId(0);
    Storage();  // A non-playable team does not need resources.
  }

Re: Acidgun fire

Posted: Sat Mar 14, 2015 6:00 am
by Petas
Thanks
I'm still not there I will not give idk

Re: Acidgun fire

Posted: Sat Mar 14, 2015 5:39 pm
by BobTheHunted
HQ-fizzo wrote:Thanks
I'm still not there I will not give idk
Make sure in your mission's Objects.cfg file the hostile object has this layout:

Code: Select all

CreateObject("army.unit.riff", #) //The number here is where you put object number
{
  MapObj()
  {
    HitPoints(1.000000); //This makes the unit attackable and aggressive 

    Position()
    {
      Pos(#.000000, #.000000, #.000000);  //Put the acid guns coords here 
      Right(#.000000, 0.000000, 0.000000);
      Up(0.000000, #.000000, 0.000000);
      Front(0.000000, 0.000000, #.000000);
    }

    Zip();
  }

  UnitObj()
  {
    Team("Acidgunteamnamehere");
    Upgrades();
  }
}
The # is where you insert numbers for your object don't leave them in

Re: Acidgun fire

Posted: Sat Mar 14, 2015 6:18 pm
by Petas
OK but it probably does not idk idk

Re: Acidgun fire

Posted: Sun Mar 15, 2015 12:43 pm
by BobTheHunted
There can only be 8 teams btw, A.I or not, for them to have proper colors and be hostile or do anything in general

Re: Acidgun fire

Posted: Sun Mar 15, 2015 12:48 pm
by TommyCD1
BobTheHunted wrote:There can only be 8 teams btw, A.I or not, for them to have proper colors and be hostile or do anything in general
Actually there are only 8 teams allowed because the game will crash otherwise.

Re: Acidgun fire

Posted: Sun Mar 15, 2015 1:01 pm
by BobTheHunted
TommyCD1 wrote:
BobTheHunted wrote:There can only be 8 teams btw, A.I or not, for them to have proper colors and be hostile or do anything in general
Actually there are only 8 teams allowed because the game will crash otherwise.
Actually, that's not the case. I created a 9th team and added units on that team directly to the map, to test if I could potentially add enemy AI to the map by default. The units worked in the sense that they just stood there and did nothing, not attackable, no colors(they were magenta pink, I guess that is the default for missing colors) and they would only move If they were in the way of something. Didn't crash for me though, I guess I did something different? Doesn't really matter I guess, since it doesn't properly work anyway

Re: Acidgun fire

Posted: Sun Mar 15, 2015 1:45 pm
by TommyCD1
You most likely added a 9th team but neglected to give them their own ID.

As in:

CreateTeam("team1", 0)

The game only supports up to 8 tags, so

CreateTeam("team1", 0)
CreateTeam("team2", 1)
CreateTeam("team3", 2)
CreateTeam("team4", 3)
CreateTeam("team5", 4)
CreateTeam("team6", 5)
CreateTeam("team7", 6)
CreateTeam("team8", 7)

Meaning if you tried to add:

CreateTeam("team9", 8)

The game crashes.
:PB

When two teams have the same tag, then it may seem to be a new team, but it is actually an extension of the previous team with the same tag. So if team2 and team4 have the same tag, then team2 would get all of team4's messages and team2 and team4 could control each other's units. Also the game will crash anyway if you quit the mission regularly.

Re: Acidgun fire

Posted: Sun Mar 15, 2015 1:47 pm
by Petas
BobTheHunted wrote:
TommyCD1 wrote:
BobTheHunted wrote:There can only be 8 teams btw, A.I or not, for them to have proper colors and be hostile or do anything in general
Actually there are only 8 teams allowed because the game will crash otherwise.
Actually, that's not the case. I created a 9th team and added units on that team directly to the map, to test if I could potentially add enemy AI to the map by default. The units worked in the sense that they just stood there and did nothing, not attackable, no colors(they were magenta pink, I guess that is the default for missing colors) and they would only move If they were in the way of something. Didn't crash for me though, I guess I did something different? Doesn't really matter I guess, since it doesn't properly work anyway
Now I thought that I did something wrong in the studio.
And I wonder how or what I've done stupid ? idk