Warcraft Legacy Starcraft Legacy BlizzForums
The Future?

Go Back   BlizzForums > Games > StarCraft Discussion

StarCraft Discussion StarCraft & Brood War lie herein.

Reply
 
Thread Tools Display Modes


Old 04-21-2008
 
#1
Canada Storming Archon
BF Member
Join Date: Mar 2008
Posts: 293
 Storming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightened
Default How to make units always stay in one location?

Ok, the title question is pretty misleading, just didn't want to put the whole thing up there.

Here's the real deal:

I'm making an RPG map where I need one unit to always stay in one place so that when the battle starts, that unit will teleport (move) to the battle spawn location and when the battle ends, the same unit (if alive) will move to the original location and NOT MOVE at all afterwards.

Examples of map which uses this trigger function perfectly is NFL Blitz (the WR), Fútbol (the player), Air Hockey (strong shot), Mario Kart (Dropship), Speedball (the walls), etc, but I can't find the specific trigger that would show me how to do the trigger because there are close to thousands of triggers in each of the maps.

I've tried using this trigger:

Condition:
Battle switch is Cleared

Action:
Move all Warrior for Current Player to Housing Location
Wait 500 milliseconds
Preserve trigger

There is one major problem with the above however. The trigger does work but it has a small delay that allows the Warrior unit to go out of its Housing Location. This delay that I'm talking about is what I'm trying to get rid off, I want the Warrior unit to always stay in that location EVEN if you try moving it away. I've tried setting the Wait time to 0.01 milliseconds but the Warrior unit can still move out of the location! The major problem comes with air units and when the battle starts, the player's unit will not appear in battle because it was not in the location due to it moving away from it.

Supportive help would be greatly appreciated.
 
 

Storming Archon is offline


pm.gif   
Reply With Quote


Old 04-21-2008
 
#2
BlizzForums spinesheath
Trigger Mathemagician
Join Date: Jun 2006
Posts: 1,456
 spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!
Default

The wait in this trigger is completely useless and - if anything at all - counter-productive.

I assume that you are not familiar about what I am going to explain now, which is why I will explain it
Triggers are checked in certain intervals. Normally, every trigger is checked roughly every 2 seconds (not really accurate, but the dimension is what is important here).
All triggers are checked virtually at the same time, but still in a certain order.
To be executed, a triggers conditions must be met at exactly the time of checking. If a trigger is preserved, it will be checked again, but only in the next trigger cycle, which is 2 seconds from the current one.

I suppose it is unimportant whether the unit moves around as long as it stays inside the location. If you increase the location size so that the unit can't leave the location in the time between 2 trigger cycles, you should be fine. In that case, just use the move + preserve trigger without any waits. Waits should be avoided, anyways.

You could also give the units to another player, if that is possible in your specific setup. A neutral player won't move them and you can't move a neutral player's units. Give them back to the player once you need them.

And then there are hyper triggers. Hyper triggers speed up the trigger cycle to about 81ms per cycle. They are used whenever accuracy is required, but come with several negative effects. For example with hyper triggers on you can only use waits under certain circumstances, and with several limitations. A trigger like in your post would cause big problems if it is run with hyper triggers.
You also need to be aware of trigger order if you use hypers.
To enable hyper triggers, add 3 triggers of this form to your map:

C:
Always
A:
Preserve
(Comment)
62 times Wait(0ms)

The common rule is: these triggers should be at the end of the trigger list of P8. This is not always the best option, but usually.

I suggest that you stay away from hypers unless you need them, though.
 
spinesheath has 1,456 Posts

 

spinesheath is offline


pm.gif Send a message via ICQ to spinesheath  
Reply With Quote


Old 04-21-2008
 
#3
Canada Storming Archon
BF Member
Join Date: Mar 2008
Posts: 293
 Storming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightened
Default

Oh yes, the trigger cycle is what really is bothering me right now. The first time I tried moving the unit away from the location it moved back but then right away I could move the unit away, as if the trigger had some sort of delay to it.

Hmm, I'll increase the location size and see if it works, that seems the best option since I already did all the Forces and making one of the players neutral would make things a whole lot more complicated for me

I just got one more little question. How do maps such as Mario Kart, NFL Blitz, etc do the trigger that units never move out of certain location EVER, even if you try to move the unit away? In Mario Kart, the Dropship would never budge out of the squared tileset ever even if you clicked profusedly towards the upper part of the map, it would always sit still in that tileset. In NFL Blitz, the Mutalisk would never move outside the ball area much in the same way as the Dropship. I tried checking to see what trigger was the one that did it but there are so many I eventually gave up and tried using the one I put in the question.

Thanks for the help
 
 

Storming Archon is offline


pm.gif   
Reply With Quote


Old 04-21-2008
 
#4
BlizzForums spinesheath
Trigger Mathemagician
Join Date: Jun 2006
Posts: 1,456
 spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!
Default

I don't know these maps, but most likely it is due to hyper triggers. Moving a unit 12 times a second is quite a lot.
 
