Jump to content


Photo

Help with Neutral units RotWK

neutral units attackable help rotwk

  • Please log in to reply
4 replies to this topic

#1 DrHouse93

DrHouse93
  • Members
  • 18 posts
  • Location:Rome
  • Projects:RotWK Maps (Both Edain and 2.02 versions)

Posted 07 February 2015 - 12:39 AM

Hi all^^
 

I'm working on a scripted version of Northern Ithilien, where if one player starts as Men close to the Forbidden Pool, and another in the north-eastern area as Mordor, the programmed scripts (which I called "Faramir Mechanics") start. In the map I'd like to make a special feature: at the beginning, the Mordor player only controls four Lumbermills at max level in the north-western area. Here there's also an Orc camp, which I set it belongs to PlyrOrcs (a Skirmish Player with SkirmishMordorAI). However, if the camp is attacked by the Rangers, it is transferred to the control of the Mordor player. Here stands my problem

 

I can't attack in any single way the PlyrOrcs units and buildings, even if I set, in the Player list, an hostile relation (I also made a script to make them enemies, but unsuccessfully). Furthermore, I also created another team, PlyrRangers (a Skirmish Player with SkirmishMenAI), which is enemy with PlyrOrcs and allied with the Gondor Player. At the beginning of the match, there should be a group of Orcs and Rangers (belonging to their respective teams) clashing each other without harming. The first player (Gondor/Mordor) to reach them gains the control of the respective units. But like I said, the units completely ignore my commands, they don't even consider themselves enemies. In addition, when I get close to the Rangers while playing as Gondor, they don't join my team, even if this is the command line (which works if they're owned by PlyrCivilian):

 

IF

One unit from "teamPlayer_3" enters area "OutpostArea" (surfaces allowed: GROUND)

THEN

Team "PlyrRangers/TeamPlyrRangers" merges onto "teamPlayer_3"

 

So my question is: how can I make neutral units allies/enemies? How they can be attacked, but also attack?

 

I hope you can help me, since the relation commands don't seem to work, and I don't know what else to do


Edited by DrHouse93, 07 February 2015 - 12:41 AM.


#2 Fudge

Fudge

    title available

  • Project Team
  • 531 posts
  • Location:Devon, England
  • Projects:Luckily AotR Mapping

Posted 07 February 2015 - 08:57 AM

SkirmishAI overrides all scripts, in order for your scripts to function you'd have to remove the skirmish AI and skirmish players. You could disable skirmish AI with a group of scripts I constructed when making my skirmish co-op maps, however it would also stop your AI players building units etc and you'd have to script those features yourself.



#3 DrHouse93

DrHouse93
  • Members
  • 18 posts
  • Location:Rome
  • Projects:RotWK Maps (Both Edain and 2.02 versions)

Posted 07 February 2015 - 10:30 AM

Well, I created two players, NOT computer-controlled, with the same features (Rangers and Orcs etc), but that still didn't work. I really don't know what I'm getting wrong


Edited by DrHouse93, 07 February 2015 - 10:31 AM.


#4 Fudge

Fudge

    title available

  • Project Team
  • 531 posts
  • Location:Devon, England
  • Projects:Luckily AotR Mapping

Posted 08 February 2015 - 01:57 PM

This is going to be quite difficult to diagnose without seeing the map so if you could PM a copy that'd be very useful. However if you can't I need some more information to be clarified:

1) Did you use the feature 'Add Skirmish Players' at any point?
2) Is the map set up like a skirmish map - starting positions, Base_Flags, player_x_inherit teams etc.?
3) Is this a singleplayer map?
4) Is this for BFME I or BFME II/ROTWK

Here are some very general tips:

1) Don't use 'merge team' scripts - use 'transfer control of team X to player X' scripts located in 'team--other' under 'allegiance'
2) Have a look at other people's singleplayer maps and how they're set up - or if this is a multiplayer scripted map have a look at my co-op maps.
3) Try importing this script and editing it to incorporate all of your players - Attached File  Disable AI.zip   579bytes   112 downloads
4) Then add the following to the bottom of the paragraph about your map in the mapcache document - of course edit it to your requirements

Spoiler


I don't know wther this will help you or confuse you, but I'm willing to do this for you if you send me the map.

Good luck.



#5 DrHouse93

DrHouse93
  • Members
  • 18 posts
  • Location:Rome
  • Projects:RotWK Maps (Both Edain and 2.02 versions)

Posted 08 February 2015 - 08:36 PM

Ok, I solved the problem^^
This is what I did:

 

- I created two different teams for PlyrCivilian (NeutralRangers and NeutralOrcs) and I set their relationships to Enemy

- I set the relationships of Player_3 (the Rangers controlled by human player) towards NeutralRangers to Friend, and towards NeutralOrcs to Enemy (and vice versa)

- I set the relantioships of Player_1 (the Mordor player in the north-east spot) towards NeutralOrcs to Enemy, and towards NeutralRangers to Friend (and vice versa)

- I replaced any Merge Team interaction with "Transfer control..." as you suggested

 

That worked^^
So thank you very much for your help. I'll release the map as soon as I finish some other features (e.g. an host from Harad^^)

 

Anyway, I wished to ask: if I set from the beginning that NeutralRangers/Orcs consider Enemy each other player aside from Player_1 and Player_3, what happens if external allies of those players come close to NeutralRangers/Orcs? Will they be attacked as well?


Edited by DrHouse93, 08 February 2015 - 08:37 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users