Map editor "Game Mode" question

Modding, patches, etc., for anyone who speaks neither Polish nor Czech.
Post Reply
User avatar
Kaplan
Soldier level 0
Soldier level 0
Posts: 9
Joined: Mon Feb 24, 2014 6:05 pm

Map editor "Game Mode" question

Post by Kaplan »

Hi everyone !

I'm pretty new here, but i'm in love with OW since the beginning. I've finished campaigns again and again and discover, later, mods (arabs :arhello: ) and the Map Editor ! I don't script, i don't know anything about this and I only use the editor in one way ...

I don't know if it's the correct place to talk about my issue :?

I'll try to explain ...

So, I used the mad editor (and XichtEd too) to play alone, not for share my creations. I created bases, characters and create stories (i've a great imagination). Once all in place, I played my scenario with the "Game Mode" in the Map Editor. In Map Preferences, I change the "Player's side" to "all sides" and put the fog of war "All visible".

By this way, I could select and play all units, build and attacks with all "players", leave "Game Mode" to create others units, return to "Game Mode" ... But now, and idk since how many times, when i controlling all sides and i put people in a building, i can't make them leave the building (and don't have the characters health bar at the top of building). I can click on soldier "portrait" and and make them leave individually but not so cool :amcry:

I have spend a lot of times enjoying creating my own stories ... and if someone have an idea, i'll be so grateful :amlol:

Thank u for reading, and hope u will understand me :wink: I'm french :mrgreen:
User avatar
Szymiew
Soldier level 7
Soldier level 7
Poland
Posts: 713
Joined: Thu Aug 16, 2012 11:11 am
Location: Królestwo Polskie
Contact:

Re: Mad editor "Game Mod"

Post by Szymiew »

Hmm, since you play in Editor's Game Mode, can't you just go back to the editor, delete the problematic building and recreate it, along with the soldiers inside?

I'm afraid you've been using the Editor not in a way it was meant to be used ;) So bugs are to be expected.
I did some modding years ago and more experienced modders were always telling me not to use Editor's Game Mode at all, but test my maps in the actual game.

Cheers
https://www.youtube.com/kvantovy --- mój kanał youtube.
https://www.facebook.com/Kvantovy --- strona u cukierberga.
Image
User avatar
Kaplan
Soldier level 0
Soldier level 0
Posts: 9
Joined: Mon Feb 24, 2014 6:05 pm

Re: Map editor "Game Mode" question

Post by Kaplan »

Yep, i know it's not the way it was meant to be used, but just asking it someone had an idea on what happen.

Thank you for your answer !
User avatar
Gravitr
Throwback Developer
Czech Republic
Posts: 238
Joined: Fri Jul 27, 2012 12:00 pm
Location: CZ Prague
Contact:

Re: Map editor "Game Mode" question

Post by Gravitr »

As Szymiew mentioned above, some things doesn't likely work in Game mode. I don't think there is a way to fix that, but you can use some SAIL code to do a "smaller workaround". Not working on 100%, but better something than nothing I think.

So, in your map, go to SAIL > Open SAIL editor, then File > New module > OK, paste code below, and click File > Save module/all.
Spoiler:

Code: Select all

every 0$1 do
begin
  UnitSelect;
  enable;
end;

on ActiveUnitChanged(b) do
  UnitSelect;

var b, un, list;
function UnitSelect;      
begin
  b = [];
  un = [];
  list = FilterAllUnits([[f_type, unit_building], [f_occupied]]);

  for b in list do
  begin
    if IsSelected(b) then
    begin
      for un in UnitsInside(b) do
        if IsSelected(un) then
          exit;

      SelectUnits(UnitsInside(b));
    end;
  end;
end;
Notes:
- if selected building and previous selected building isn't same, it will work without a delay
- else units in building will be selected in less than 1 second
Last edited by Gravitr on Wed Mar 22, 2017 5:57 pm, edited 1 time in total.
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
User avatar
Kaplan
Soldier level 0
Soldier level 0
Posts: 9
Joined: Mon Feb 24, 2014 6:05 pm

Re: Map editor "Game Mode" question

Post by Kaplan »

It was working before, without any code or bug. I could select every occupied building of any side and make them empty, as in normal/multiplayer mission.

Gravitr, i've tried your code, but not working :/

Thanks anyway
User avatar
Gravitr
Throwback Developer
Czech Republic
Posts: 238
Joined: Fri Jul 27, 2012 12:00 pm
Location: CZ Prague
Contact:

Re: Map editor "Game Mode" question

Post by Gravitr »

It's working on my computer. Are you sure the code is running? Try map reset, then Open SAIL editor, Compile tab and select Run. You'll be switched into gamemode automatically.
[MOD] Arabian History - 9 missions
Show post with download

[MOD] Vsevolod Mission - 4 pro missions
Show post with download

[MP-MOD] Throwback - over 35 new missions
Official site (+download)
User avatar
Kaplan
Soldier level 0
Soldier level 0
Posts: 9
Joined: Mon Feb 24, 2014 6:05 pm

Re: Map editor "Game Mode" question

Post by Kaplan »

Oups, code wasn't running ... :lol:

As i said, I don't know anything about SAIL.

Thanks a lot, i will try this !
User avatar
Serpent
Soldier level 10
Soldier level 10
Estonia
Posts: 4175
Joined: Tue Jul 07, 2009 9:13 pm
Location: Polska - EuroStan ZSRE
Contact:

Re: Map editor "Game Mode" question

Post by Serpent »

Just change player side from all sides to current side.
Epickie teksty:
Marek1906: jak zrobic aby sail był zielony?
Kvantovy: Wszystko normalne, wszystko w koło było dziwne
Kvantovy:: To jest fajne, że to nie jest takie głupie
Kvantovy:: remove sos from kanapeczka
Kvantovy:: zdarzają się rzezy które sie filozofom nie śniły
Cenwen: problemem jest gejostwo
"Taki z niego fizyk jak ze mnie baletnica" - Profesor Scholtze o Kvantovym.
JAKBYŁ BYM CZECHEM TO BYM ROZŁOŻYŁ NAMIOT ~Kvanciak
User avatar
Szymiew
Soldier level 7
Soldier level 7
Poland
Posts: 713
Joined: Thu Aug 16, 2012 11:11 am
Location: Królestwo Polskie
Contact:

Re: Map editor "Game Mode" question

Post by Szymiew »

You may want to consider reading McBenn's Comprehensive Tutorial for both Editor and SAIL.
Link: http://forum.stucuk.net/viewtopic.php?t=1650
I haven't read it from cover to cover*, but I think it contains everything you need to know to make your own scripted missions, objectives, campaigns etc. It's in English.

I learned mostly from ZoNe's SAIL Function list and SAIL Reference, but I don't know if they are available in other languages than Polish.
https://www.youtube.com/kvantovy --- mój kanał youtube.
https://www.facebook.com/Kvantovy --- strona u cukierberga.
Image
Post Reply