spinesheath has 1,456 Posts

 

spinesheath is offline


pm.gif Send a message via ICQ to spinesheath  
Reply With Quote


Old 04-22-2008
 
#5
Canada Storming Archon
BF Member
Join Date: Mar 2008
Posts: 293
 Storming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightened
Default

I've got a question about hyper triggers.

Can I set it for only one trigger or will it work for all of them.

I'm having trouble with this trigger:

Condition:
Player 5 brings at least 1 Archer to Warrior location

Action:
Move all Warrior for Player 1 to Battle spawn
Set Battle switch

It works but the character can somehow jump over certain enemy Archers. For example, if I put 5 Archer enemies in front of my character, only the 2nd or 3rd Archer will kick up the condition for the trigger above. I was wondering if I could use hyper triggers to make this trigger only be as fast as possible for accuracy purposes but I don't know if I activate hyper triggers if it will affect all the other triggers of the map?
 
 

Storming Archon is offline


pm.gif   
Reply With Quote


Old 04-22-2008
 
#6
BlizzForums spinesheath
Trigger Mathemagician
Join Date: Jun 2006
Posts: 1,456
 spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!
Default

Hyper triggers always change the trigger speed globally. You can't speed up single triggers.

For stuff like detecting if a unit is in a fairly small locations, hyper triggers are useful indeed, since this requires high precision.
If possible, you should try not to use hypers. Especially if you are in the middle of making a map. Hypers influence the whole map and therefore should be considered right from the start. If you implement them now, you will most likely run into lots of bugs.
 
spinesheath has 1,456 Posts

 

spinesheath is offline


pm.gif Send a message via ICQ to spinesheath  
Reply With Quote


Old 04-22-2008
 
#7
Canada Storming Archon
BF Member
Join Date: Mar 2008
Posts: 293
 Storming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightened
Default

I see, I tested in a custom map and yea, Mario Kart is basically hyper trigger and so is NFL Blitz.

I tried testing it in my map (using a separate file) and yea, it is VERY FAST, had to change some of the wait triggers and time conditions so they occurred at the right time.

Hopefully this is my last question, I wonder how to make spellcasters from the CPU cast spells on enemy units immediately. Once I create say, a Science Vessel with 200 starting energy, it will only cast a spell if it is attacked. I was wondering if there was a run script that would allow CPU units to immediately cast a spell no matter what, even if it wasn't attacked first, like in impossible maps when they all rush into you.

Thanks for the great help again
 
 

Storming Archon is offline


pm.gif   
Reply With Quote


Old 04-22-2008
 
#8
BlizzForums spinesheath
Trigger Mathemagician
Join Date: Jun 2006
Posts: 1,456
 spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!spinesheath is unstoppable!
Default

There are no scripts for casting spells.

Except for a few that is: Recall, Nuke, Disruption Web. That should be it. Maybe I forgot one or two, but not many.

Most spells can be "forced", though. For example by attacking the unit. Medics will cast blind on units with more than 59 HP or something like that. There once was a map called "spell check" which showed all these things in detail, but I don't have it anymore.


If you are using hyper triggers, please try to stay away from waits. They might "stack up" and cause your trigger execution to halt for a very long time. If you are still using waits, test them thoroughly.
 
spinesheath has 1,456 Posts

 

spinesheath is offline


pm.gif Send a message via ICQ to spinesheath  
Reply With Quote


Old 04-22-2008
 
#9
Canada Storming Archon
BF Member
Join Date: Mar 2008
Posts: 293
 Storming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightened
Default

Too bad there are no scripts for all spells but it won't be much of a problem in my map... hopefully.

I'll try and avoid using waits with hyper triggers although I still need a few so that toggling one switch doesn't immediately overlap with another.

Thanks for the tips and help and now is time to get that map finished
 
 

Storming Archon is offline


pm.gif   
Reply With Quote


Old 04-25-2008
 
#10
Canada !!SaLtMaN!!
Trigger Fingers
Join Date: Jul 2006
Posts: 23
 !!SaLtMaN!! is a glorious beacon of light!!SaLtMaN!! is a glorious beacon of light!!SaLtMaN!! is a glorious beacon of light!!SaLtMaN!! is a glorious beacon of light!!SaLtMaN!! is a glorious beacon of light!!SaLtMaN!! is a glorious beacon of light
Default

It's been a while since I've posted anything on the bizzforums, but I loved em so much back in my day, I can't help it.

Anyways... in regards to your questions:

Quote:
Originally Posted by Storming Archon View Post
I've got a question about hyper triggers.

Can I set it for only one trigger or will it work for all of them.

I'm having trouble with this trigger:

Condition:
Player 5 brings at least 1 Archer to Warrior location

Action:
Move all Warrior for Player 1 to Battle spawn
Set Battle switch

