HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Getting around only using generated variables?

12-25-2002, 07:44 AM#1
Sytadel
Chances are there's some random editor or magical trigger technique I haven't heard of, but I'll take the risk of making a fool of myself and ask: How the hell do you get around generated variables?

What I mean is, like, for example, with the 'Unit - Unit Within Range' event, you have to select a unit that is on your map at the beggining of the game. You cannot use a Unit Variable that you create. Same thing goes for most unit events. Usually I end up having to do a Player-owned unit event, and then a unit comparison to account for this, and this ends up resulting in having one trigger per player.

I've always managed to get around this, but except for very recently where I wanted a passive ability that my Priest could never drop below 50 mana. The priest isn't on the map all the time, he's replaced, thrown into tanks, turned into a hell demon or whatever, so I can't simply use the Unit - Mana event. Instead I have to periodically store his mana as a real variable, and then use the Game - Value of real variable trigger.

So anyway... how do we work around this?
12-25-2002, 09:51 AM#2
SuperIKI
Quote:
Originally posted by Sytadel
Instead I have to periodically store his mana as a real variable, and then use the Game - Value of real variable trigger.

What's wrong with that method? It's a perfect workaround.
12-25-2002, 02:12 PM#3
Sytadel
It's near perfect. Obviously there's always issues with periodic never working exactly, just very close. Also this thread is speaking about the whole problem in general, that was just an example of mine and a work around.
12-25-2002, 06:16 PM#4
SuperIKI
Look at the triggers in custom text.
See the event register code?
Use these functions to register the mana event for all your hero forms. You can do this while the game runs.
I think GoldenUrg's trigger patch has it as a GUI trigger, but I don't have the trigger patch so I can't say exactly.