big frustration: variable won't show up

M

MrJoeS

Guest
Current goal: to write triggers that allow a hero to become a different hero by picking up an item.

I expected to write the trigger like this:

At map initialization, a unit varible called hero1 would be set equal to the hero that was placed for player one.

To accomplish the morph from one hero into another triggered by hero1 picking up an item, I used this event:

Event:

[hero1] [acquires an item]

I couldn't get past there, because WE would not let me choose hero1 for the event. It would allow me to choose one of the units on the map (in this case a Mountain King) but it would not even let me choose "any unit." If "any unit" were there, I'd choose that and include a condition [trig. unit] equal to [hero1].

What am I doing wrong?
 

Darg

Administrator
Reaction score
49
You're looking at the wrong event - you're currently looking at the 'specific unit event', when you should really be looking at the 'player-owned unit event'.

So:

event:
[player-owned unit event]
a unit owned by <player x> acquires an item

condition:
[unit comparison]
<hero manipulating item> equal to [hero1]

action:

do blah.....
 
U

Unregistered

Guest
Thanks again Darg. I though using [player owned unit event] would unnecessarily complicate things. I'll go back and do it that way.
 

Darg

Administrator
Reaction score
49
The reason why you can't define variables in the event itself is because the events are all created when the map is loading up, and variables dont have any value at all during this time, meaning that using them in events is illogical.

You can create new triggers with new events in the game itself, but only through custom text. These events I believe can use variables, BUT it will only use the value of those variables at the time you create the trigger.

The bottom line is that events do not possess any dynamic behaviour, due the fundamental nature of what an event is.


edit: i had blabbed on a bit more than this, but decided it wasn't worth keeping so i deleted it.
 
M

MrJoeS

Guest
With the help you gave me on that trigger, I was able to write one that I though would allow one hero to change to another by picking up the appropriate item.

I wrote the trigger, and tested the map and BOOM!

War3 crashes every time the trigger activates. I tired a couple of things I thought might be causeing it but no luck yet. I even added some test strings to see how far through the execution of the actions it got. None of them came up. The crash is a very merciful one: sudden but painless. War3 closes and everything else is unaffected.

I don't want to try to write out the whole trigger. It's too long. Instead I attached the map.
 

Attachments

  • heromorph map.w3m
    115.3 KB · Views: 277

Darg

Administrator
Reaction score
49
lol, even though it took me only about 20 mins. to solve this one, I can tell you that the problem had me really stumped for a while! :)

So here is what you were doing wrong:

- the trigger fired whenever <hero1> acquired a <cloak of the hunter>

- problem is, in your last line, you create a <cloak of the hunter> and give it to <hero1>!

- so guess what happens! the trigger fires again! and it keeps on firing again and again until the whole game comes crashing down!

- the fix? i stuck a 'turn off this trigger' before the last line, to make sure the trigger did not fire again, and then i turned the trigger on again straight afterwards.

Anyway, I've attached the map, you'll see what I did.

p.s. i renamed it 'hero morph map' to avoid confusion - you had kept the name 'plunder isle' in the map description (scenario -> map description)
 

Attachments

  • heromorph map.w3m
    115.4 KB · Views: 267
M

MrJoeS

Guest
Thanks for finding that bug. My first, biggest, map-making mistake was writing a trigger whose event was periodic, every 0.00 seconds. When I tested that file, my computer got very cross with me. Frame rate went down to about one every 15 seeconds. I felt awfully silly.

Well thanks for your fix! Also, I'll be sure to change the map description in future files. This isn't the final map or anything, but working on a blank field of dirt like the one that always comes up when you load WE is no fun. I load Lost Temple or Plunder Isle and work on those.

My final map idea will require this ability, but there is much more to it that I'll need to learn. Now that I have UMSWE 3.6 I'll get back to those tutorials on special abilities!
 
M

MrJoeS

Guest
Oh, and should I edit out the attachment that I used to give you the map, Darg? I don't know if it's important to save space on the website here. There's nothing sensitive about the file, so it's fine if we leave it up as an educational tool.
 

