• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Map Switch

Status
Not open for further replies.
Level 5
Joined
Apr 21, 2006
Messages
82
Well i have a problem here in my campaign i would like to test the maps but if i export them ofc i lose some important stuff like Game Constant values.

When i try to open the campaign in Custom Campaign and press the Chapter 0 (first map) it just goes black and returns back like nothing happened.

I have setup in the campaign 2 maps so far (Chapter 0 and Chapter 1) and i have put Loading screen buttons for both of them

and also i dunno what path should i put into the Game - Set Next Level.

The maps are in path: Maps\Campaign\Chapter0.w3x
I tried the Chapter0 map from Custom Game (that map i did without campaign editor so it is the same as in campaign editor's one), but i couldnt get into the next level at all. I remember from some years ago it worked without campaign editor the Next Level thingie, well not sure does it anymore

EDIT: Picture Removed
The stuff was correctly in the campaign

i've tried in the Next Level to put only the map name and also the path to the map (Maps\Campaign\bla bla.w3x)
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
You probably need to use "Chapter0.w3v", since you don't need to use paths if you put the maps in a campaign (you will only need the path if you want to connect 2 seperate maps).

Here's a stupid test campaign I've made for it.
Note that I didn't bother to create a working game cache after you've reached the hidden level (I was getting bored), but the map-switch works.
 

Attachments

  • Test Campaign.w3n
    41.2 KB · Views: 94
Level 5
Joined
Apr 21, 2006
Messages
82
well i gotta take a look at it later since i think u used WEU or how u say it.
I only use normal World Editor and i get errors while trying to open it :p thx for help thou, but i got now bunch of more problems: all my sound files on the Chapter 1 are somehow invalid... it shows their length as 00:00:00 and when i try to play "This Sound does not appear to be valid file." w/e.

they were normal .mp3, i just recorder my own voice, was going to use them in Unit Transmission.
And no probs with game cache only thing is that the campaign is not working at all. Can't even start the first map... >_>
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
well i gotta take a look at it later since i think u used WEU or how u say it.
I only use normal World Editor and i get errors while trying to open it :p thx for help thou, but i got now bunch of more problems: all my sound files on the Chapter 1 are somehow invalid... it shows their length as 00:00:00 and when i try to play "This Sound does not appear to be valid file." w/e.

they were normal .mp3, i just recorder my own voice, was going to use them in Unit Transmission.
And no probs with game cache only thing is that the campaign is not working at all. Can't even start the first map... >_>

Argh, right... I normally don't use any WEU functions, since it sucks, but it became a habbit of opening WEU (it's the standard program for maps now, but I really need to change it).

"can't even start the first map"? :eek:
aye, weird... I've tested it and it works for me :s
did you put it in the correct folder? :p (warcraft III/Campaigns)
 
Level 5
Joined
Apr 21, 2006
Messages
82
just came back home;
your campaign worked well and thats how i want mine to work as well (on the 1st chapter you choose light/dark and if u are light u start doing light campaign and if u are dark u do dark campaign) so on

but with that i meant my own campaign; it doesnt start even the 1st map with the button. And if i use the "Test Map" from WE it starts the map with it's own setups (without the campaign data in other words: some abilities are different, game constants, interface changes and stuff w/e) so i can't test the map that way

PS: I never used WEU =P so i would need a small help how to look out your map and compare it with mine xd
EDIT: I added the campaign to attachment if you wanna take a look of it. Im pretty much out of ideas >.<
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
Here are the important triggers of the maps I've used:

(Some triggers are pretty long, but that's because of the quests which needed to set up/finish).


Triggers first map


  • Init
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Game Cache - Create a game cache from Test.w3v
      • Set GameCache = (Last created game cache)
      • Game Cache - Reload all game cache data from disk
      • Quest - Display to (All players) the Quest Discovered message: |c00ffcc00Quest Dis...
      • Quest - Create a Required quest titled The Mountain King with the description The mountain king, ..., using icon path ReplaceableTextures\CommandButtons\BTNHeroMountainKing.blp
      • Set Quest[1] = (Last created quest)
      • Quest - Create a quest requirement for Quest[1] with the description Kill the Mountain K...
      • Set QuestReq[1] = (Last created quest requirement)
      • Wait 2.00 seconds
      • Quest - Display to (All players) the Quest Discovered message: |c00ffcc00Quest Dis...
      • Quest - Create a Optional quest titled Opposing Forces with the description The mountain king, ..., using icon path ReplaceableTextures\CommandButtons\BTNFootman.blp
      • Set Quest[2] = (Last created quest)
      • Quest - Create a quest requirement for Quest[2] with the description Kill all opposing f...
      • Set QuestReq[2] = (Last created quest requirement)
      • Wait 2.00 seconds
      • Quest - Display to (All players) the Quest Discovered message: |c00ffcc00Quest Dis...
      • Quest - Create a Optional quest titled Hidden Path with the description There is an ancient..., using icon path ReplaceableTextures\CommandButtons\BTNDemonGate.blp
      • Set Quest[3] = (Last created quest)
      • Quest - Create a quest requirement for Quest[3] with the description Find the hidden pat...
      • Set QuestReq[3] = (Last created quest requirement)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • QuestCompleted[(Integer A)] Equal to True
            • Then - Actions
              • Quest - Mark Quest[(Integer A)] as Completed
              • Quest - Mark QuestReq[(Integer A)] as Completed
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Integer A) Equal to 1
                • Then - Actions
                  • Unit - Remove Mountain King 0004 <gen> from the game
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Integer A) Equal to 2
                • Then - Actions
                  • Set UnitGroup = (Units of type Footman)
                  • Unit Group - Pick every unit in UnitGroup and do (Unit - Remove (Picked unit) from the game)
                  • Custom script: call DestroyGroup(udg_UnitGroup)
                • Else - Actions
            • Else - Actions
