Jump to content

Franc160th

Community Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Franc160th's Achievements

Discens

Discens (2/14)

4

Reputation

  1. Well it's not hard, you just have to know a couple of things. Here's my topic where I asked the exact same thing https://wildfiregames.com/forum/index.php?/topic/24774-garrison-units-from-the-editor/&tab=comments#comment-361355 Basically you've to "invoke" a trigger script and let it do what you want; in this case I wanted to garrison people, so: 1- Trigger: Trigger.prototype.InitMyMap_GarrisonBuildings = function() 2- Who do I want to garrison? I want infantry units, he'll decide which ones; they have to be romans and be Elite: let romeInfantryUnits = TriggerHelper.GetTemplateNamesByClasses("CitizenSoldier+Infantry", "rome", undefined, "Elite", true); 3- Where and how many people do I want to garrison? I want the 20% of the maximum garrison number in everything that responds to the class of tower; they've to be Roman infantry units, belonging to player 1: TriggerHelper.SpawnAndGarrisonAtClasses(2, "Tower", romeInfantryUnits, 1); Before you do anything, though, you've to tell the game he's to look where the triggers are, in my case in "scripts/TriggerHelper.js", "skirmishes/Gauls_vs_Romans.js" The first one is the reference for triggers in the whole game, the second one is my personal script referred to that particular map
  2. Yeah, but it's actually very unconfortable ahah yep Btw still thank you so much, I did manage to garrison what I needed except for walls, but they're not a big problem
  3. Ok, done. Thank you so much for your support!! This is my final Gauls_vs_Romans.js: The only problem now is garrisoning units on the siege wall, but I'll try to solve this problem, which is less important than garrisoning in 80 tents and so many wall towers
  4. Oh yeah you're right. This one shall be good: Yess, it is. I succeded in garrisoning the tower. I now need to garrison tents..I'll let you know.
  5. In my .xml file I put this: I should add that line to "Gauls_vs_Romans.js"?
  6. Ok, I checked those lines in that site and solved about everything, I do not get the error messages and I get the warning I wantend (My first trigger script). There's one last thing: where shall I put this? Thanks for the tip, didn't know that
  7. Ok gonna check that out I use xed, I'm on linux. I'll download gedit just to see if the editor messes up with the code
  8. Ok, I took a look at that page and it was useful, thanks @elexis I added the above lines to my map.xml file, changing the "Gallic Fields (3).js" file with another one, where I added the following lines: I understood that had to define who "romeInfantryUnits" are and I tried to do so with this as you can see: But I still get these errors: I know that I may seem stupid, but I never used java or any other code and I actually don't know anything about it, sorry
  9. Ok, but let's assume that I need my kush soldiers of player 5 to get into the towers. Is it enough if I copy that script and paste it in the js console of the editor?
  10. Ouuh ok, understood, I'll try to make my way through these scripts By the way every kind of help is welcomed
  11. First of all thanks for your reply, what do you mean with "triggers"?
  12. Hi everyone, I'm playing a bit with the Atlas editor and I'm wondering how to garrison units from the editor itself, if possibile. Thank you in advance
×
×
  • Create New...