Staredit Network

Staredit Network -> UMS Assistance -> 0 second wait and having a explosion trail with it
Report, edit, etc...Posted by Staredit.Net Essence on 2004-03-07 at 20:23:37
In an rpg I'm making, I'm trying to make a spell where when you cast, an observer is created and it will follow one enemy in the hero's immediate location. Then, a unit (I have a firebat) will be made under the observer as it moves toward the enemy and will be killed immediately making it seem like there is an exploding trail moving toward the enemy unit. This trail kills anything it touches. This is the first time I've experimented with this so it's a little glitchy but works fairly well.

I was wondering... has anyone tried this? And how many wait 0 seconds does it normally take. For some reason there is a mess-up where the exploding trail ends short of the enemy but the observer still continues to the enemy and kills it. I find that this gap is shortened if I add more wait 0 seconds... I think I have like 30 wait 0 seconds ... am i supposed to have that many for this to work correctly?

Does anyone have an map that this is accomplished that I could look at as maybe an example?? I've found one or 2 but they are protected. I've seen this effect in games like dodgeball and worms from this site.

And this wait 0 second thing really screws up my mana system, and maybe other things that I haven't re-experimented with, but I think I can change it so it still works...
Report, edit, etc...Posted by LtDonny on 2004-03-08 at 06:22:21
Well, I am not sure if that is the thing you want to do, I think you should destroy the oberserver when it comes in contact with the enemy, creating a firebat at the location. Unless you want to make it look like a beam, I guess that would be what you want. Sorry if I misunderstood.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-03-08 at 08:06:30
This will take a while to reply to and i might not have time before class. I will get back to you though

Edit:

Units:
Hero
Enemy
Observer
Fire bat

Locations:
Shot Range (try a 15x15 depends on what you want)
Observer (3x3)
Target (3x3)
Firebat (2x2)

==Trigger 1==
Players:
-Player 1-
Conditions:
-Current player does something to indicate he is casting this (possibly bring a civ to a location)
Actions:
-Move Location ‘Shot Range’ on ‘Hero’ at anywhere
-Create One Observer owned by ‘a comp’ at ‘Shot Range’
-Center Location ‘Target’ on ‘Enemy’ owned by Enemy player at ‘Shot Range’
-Center location ‘Observer’ on ‘Observer’ owned by ‘a comp’ at ‘Shot Range’
-Set Switch ‘Shot Fired’
-Preserve Trigger

==Trigger 2==

Players:
-Player 1-
Conditions:
-Switch Shot Fired is set
-Enemy player brings exactly 0 ‘Enemy’ to location ‘Shot Range’
-‘Enemies’ brings at exactly 0 ‘Enemy’ to location ‘Target’
Actions:
-Remove All Observer at ‘Shot Range’ owned by ‘a comp’
-Display Text “ No Enemies in Range ”
-Clear Switch Shot Fired
-(undo any cost it may have been to fire)
-Preserve Trigger