Right, this was a little test to be honest, I don't use game cache a lot :p
The first 3 actions are to set up the game cache, I named it "Test.w3v", since the name doesn't really matter, as long as you can remember it.

Then it just sets up the quests, so skip those things

The loop checks if the quests were finished or not (when switching maps, I have saved it as a boolean, so I can keep record of it).


  • Hidden Path
    • Events
      • Unit - A unit enters Hidden Path <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Quest - Display to (All players) the Quest Completed message: |c00ffcc00Quest Com...
      • Quest - Mark Quest[3] as Completed
      • Quest - Mark QuestReq[3] as Completed
      • Set QuestCompleted[3] = True
      • Game Cache - Store Paladin 0000 <gen> as Hero of Hero in GameCache
      • For each (Integer A) from 1 to 3, do (Actions)
    • Loop - Actions
      • Game Cache - Store QuestCompleted[(Integer A)] as (QC + (String((Integer A)))) of Quest in GameCache
      • Game Cache - Save GameCache
      • Wait 1.00 seconds
      • Game - End game, load the map Hidden Level.w3x and Skip scores
Now, this stores the game cache, as you can see.
First I have stored the hero with an easy to remember name (label "hero", category "hero").
Then I have stored the booleans with a little loop, which is easier than copying the action multiple times.

After that, I have saved the game cache and loaded the next level (I didn't use any path for the next level, since it is in a campaign).

Important Note:
Reloading the hero doesn't work on this map, because I did not load the hero, at that point I was getting bored.
If you want me to add the actions for it, I will though.
Triggers second map

This is a little bit easier, since it doesn't have any quests...


  • Init
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Game Cache - Create a game cache from Test.w3v
      • Set GameCache = (Last created game cache)
      • Set TempLoc[1] = (Player 1 (Red) start location)
      • Game Cache - Restore Hero of Hero from GameCache for Player 1 (Red) at TempLoc[1] facing 0.00
      • Game Cache - Reload all game cache data from disk
      • Set Hero = (Last created unit)
      • Custom script: call RemoveLocation(udg_TempLoc[1])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Enter Equal to True
        • Then - Actions
          • Item - Remove Apocalyptic Tome 0002 <gen>
        • Else - Actions
          • Set Enter = True
I have used the exact same name for the game cache here, otherwise it won't work! ("Test.w3v").
If the hero has already entered once before, the tome will be gone (otherwise it would be a little bit overpowered).

Use "Reload all data" to load booleans/integers/reals/... that have been stored.


  • Return
    • Events
      • Unit - A unit enters Return <gen>
    • Conditions
    • Actions
      • Game Cache - Store Hero as Hero of Hero in GameCache
      • Game Cache - Store Enter as Enter of Enter in GameCache
      • Game Cache - Save GameCache
      • Wait 1.00 seconds
      • Game - End game, load the map Level 1.w3x and Skip scores
This is an easy trigger... it's the same as the other trigger in the first map, but I only need to store 1 boolean here.

Your Problem:


First I wanted to say "your campaign is just screwed".
But I won't...

Allright, I've checked what could be the problem and found out that:
  • In the "Game Init" trigger, the "Choose Sides"-unit that needs to be picked, doesn't exist
  • In the "Melee Init" trigger, the point referring to "Set Startpoint = " doesn't exist.
  • In the "Chosen One" trigger (category "Side and Hero"), the unit that needs to be replaced doesn't exist ("unit - Replace unit with ...")
  • In tutorial 2, the units of which the animation speed changes doesn't exist
  • In tutorial 8, he unit that is ordered to attack doesn't exist

How to solve it?

Simple: push "Save map as" and save it somewhere in the "maps"-folder, then it will normally give a few errors.
Because of those errors, the map can't run.

Edit:
Looking at this huge post, I realise I really do too much -.-
 
Level 5
Joined
Apr 21, 2006
Messages
82
Oh mate that was too much
and if u didnt read or i didnt tell it i know how the Game Cache works that not the problem, only problem that i had was the campaign thingie...

okay i see now what did you mean... i gotta wonder why it does this kind of stuff >_<

i always do the map well and then something like this happens and most stuff is screwed; i remember i did one stupid map and then some storm came and shut my comp while i was saving the map >.< --> Corrupted Data great!

I gotta thank you a lot i MIGHT be so bored to fix these and maybe continue without campaign editor until they are good to go or go play Gran Turismo 4 xd

That indeed must have taken time to write such a reply xd

PS: it's NP even if u say it's screwed; i dont care if im called a n3wb or the things sux ass on them, i know i have a lot to learn still =P
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
Lols :p

yeah, I got it too once (not because of a storm, but because of a little, annoying, angry brother who turned off the pc -.-).

Campaigns are hard to create alone (for me at least), because it gets boring very quickly...
I'm more a kind of guy that creates triggers, special effects and stuff, not actual maps... that takes too long.

Though I've uploaded only 2 maps, I've created 138 maps (I keep them all in the same folder, so I just pressed right-click to see how many maps were in that folder :p).
That means about 120 of them aren't finished and the quality of the rest is too low to upload -.-

I'm talking off-topic, so I'd better shut up now :/
 
Status
Not open for further replies.
Top