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?
 
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.....
 
Thanks again Darg. I though using [player owned unit event] would unnecessarily complicate things. I'll go back and do it that way.
 
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.
 
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: 372
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: 356
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!
 
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.
 
Yep it's fine if you leave it up.

Good luck with going through those tutorials.
 
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?
 
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.
 
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.
 
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?
 
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::
 
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.
 
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.
 
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.
 
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.
  • Varine Varine:
    Mayo also has vinegar. Vinegar is a very important part of it, it's effectively a delivery method FOR vinegar but hidden
    +1
  • Varine Varine:
    It's a neat ingredient. But yeah it's eggs. But a LOT of people think eggs count as dairy because of the fucking food pyramid the US keeps trying to make a thing
  • Varine Varine:
    I think on the new one they did change it, but idk. I don't really care whatever the government is doing right now because it's consistently absurd. Like what is RFK doing in charge of health anything? I love the bear story because WTF was that, but also, pretty much every time he talks it's WTF. Like even his voice sounds microwaved
    +1
  • Varine Varine:
    The pyramid is fucking dumb as shit, no matter how you arrange it.
  • Varine Varine:
    It's actually remarkably easy to make mayonnaise though. Fun fact, it USED to kind of be a French mother sauce. I believe that Careme considered it one, it may have been aioli but that has also built a different meaning than it used to. An aioli is just mayonnaise I mixed with other shit typically, I didn't start it don't come at me
  • Varine Varine:
    It's very hard to do it on a large scale though
  • Varine Varine:
    Depending on how you pour the oil the consistency can vary wildly, but that's true for most emulsions. I can only make about two quarts at a time with my robo coup, and if I have to make several in series because I forgot to order it becomes really obvious even when I do it. We have to wait and mix them all together to make sure we have the same thing.
  • Varine Varine:
    Hollandaise is also kind of like that, emulsions require a very steady hand to do exactly the same every time.
  • Varine Varine:
    Luckily I live in an age with electricity so it's way fucking faster, but when I was just a boy trying to find my place I had some hardcore chefs that made use do things like that by hand. It is WAY easier to get right by hand because you control it and can feel it, but it takes soooooo much longer. And on the scale a modern kitchen requires... I serve 400-500 guests on average per day right now, if I had 100 then we could do things way better
  • Varine Varine:
    But we can't do that. In the winter yeah, but I HAVE to get people through here right now so I can afford the staff that we CAN do that. We have about 100 days of summer, and if that summer doesn't make us what it will, then I can't operate the other most of the year with my staff. The owner is talking about closing two days a week to cut down on labor, I told him he should cut down on vacations and it did not go great. I do think I won though, I have to keep my fucking core staff and they have to be gainfully employed
  • Varine Varine:
    Sure some of them might take a second job, but I can't just cut my entire staff to unlivable hours, nor can I can cut them off all winter if I want them to come back.
  • Varine Varine:
    And also, there is no fucking way I'm pulling these hours come september. I only do this right now because I have to, the second I don't have to be the one doing it I won't be
  • Varine Varine:
    I have a 5 person core staff in the kitchen, not including me or Chef Ben
  • Varine Varine:
    Though two of those people are likely not making it this year. One of them has been replaced, the other I am kind of trying to. He's being a giant bitch, today I had to get onto him because in the three hours before I left he had taken like thirty minutes for cigarette breaks
  • Varine Varine:
    And he was also complaining to me the other day that he was out of weed so couldn't smoke any before work that day, and was confused about why I was annoyed he was telling me, his boss, that he is smoking weed everyday before work.
    +1
  • Varine Varine:
    Like yeah I can tell. I don't need to fucking know.
  • Varine Varine:
    So now he's getting scrutinized and will not be top of the list. I know I don't have the smartest people but I do expect them to have some common fucking sense
  • Varine Varine:
    I did do a rare thing for me and hire a girl last month without warning. Everyone was made at me because I started her at like 21, but she worked with me before and I was like don't care. She made 19 at her old job and I wanted her to come work with me, she is the best
    +1
  • Varine Varine:
    I'm going to get her a raise at the end of the summer. She wants to go to school again, but I want her to still work with me so.... she kind of can just tell me what the price is. I can go to 25 if she keeps up. I need to get her onto line more, that's what she wants, but I need her where she is and it's not fair that she doesn't get the little bit of raise that comes with it. She can do it no problem, I've worked with her there.
  • Varine Varine:
    It's just hard to move and train people unnecessarily right now. And also the line fucking sucks, it's not any more fun. This is turn and burn so I have the bankroll, and everyone suffers for it
  • Varine Varine:
    Eventually we'll get it balanced, we'
  • Varine Varine:
    we're starting online orders and stuff, but I also turn that off all the time because I barely keep up trying to be the best at Sysco shit
  • Varine Varine:
    I think it's gonna be a good fall and winter though. We're going to have a good staff, they will get along, they will be able to manage the workload and the complications, they know how to really cook this year, like every person on line knows their steak temps. Some of them use thermometers a lot and they don't always use them right, but they do know how to do it. Failure, especially in this field, is the only way to get better. They'll get it
  • Varine Varine:
    They won't get feel down while they do the thermometer, but we didn't have an instant read probe when I was learning. Like they did but god knows how off it is, you HAD to do it by feel. Even if the chef was fine with me bringing my own, it takes too long. Poke and know
  • The Helper The Helper:
    420 threads in the Artificial Intelligence forum :)

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top