==Trigger 3==
Players:
-Player 1
Conditions:
-Switch Shot Fired is set
Actions:
-Center location ‘Observer’ on ‘Observer’ owned by ‘a comp’ at ‘Observer’
-Center location ‘Firebat’ on ‘Observer’ owned by ‘a comp’ at ‘Observer’
-Center location ‘Target’ on ‘Enemy’ owned by enemy player at ‘Target’
-Order ‘Observer’ owned by ‘a comp’ at ‘Observer’ to move to ‘Target’
-Create 1 ‘Fire Bat’ owned by ‘a comp’ at ‘Firebat’
-Kill all men owned by ‘enemy players’ at ‘fire bat’ (make sure this doesn’t kill the observer)
-Kill Firebat owned by ‘a player’ at ‘fire bat’ (if ‘a player’ is not an enemy’
-Preserve Trigger

==Trigger 4==

Players:
-Player 1
Conditions:
-Switch Shot Fired is set
-‘a player’ brings at least one observer to location ‘Target’
Actions:
-Create 9 ‘Firebat’ for ‘a comp’ at ‘Target’
-Kill All ‘Enemy’ at ‘Target’
-Kill All ‘Firebat’ at ‘anywhere’
-Remove Observer ‘at Target’
-Clear Switch Shot Fired
-Preserve Trigger


This trigger will work better with Hyper triggers (0 wait). For that you should make 3 triggers filled with wait 0 actions (and one preserve) and make them all owned by a computer player that does not have any triggers with waits in them. (shouldn’t screw up mana system then)

I imagine this trigger will work perfectly, or screw up big when you make it. I will probably make you a sample map latter today. Cause i may have overlooked something.

Edit: updated trigs to reflect example
Report, edit, etc...Posted by Rayne on 2004-03-08 at 09:37:03
Well i deleted the post because i obviously said something wrong...
Report, edit, etc...Posted by dashrike on 2004-03-08 at 10:52:51
I wondered how Rayne managed to double-post...


<useful advice>
Error: Cannot access folder "Useful Advice." Access is denied.
</useful advice>
Report, edit, etc...Posted by Yoshi da Sniper on 2004-03-08 at 11:24:14
*Ouch*

Bolt head thats awsome happy.gif

No one ever said mapping was easy. The trigger looks okay, but it doesn't take into account multipule enemies, a cool way to have this, is to "bounce" to all the enemies in the shot range. Simply by continuously centering the location on an enemy within the shot range. When the enemy dies, it simply goes on to the next.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-03-08 at 11:32:16
Well Rayne, the thing with hyper triggers is it can get very complex, In fact more complex than any other thing done with triggers. Anyways (trying to keep things simple) Hyper triggers of course increase the rate in witch your triggers fire. Every single wait action causes the rest of the triggers to fire again when it is run and this is how the effect works. The “problem” with hyper triggers is when you end up the waits in them, causing a wait block. A wait block is when one wait action is delayed because another one is currently being ran.

For example if you make the following two triggers:
Players:
-Player 1
Conditions:
-Switch 1 is Set
Actions:
-Create 1 Marine
-Wait 10000 (10 seconds)

Players:
-Player 1
Conditions:
-Switch 1 is Set
Actions:
-Wait 10 (any value works)
-Kill Marine

Now most people would look at these two triggers and assume that the marine would be killed 10 milli seconds after it is created. But what really happens is since the first trigger runs it’s wait first the second one can not execute any actions after the wait until there are no waits being ran by that player. Therefore the marine is killed after 10010 milli seconds (plus trigger refresh time).

Anyways This Block only occurs when the triggers are owned by the same player. Thus if the second trigger was given to player 2 then the Marine would be killed almost instantly (like most would think it does anyways). When we talk about hyper triggers, they can be thought of as just like an extremely long wait. (To give you an idea of how long 3 triggers with 62 waits each and preserves will last 5 hr 51min and 3 seconds before the triggers refresh and the whole thing starts again.) Therefore any triggers owned by the same player that owns the hyper triggers (with waits in them) Must wait for the hyper triggers to finish before it can run its wait and continue with its actions. (if there after the hyper trigger)

There are also a few misconceptions that make this worse. People believe that triggers owned by a Force or All players are actually different than ones owned by the respective players. The WORST thing you can do with your hyper triggers is make them owned by all players. This is the same as making that trigger for players 1-8 and is the same in every way (trigger order included).

Lastly the effects of a wait (hyper effect) effects all players but only blocks one of them. Therefore most maps should have there hyper triggers owned by a single computer player (without any triggers that include waits). If you do this then no problems will occur because of a wait block. The only problems that might occur are the effects a hyper has on triggers that rely on the delay of the trigger refresh rate (ie custom or death counters).

Hope this helps your understanding. (damn I can never make this brief )

QUOTE
Bolt head thats awsome

No one ever said mapping was easy. The trigger looks okay, but it doesn't take into account multipule enemies, a cool way to have this, is to "bounce" to all the enemies in the shot range. Simply by continuously centering the location on an enemy within the shot range. When the enemy dies, it simply goes on to the next.


If there were multiple enemies it would center on the furthest left enemy and if there was tie it would chose the lower of them. Also the enemies in the path between the furthest left and your hero may end up being hit by the fire bat. Also a neat thing is the observer would continue to follow the enemy it locked on to, even if it leaves the range location (unless another enemy would walk to the near left of it, then the target would switch to him)

Having it bounce around wouldn’t be much harder but I would probably rewrite a whole new trigger for it. But I probably only needs a few adjustments. And if I was to do that personally I wouldn’t use an observer (too slow)

Edit: Here is another thread at Blizz forums where i tried to explain hyper triggers yet again and trigger order stuff (i been doing this for a long time) http://www.blizzforums.com/showthread.php?...76&page=1&pp=15
Report, edit, etc...Posted by Yoshi da Sniper on 2004-03-08 at 11:40:12
Adding on to that:

The way to get past this is to make another player experience the wait, which is what I do with looping music.

Simular to this tutorial (my solution to explaining too much bolt laugh.gif)
Report, edit, etc...Posted by (U)Bolt_Head on 2004-03-08 at 11:41:21
That tutorial has a problem, Only one player would be able to hear the music if you tried to set it up for multiple players. Unless you had a differant switch for each player.

Edit: Oh yeah having the hyper trigger owned by a single player is basicly the way of "getting around it"
Report, edit, etc...Posted by Yoshi da Sniper on 2004-03-08 at 11:43:46
QUOTE
assuming Player 1 is the human player who wants to hear the music

Read man, read tongue.gif

You think I should edit it to all players?
Report, edit, etc...Posted by (U)Bolt_Head on 2004-03-08 at 11:46:25
Yes i don't think many people benifit from having a tutorial for music looping that only works for one player.

I could complain about alot of your tutorials lol
Report, edit, etc...Posted by Yoshi da Sniper on 2004-03-08 at 11:50:10
I was placed under "Average skill level". I'm assuming they know how to make it go for all players if they are average.

Accually, you probaly could complain about most of the tutorials. Thats mostly because "Ness" the orginal tutorials manager didn't know much about mapping. If it sounded good, he put it up.

He left somewhere (god knows) so now I'm managing it now. If you're really bugged by something, please, tell me.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-03-08 at 11:52:40
Yes the hyper trigger tutorial is the worse exclamation of hyper triggers I have ever read. Anyways Im off to class again
Report, edit, etc...Posted by dashrike on 2004-03-08 at 12:55:52
I still don't get hypertriggers. How do they work?
Report, edit, etc...Posted by Yoshi da Sniper on 2004-03-08 at 13:04:47
You could make a new topic on this.
Report, edit, etc...Posted by dashrike on 2004-03-08 at 13:14:50
Well I could but I thought it was a logical trend we were following here...
Report, edit, etc...Posted by (U)Bolt_Head on 2004-03-08 at 17:00:45
QUOTE(dashrike @ Mar 8 2004, 12:55 PM)
I still don't get hypertriggers.  How do they work?

To understand hyper triggers you need to understand Waits. The simplist i can put it for you is

Every time a Wait is exicuted Starcraft Checks all the conditions of all other triggers and runs there actions. Hyper triggers are composed of many many waits so it forces Starcraft to check the Triggers many many times. (think thats simple)
Report, edit, etc...Posted by dashrike on 2004-03-08 at 17:04:48
Alright. I saw the many-usage part w/ Yoshi's tutorial on that sucking effect. I just didn't really understand why they would work like that. I get it now.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-03-08 at 17:45:20
Ok here it is http://www.shadowfortress.net/~unknown/spelltest.zip I had to add two more center location actions to the triggers I told you before so you proboly will want to look at it (its pretty cool with the enmies on junkyard dog and stuff)
Report, edit, etc...Posted by Staredit.Net Essence on 2004-03-08 at 18:15:25
Ok.... you guys are pretty awesome.
Um, I don't really have the time to experiment with Bolt Head's methods yet, but I'm hoping I'll get to experiment later tonight. Thanks a bunch though for the time to put together that example though.

Yes, my mana system is messed up, but I imagine that I can fix that without too much of a problem, but my problem is that the trail of exploding firebats that follows my observer ends short of my enemy. So the visual effect is somewhat at a loss because the enemy does die, but he randomly dies after the exploding trail ends.
I triggered one "wait trigger" under All Players. If I do not use any other waits in my map, will this be ok?? Are you saying that there is a way so that my 0 sec. wait only affects one person?

Here's what I have:

Players:
player2 - player casting the spell
player6 - player that owns the observer and firebats that explode
player7 - the enemy

Location Layers:
p2: 1x1 that centers on the hero
P2: centers on the hero also but it's radius is about the size of player's vision
enemy2: 2x2 that centers on any enemy unit in P2
p2inferno: 3x3 that centers on the observer that directs the exploding trail

Triggers Player2:
Conditions:
triggers the spell (vespene gas, etc.)
enemy brings at least 1 men to enemy2
player 6 brings at most 0 observer to P2
Actions:
subtract gas, etc.
create 1 observer at p2 for player 6

Conditions:
triggers the spell
enemy brings at least 1 men to enemy2
player 6 brings at least 1 observer to P2
Actions:
blah blah
Display text: cannot cast spell twice

Conditions:
triggers the spell
enemy brings at most 0 men to enemy2
Actions:
display text: the reach of this spell is not that far

And I have one more trigger for if there is not enough mana.

Triggers Player 6:
Cond.
Always
Act.
Kill all observer at enemy2
kill all gui montag for player 6
order observer at P2 move to enemy2

Cond.
Player 6 brings at least 1 observer to p2inferno
Player 6 brings at most 0 observer to p2
Act.
Create 1 Gui Montag at p2inferno for Player6
kill all gui montag

Cond.
Player 6 brings at least 1 observer to enemy2
Act.
Kill all men for player7 at p2inferno

Cond.
player 6 commands at least 1 observer
Act.
center p2inferno on observer owned by player 6 at P2

Cond.
player 6 commands at most 0 observer
Act.
center p2inferno somewhere out of the gameplay field



I think the problem is when my layers p2inferno and enemy2 cross ... I'm not sure... but at about that radius, it sometimes stops creating explosions, sometimes it doesn't.
When I get this figured out, I'm also going to do ... move an observer to p2 instead of create one so I don't see it being cloaked at first.

I'm going to experiment with what bolthead said now... thanks a lot guys.

Oh yea, one more ....
Always kill all men for player 7 at p2inferno.

Oh awesome, I didn't see your last post... I'm gonna download htat now.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-03-08 at 20:32:15
QUOTE
I triggered one "wait trigger" under All Players. If I do not use any other waits in my map, will this be ok??


No No No don’t do that no. Make your Hyper trigger owned by a computer player just ONE PLAYER it will effect the other players in the means that there triggers will react faster but it won’t mess up other triggers.

Your triggers don’t make any since to me, maybe it’s the location names or something it also seems like you broke up your triggers into too many segments. I would have to see the map to help you on that. I suggest you use what I did (I’ll change the post so it has the two changes that are in the example)
Report, edit, etc...Posted by SI on 2004-03-09 at 04:45:25
QUOTE((U)Bolt_Head @ Mar 8 2004, 11:52 AM)
Yes the hyper trigger tutorial is the worse exclamation of hyper triggers I have ever read.  Anyways Im off to class again

I like your style wink.gif
but you know that
Report, edit, etc...Posted by Mini Moose 2707 on 2004-03-09 at 20:04:56
QUOTE((U)Bolt_Head @ Mar 8 2004, 12:32 PM)
The WORST thing you can do with your hyper triggers is make them owned by all players.  This is the same as making that trigger for players 1-8 and is the same in every way (trigger order included).

I do that all the time, never did it any other way, and never had any problems. :/
Report, edit, etc...Posted by Staredit.Net Essence on 2004-03-09 at 20:14:33
Well thanks bolt head so much!!!
I finally got the effect that I want and it's now flawless. biggrin.gif

What I did was I actually integrated EXACTLY what you did into my map, and then I realized that I STILL had the SAME exact problem that I had before with my method. So then I realized that the problem wasn't with my triggering, but it was with the hyper triggers. All I needed to do was put in more waits and copy it 2 more times and Voila!

So I just reverted back to my method since with mine it already had the reflecting/bouncing effect where the beam would move on and kill the next enemy within the hero's radius. So now I actually have the spell as a progression where at the first level the beam will kill any unit it hits up until it reaches the first target, and at the second level it will attack one more target after it reaches the first, and at ultimately at the final level it will "bounce" to every target that remains in the hero's radius.

I also made it move an observer instead of creating one so you don't actually see the observer before it gets a chance to cloak when you create it over the hero.

ANYWAYS, thanks so much guys, I can finally move on with my map lol.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-03-10 at 08:46:55
QUOTE(Mini Moose 2707 @ Mar 9 2004, 08:04 PM)

I do that all the time, never did it any other way, and never had any problems. :/

Well if you don't put your hyper triggers are last in your trigger order (most can't tell), then instead of your hyper triggers interfering with your waits then your waits will interfere with your hyper triggers. Ether that is is or you didn't use any waits.

I see people with errors relating to this all the time. Less now since people are now saying
QUOTE(Chu from staredit tutorials)
Before using this you must remember that using any other waits in your map (including those in transmission but not in Mission briefing) will be nulled and made useless.


Go chu-master the master of Misconception
Next Page (1)