Darg

Administrator
Reaction score
49
Yep it's fine if you leave it up.

Good luck with going through those tutorials.
 
M

MrJoeS

Guest
one hitch

I hit the tutorials today, and after downloading the requisite utilities, I extracted the important .slk and .txt files to a special folder. I got all the Func and Strings files from war3.mpq, but when I tried to get the ones from war3patch.mpq, some of them caused techmpq to crash.

I am using techmpq and not winmpq because the copy of winmpq I dled would not run. Oh well but other than this techmpq did fine.

I am starting to see that what I have in mind for a map WILL be possible, and it's very encouraging. How do I extract those files that are crashing techmpq though?
 

Darg

Administrator
Reaction score
49
Hmm, I'm sorry i have never used TechMPQ. I don't understand why WinMPQ would crash either. Did you get it from the link I pasted in the FAQ?

I will download TechMPQ myself and have a look at it. But if you could try getting WinMPQ from the FAQ link (if you haven't already), that program is really nice to use.
 
M

MrJoeS

Guest
I never tried the download on the FAQ thread. I got WinMPQ from a link at the site where I read my tutorial.

I'll go get the one you linked to.
 
M

MrJoeS

Guest
I downloaded from the site you linked to, and I got the same error message as before:

--
winMPQ.exe - Unable to Locate Component

This application has failed to start because VB40032.DLL was not found. Re-installing the application may fix this problem.
--

I just unzipped the download into a folder and ran the .exe. Did I do something wrong?
 
M

MrJoeS

Guest
winMPQ is nice!

I'm surprised by how user-friendly a free utility like that is.

Anyway, in browsing War3.mpq, I noticed some .wav files for unit voices. Could I import unit voices into my map buy embedding my own waves with the filenames of the voice of a unit that is not used in my map? (Like "Ice Troll")

I guess my first instinct is to go get the marine voices from StarCraft. Are they in an MPQ that's this easy to play with? Also, it would probably make the file size pretty big. Even embedded, waves are huge.

So I've gotten used to winMPQ and I understand how all this mpq business works. ::pats self on back::
 

Darg

Administrator
Reaction score
49
Anyway, in browsing War3.mpq, I noticed some .wav files for unit voices. Could I import unit voices into my map buy embedding my own waves with the filenames of the voice of a unit that is not used in my map? (Like "Ice Troll")

holy cow, you are one smart thinker! 9 out of 10 ppl who claim to not know too much about the editor would not have thought of doing that. It indicates that you are putting some serious thinking time into figuring things out. Well done!

As far as I'm aware, only wav files can be embedded, although war3 does accept mp3 files in the sound editor. You could try importing with the same file name but use an mp3 file instead and see what happens (I've never done it).

The marine voices can be found in the starcraft mpq file, I'm not 100% sure what the name is, star.mpq or something like that. You should be able to open it up with winMPQ anyway.
 
M

MrJoeS

Guest
I opened up Stardat.mpq in my Starcraft directory, but I was disappointed to find that the embedded names are not so user friendly as the ones in War3.mpq.

Example: ~unknowns\unknown_00000010

I'll goof around and try to find the voice .wav files, but a filter for *.wav didn't turn anything up. In any case, this would probably make a map inordinately big unless I could embed them as .mp3 files. Maybe for one unit, but it would be like 200 k at least.
 

Darg

Administrator
Reaction score
49
Hmm, perhaps MPQView may allow you to see inside stardat.mpq. If you can't find this prog on the web, then give me your email via a PM and I will email it to you.

Just remember that w3m maps heavily compress any files you import into them. If you stick a wav file in there, it should shrink its filesize quite considerably.
 
M

MrJoeS

Guest
The broodwar mpq, broodat.mpq, is very accessable. The medic, valkyrie, lurker and such have their wav files explicitly deliniated. I'm still experimenting with the stardat.mpq.

If I wanted to use Duran's voice, I'd have no problem.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top