HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Copy/paste trigger does not copy variable values - why?

04-02-2005, 12:48 AM#1
mittu
Folks, I'm copying triggers from one map to another. They involve numerous global variables; many of which have initial values set in the Variables dialog, and not in the GUI code itself. Strings, in particular, are initialized in that way, as they are essentially constants - they don't change during the game. There are lots of variables involved.

When I paste the trigger into the new map, the variables are also copied over, but not their values! Sorry for shouting, but that is counterintuitive and, well, just nuts. I wrote the triggers and variables and values, but Blizzard seems to think I don't need or want the values.

To get around this rediculous and frustrating limitation, I tried a "back door" approach: using winmpq, I extracted the war3map.j source file, added the necessary code (from the original .j file), put the source file back, then opened the map in the World Editor again.

Unfortunately, not only are the changes not reflected in the GUI, but they are, for some inexplicable reason, *removed entirely* from the .j source file when I look at it again with winmpq. Brilliant.

The only option left to me is to manually re-insert their initial values.

In addition, custom script which references a global variable that is not also referenced in regular GUI code, will not cause the copy/paste facility to create that variable in the new map, it must be re-created manually. I can understand that kind of limitation, I suppose.

Has anyone out there any ideas on how to avoid the tedious work this entails? What was Blizzard thinking...

Many thanks in advance, Roy.
04-09-2005, 04:40 AM#2
Guest
Wait a tick I'm confused...

Your trying to copy over triggers and the preset values of the variables arn't being carried over? Are you exporting into a .wtg file and then importing to the new map? I know for a fact that carries over all variables and values, unless somethings seriously screwed up. I'm not really an expert, and you seem to know your way around better than me but for me exporting and then importing works.
04-10-2005, 04:48 PM#3
mittu
Quote:
Originally Posted by tzsjynx
Wait a tick I'm confused...

Your trying to copy over triggers and the preset values of the variables arn't being carried over? Are you exporting into a .wtg file and then importing to the new map? I know for a fact that carries over all variables and values, unless somethings seriously screwed up. I'm not really an expert, and you seem to know your way around better than me but for me exporting and then importing works.

Thanks for your reply!

Sorry, I should have been more clear. I didn't use the export/import mechanism as I assumed that it would copy *all* triggers and variables. I only wanted one category of triggers, the variables they referenced, and, of course, their initial values.

Now, I could have done the export/import, but then I would have to delete most triggers after the import, which would result in numerous obnoxious dialog boxes telling me about orphan triggers and asking me to verify deletion.

The copy/paste should work as I would expect. If my expectations are wrong, and copy/paste is *supposed* to work this way, then I'm profoundly dismayed. If not, then I can submit a bug to Blizzard.

Roy.