Staredit Network

Staredit Network -> UMS Assistance -> Lord Of The Rings Triggers
Report, edit, etc...Posted by Felagund on 2004-05-25 at 15:39:28
Yes, I know I've gloated over the little LotR thing, but now I feel stupid as I cannot figure out how to create a few sets of triggers to save my life.

There are two options in the game:
1. Battles Version (re-enacts War of the Ring battles)
2. No Battles Version

There are also 2 spawn triggers:

Cond: Spawn Switch Cleared
Action: Countdown Timer 180 seconds
-Wait 119975 milliseconds
-Set Spawn Switch
-Preserve Trigger

Cond: Spawn Switch Set
Action: Add 1,000 minerals for All Players
-Wait 25 milliseconds
-Clear Spawn Switch
-Preserve Trigger

This is where the trouble begins...

The Battle Trigger system has three locations:

One for the chooser spawn, one for the choosing no battles, and one for choosing battles.

Cond: Player 1 has 1 Chooser (civilian)
-Switch choose battles set (this is set immediately in game)
Action: Move all Choosers for player 1 to chooser spawn

Then it goes on in case player 1 is not present in the game

Cond: switch choose battles set (sorry, this shift key is stickey so i won't capitalize anymore, because it is hurting my pinky)
-player 1 has 0 choosers
-player 2 has 1 chooser
action: move all choosers for player 2 to chooser spawn

it goes on up for player 5, which includes all of the 'good' nations

cond: current player brings 1 chooser to choose battles
action: set battles
-move all choosers to main chooser spawn (another menu)

cond: current player brings 1 chooser to choose no battles
action: move all choosers to main chooser spawn

Actually, everything is perky up to here, but then things go down the crap-hole...

cond: battle trigger set
action: display: let the war begin!
-wait 20,000 milliseconds (or whatever it is)
-display: october 25, 3018 "Council of elrond"
-wait 80,000 milliseconds
-display: march 2, 3019 "first battle of the fords of isen"
-set switch first fords of isen

... and it goes on to encompass the entire war of the ring, but it messes up in the first couple of actions, if i can fix that stuff, i'm sure everything will work!

Okay, here is the problem. i feel incredibly stupid to ask... but, the first trigger take precedence over the second. thus the spawn triggers run out before the 'second battle' in the war of the ring takes place. if it's the other way around, the spawn triggers will take like an hour to run through! i've seen this problem before, but instead of messing around for hours on end (like i've done far too many times in the past) i've come to plead my case. Any suggestions?
Report, edit, etc...Posted by Mini Moose 2707 on 2004-05-25 at 15:46:53
QUOTE(WoA-Felagund @ May 25 2004, 03:39 PM)
-Wait 119975 milliseconds
-wait 20,000 milliseconds (or whatever it is)
-wait 80,000 milliseconds

These huge buggers are most likely your problem.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-05-25 at 17:18:22
WoA-Felagund if your asking for mapping help, start the thread under Map Mapping Assistance. Don't put a thread in the wrong spot again.

Topic Moved to Mapping Assistance

Anyways I see you didn't take my suggestion about not using long waits.

QUOTE(Bolt_Head)
Since your mapmaking skill is listed as advanced i'll assume you know how a death counter applys. Try makeing your triggers using a death counter and please do not use 30 second waits. The reason i ask this is when you run a wait, no other wait actions can begin to run until it has complealy finished. So if you have something like a spell trigger or healing that uses a wait, the trigger will pause when it gets to the wait and can't run the action untill the first one is compleat. Most people notice this when useing hyper triggers. If a person using hyper triggers sets up there hyper triggers to have higher priority than there other triggers then those other triggers (with waits) will not run untill the hyper triggers compleat there cycle witch can be a very long time. (hours even days)


Ok im going to show you why long waits are causing you problems. Whenever a player runs a wait. Starcrafts checks all other triggers and begins to run them. If one of those triggers owned by the same player has a wait then it won't run actions after that waitl it has priority (1st wait in the players trigger order). So these are the triggers in question.

Cond: Spawn Switch Cleared
Action: Countdown Timer 180 seconds
-Wait 119975 milliseconds
-Set Spawn Switch
-Preserve Trigger

Cond: Spawn Switch Set
Action: Add 1,000 minerals for All Players
-Wait 25 milliseconds
-Clear Spawn Switch
-Preserve Trigger

cond: battle trigger set
action: display: let the war begin!
-wait 20,000 milliseconds (or whatever it is)
-display: october 25, 3018 "Council of elrond"
-wait 80,000 milliseconds
-display: march 2, 3019 "first battle of the fords of isen"
-set switch first fords of isen

The first trigger, Trigger 1, has about a 2 minute wait. When the wait is active. The waits in the other two triggers can not fire. This isn't a problem for trigger 2 because it conditions won't be true until trigger one has compleated its wait.

But trigger 3 is a compleatly differant situation. Whenever it runs it is always second to the first there for the first trigger must run its wait before the 3rd trigger runs its waits. So if you for example have the conditions become true for the 3rd trigger then this will happen.

-First the trigger will become marked active. The first action will be run (the display text). But since the first trigger still has a active wait running the trigger must wait for it.
-After up to 2 minutes the first trigger will finish its round. Then the second runs and causes the first to run again due to the hypering effect of its wait. Thus you wait yet another 2 minutes.
-4 minutes are up finnaly trigger 3 runs its first wait for 20 seconds. After 20 seconds it displays the next text. But when it reaches the 2nd wait you run into another problem.
- When the second wait is activated it gives the opertunity for the first two triggers to fire before it waits. This will cause it to have to wait another 4 minutes before getting to its 80 second wait.
-Lastly after about 9 and a half minutes after the first triggers conditions were true it actually compleats running the trigger.

I may be a little off on the exact order of things but im pretty darn close if off at all. I wasn't feeding you a line of crap when i told you you shouldn't use long waits. You should make a counter to take the place of the waits It would be almost just as easy hardly any more triggers and it would run tons smoother. I'll assume since your mapmaking level is advanced you know how to make a death counter to replace your waits.

Lastly I don't know if this helps at all considering i havn't read it at all but Staredit.net has a LOTRs tutorial here
Report, edit, etc...Posted by Pinecone on 2004-05-25 at 17:33:21
Since your map making skill is advanced, a question such as that requires little to no advice. An advanced map maker knows not to use wait triggers that large.
Report, edit, etc...Posted by Thermo on 2004-05-25 at 17:48:52
That is kinda mean but yeah the waits would be your prob, i would just use the countdown timer instead of waits to keep track of time much better no bugs unless you use waits in your countdown timer which i am gonna why you would do something that insane.

And btw there are instances where an advanced map maker would use long waits, but not very many instances for good reason.
Report, edit, etc...Posted by Mini Moose 2707 on 2004-05-25 at 18:13:13
Say what you want, but I haven't used a Wait other than 0 ms in a looooong time. tongue.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2004-05-25 at 18:32:59
I rarely use waits longer than a 1000mili and those are pretty much only for intros and cut scenes
Report, edit, etc...Posted by Felagund on 2004-05-25 at 18:50:05
Jebus... you people! I'm sorry that you don't think I'm 'advanced,' I'm simply better in different areas than you are. I'd hate to see what LotR maps you could come up with : ) Let's relate this to authors! I'll make myself a Fantasy author and you guys can be Sci-Fi authors. We're both authors (map makers) but we make different types of stuff. See? Okay, with that said, the average Joe needs to know how to do crap. How do you do these... counters? I'd love to know! You keep on speaking on them, but I've been rather tardy coming into this website (I've been here about 2 weeks). So, if you'd please, recite the step(s) for a fledging map maker!
Report, edit, etc...Posted by Lithium on 2004-05-25 at 19:42:42
You shouldn't expect even a single comment for you putting "Advanced"
cause if i know, 50% in this "SEN" aren't advanced either.
And cause ya know - Advanced means, Mastered Triggers, Novice Map Maker,
Novice Terrain Maker, Novice Special Effects Maker, and Advanced Ad/Xtras.

Yes that is mean. but Expect nothing when you put yourself "Advanced".
I say my self is just a genious. Look! Newb! I want to look Advanced
* Puts Advanced * Few Days Later After Post * Looks at the Post *
* Sees nothing but crap *. Newb: ... / Newb: NOOO I DIDN'T GET HELPED!
and there it is, it's just a example. * tsk tsk tsk *
thats why i put average w00t.gif
Report, edit, etc...Posted by Felagund on 2004-05-25 at 19:51:19
Well, well... if it must be so... IF you insist... Okay okay, I edited my profile and now I'm "average" *sputters in rage* But never think you can best me in my own realm! Now, if you would so please, could you tell me how to make this counter trigger? I came to these forums to get help, not saying how I'm a nub, thanks!
Report, edit, etc...Posted by Yoshi da Sniper on 2004-05-25 at 20:31:46
We want to help others, but above we gave you help based upon your mapping skill setting. Which was advanced at the time.

Anyways, you know of course that 1000 miliseconds = 1 second.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-05-25 at 23:34:45
QUOTE(WoA-Felagund @ May 25 2004, 05:50 PM)
Jebus... you people! I'm sorry that you don't think I'm 'advanced,' I'm simply better in different areas than you are. I'd hate to see what LotR maps you could come up with : ) Let's relate this to authors! I'll make myself a Fantasy author and you guys can be Sci-Fi authors. We're both authors (map makers) but we make different types of stuff. See? Okay, with that said, the average Joe needs to know how to do crap. How do you do these... counters? I'd love to know! You keep on speaking on them, but I've been rather tardy coming into this website (I've been here about 2 weeks). So, if you'd please, recite the step(s) for a fledging map maker!


So if your so advanced in making Lotr maps why are you asking us for help in them? Besides i personaly hate lotr maps. The only thing worse is RP maps.

QUOTE(Yoshi Da Sniper)
Anyways, you know of course that 1000 miliseconds = 1 second.

He will proboly be pissed that you asked that yoshi. It isn't out of the ordinary for extreamly long waits to be in lotr maps like that. Im sure he knows how long it is.



Felagund: Counters can take a few differant forms but all work the same way. I'll use minerals as an example because it is less abstract.

Say you want a pause 20 seconds long. It is of course not a good idea to use a wait as we have established. So what we do for our element of time is we rely on the refresh rate in witch triggers fire. Triggers fire about once every 1.5 seconds. (about 11 times per second with hyper triggers). What we do is create a loop that subtracts or adds to a number until it gets to the point we need it at. I'll using adding for my example.

Players:
-Force 1
Condtions:
-Current player accumulates at least 1 minerals
Actions:
-Add one mineral for current player
-Preserve trigger.

This of course will keep adding minerals. So now back to our 20 seconds and how to incorperate it.

Say you have this trigger

Condtions: switch "storyline" is set
Actions: Display "hello" / wait 20,000milli / Display "Huh?"

To avoid this wait we can use these triggers

Conditions:
-Switch 'storyline' is set
Actions:
-Display "Hello"
-Set resources to 1 mineral for current player.

Conditions:
-Current player accumulates at exactly 15 minerals
Actions:
-Display "Huh?"

And of course you use the trigger above that adds minerals. You might have to play with the values to get them exactly how you want. It is more accurate if you use hyper triggers with larger values.

Now most likely your using minerals and gas for your map so we can't just use that. That is where death counters (or custom score) comes in handy. There are over 200 units in Starcraft (i always forget the exact number) and you can set deaths for each of them. First thing you need to do when selecting a death coutner is to find a unit that is not used in your map or it is impossable for it to die. This is because if the unit dies while the counter is being used it could cause problems (not so much for your trigger). I personaly use critters, powerups, and minerals alot. To use them just replace my example of minerals with the Set Deaths action and the Deaths condition.

Some other uses for counters.
-Setting deaths is sometimes used a kind of supper switch. Rather than createing a switch for each player. Deaths are individual to each player, unlike switches.
-Another example is to store a numbered value of information. Such as the obstical number in a bound. or the Upgrade level of a hero in a RPG. Useing one counter for things like this rules out dozens of switches that might of been used.

Some Helpfull hints:
-Counters are really helpfull because they work indpendantly for each player.
-I personaly like to use 0 as a null state for a trigger like this. Since i use the conditions "at least 1 mineral" for the counter trigger then it doesn't count until i set it to 1 or higher. Then when your done you can set the value back to 0 untill you need to use the counter again.
-Make sure you don't use the same counter at the same time.
-Counters for your purpose are better when used with hyper triggers.

Lastly, Death Score / Counters are something you get more and more accustomed to the more you use them (like switches). If you have any more questions about them feel free to ask.
Report, edit, etc...Posted by Felagund on 2004-05-26 at 01:47:00
Yes, I have read what you said : P
Report, edit, etc...Posted by Thermo on 2004-05-26 at 01:53:55
Death score counters much better they become like extra custom scores or variables or whatever ya wanna call em so very useful for making crazy stuff.
Report, edit, etc...Posted by .Coko[CK] on 2004-05-26 at 07:50:39
The only thing i have with Starcraft is that you can't get Minus Death Counters! IE; you can keep going up, and then drop it and drop it, but once it hits zero, you have to start going up again.

I use Death Counters for a version of MTG i made ages ago, because i was using Hyper Triggers for the spells, and worked it using a repeating cycle, of adding up, and then it would send to zero and add back up, for the time units were made, and for spells i would use another unit and set it going down, with the effects reducing as it went down.
Next Page (1)