• 🏆 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!

[Solved] Copy / Paste Trigger from one map to another

Level 6
Joined
Jan 12, 2014
Messages
56
Hello

I'm trying to copy paste trigger from one map to another.
All of them are based on variables etc. NOTHING on the actual map. It's a kind of melee init but with my spells etc.

However, even if it works for the most part, some triggers are... broken... My dialog boxes are empty, no text, and some spells doesnt work either...
I copy pasted a file with everything in it. And i tried with both maps open in the editor to ctrl C / ctrl V.

Another thing : how can i copy paste the Game Constants too ?


Thanks !
 
Level 18
Joined
Mar 16, 2008
Messages
721
1) For the triggers just make sure all the variables and triggers are in the same category folder, also make sure Trigger Editor -> JASS Helper is enabled, then,
Right click in your folder (the one that contains the triggers), press copy and go to your other map and press paste. You also need to tick the option from File -> Preferences -> Automatically create variables when pasting unknown trigger data.
(How can I copy/paste triggers?)

2) I don't think there is an easy way to copy Gameplay Constants?

Let me know if that works.
 
Level 18
Joined
Mar 16, 2008
Messages
721
What do you mean "in the same category folder" ?
The variables must be "next to" the triggers which use it?
Everything is in the same folder. And i have sub-folders etc.
No that's not required to use the triggers. But it makes it easier to copy/paste from map file to map file. Because if you copy the triggers over before the variables are copied over. Then all the variables will be blank and you would need to set them up again.
 
Level 6
Joined
Jan 12, 2014
Messages
56
No that's not required to use the triggers. But it makes it easier to copy/paste from map file to map file. Because if you copy the triggers over before the variables are copied over. Then all the variables will be blank and you would need to set them up again.
Nono, everything is in ONE SINGLE folder. It's easier indeed.
But still doesnt work
And yeah the preference thing is checked, i alrdy read the thread you quote. Its strange

Look :

1689447548821.png


1689447535849.png

It makes no sense xD
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,546
Go through all of the variables and make sure that they have the correct variable type. It sounds like some are getting unset which is a bug. Then after fixing the variables, proceed to delete all of the triggers but keep the variables. Then save, return to your original map, and copy ONLY the triggers this time and then paste them into the new map. Hopefully this will avoid the variable breaking issue and preserve the triggers.
 
Level 6
Joined
Jan 12, 2014
Messages
56
Go through all of the variables and make sure that they have the correct variable type. It sounds like some are getting unset which is a bug. Then after fixing the variables, proceed to delete all of the triggers but keep the variables. Then save, return to your original map, and copy ONLY the triggers this time and then paste them into the new map. Hopefully this will avoid the variable breaking issue and preserve the triggers.
Okay i'll try to do it your way ! I keep you informed if it still bugs !

I have custom datas for units spells etc aswell as importes models/icon
In which order to you advice me to import it ?
1- models icons
2- custom data
3- variables & triggers
?
 
Level 18
Joined
Mar 16, 2008
Messages
721
Maybe it's something to do with the language loaded? I know sometimes Korean letters don't appear in game when I have the English set loaded. I know the French alphabet is the same so it's unlikely but maybe causing the text to not load?
 
Top