It works but the character can somehow jump over certain enemy Archers. For example, if I put 5 Archer enemies in front of my character, only the 2nd or 3rd Archer will kick up the condition for the trigger above. I was wondering if I could use hyper triggers to make this trigger only be as fast as possible for accuracy purposes but I don't know if I activate hyper triggers if it will affect all the other triggers of the map?
I'm not sure exactly what you're asking, but the jumping may be due to your conditions. One thing I've learned is to just stack your conditions as much as possible, the condition you have is a bit vague and could interfere with other triggers perhaps. So for example, maybe add a couple conditions that negate the action such as "'Battle switch' is clear" or "Player 1 Brings at least Warrior to Wherever he was before".
Not sure if that'll help, but good luck.

Quote:
Hopefully this is my last question, I wonder how to make spellcasters from the CPU cast spells on enemy units immediately. Once I create say, a Science Vessel with 200 starting energy, it will only cast a spell if it is attacked. I was wondering if there was a run script that would allow CPU units to immediately cast a spell no matter what, even if it wasn't attacked first, like in impossible maps when they all rush into you.
If I recall correctly, there is a way to do what you want to do. For example, with the science vessel, you want to cast irradiate on a unit, set the spell to 0 energy cost, and set the rest of the other spells to over 250, also set a ... (sorry been a while since I've worked with any sort of triggers) what's it called.... it's I think a 'run script' trigger, put it on either one of the hard terran expansion ones, or roaming, not 100% sure, sorry, I guess maybe fiddle with that until they cast the spell. Player must be a computer btw.

-saltman
 
!!SaLtMaN!! has 23 Posts
 

!!SaLtMaN!! is offline


pm.gif  Send a message via AIM to !!SaLtMaN!! Send a message via MSN to !!SaLtMaN!!  
Reply With Quote


Old 04-25-2008
 
#11
United States Gradius
For Vengenace
Join Date: Jul 2006
Posts: 5,020
 Gradius is one BAD motha--SHUTCHOMOUF!Gradius is one BAD motha--SHUTCHOMOUF!Gradius is one BAD motha--SHUTCHOMOUF!Gradius is one BAD motha--SHUTCHOMOUF!Gradius is one BAD motha--SHUTCHOMOUF!Gradius is one BAD motha--SHUTCHOMOUF!Gradius is one BAD motha--SHUTCHOMOUF!Gradius is one BAD motha--SHUTCHOMOUF!Gradius is one BAD motha--SHUTCHOMOUF!Gradius is one BAD motha--SHUTCHOMOUF!Gradius is one BAD motha--SHUTCHOMOUF!
Default

Quote:
Originally Posted by !!SaLtMaN!! View Post
It's been a while since I've posted anything on the bizzforums, but I loved em so much back in my day, I can't help it.
Oh man, I remember you back from the glory days. Circa 2003. Welcome back! :3
 
Gradius has 5,020 Posts

Best StarCraft II Poster 2008 | Best Moderator 2008
Best StarCraft II Poster 2007 Runner Up | Most-Liked StarCraft II Poster 2007
 

Gradius is offline


pm.gif  Send a message via AIM to Gradius Send a message via MSN to Gradius  
Reply With Quote


Old 04-26-2008
 
#12
Canada Storming Archon
BF Member
Join Date: Mar 2008
Posts: 293
 Storming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightenedStorming Archon has become enlightened
Default

Quote:
Originally Posted by !!SaLtMaN!! View Post
It's been a while since I've posted anything on the bizzforums, but I loved em so much back in my day, I can't help it.

Anyways... in regards to your questions:



I'm not sure exactly what you're asking, but the jumping may be due to your conditions. One thing I've learned is to just stack your conditions as much as possible, the condition you have is a bit vague and could interfere with other triggers perhaps. So for example, maybe add a couple conditions that negate the action such as "'Battle switch' is clear" or "Player 1 Brings at least Warrior to Wherever he was before".
Not sure if that'll help, but good luck.



If I recall correctly, there is a way to do what you want to do. For example, with the science vessel, you want to cast irradiate on a unit, set the spell to 0 energy cost, and set the rest of the other spells to over 250, also set a ... (sorry been a while since I've worked with any sort of triggers) what's it called.... it's I think a 'run script' trigger, put it on either one of the hard terran expansion ones, or roaming, not 100% sure, sorry, I guess maybe fiddle with that until they cast the spell. Player must be a computer btw.

-saltman
I'm gonna try and use scripts as you say, hopefully it works but those damn Arbiters, they are so unpredictable, sometimes they run sometimes they attack, you never know. Oh well, at least using hyper triggers I did solve my former problem
 
 

Storming Archon is offline


pm.gif   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Suggestion] Kungai's take on the Zerg (Not the entire SC2 forces...) Lord Kungai StarCraft Discussion 5 03-17-2008 12:08 AM
SentryIII Old School Maps Kaiser StarCraft Discussion 4 09-29-2007 12:20 AM
Gameralisk. My Zerg unit idea. zeratul11 StarCraft Discussion 12 09-23-2007 06:18 PM
What Zerg units would you like to stay? Kahooli StarCraft Discussion 48 08-21-2007 11:25 AM


All times are GMT -4. The time now is 03:27 AM.
Designed by XG3