Moving Units
Jun 8 2010, 2:53 pm
By: LaZyMiCro  

Jun 8 2010, 2:53 pm LaZyMiCro Post #1



I'm having problems moving units from location to location. Say I have an infinite amount of locations in a line. Say I want to make about 1 Marine for 1 location for about 10 locations total out of that infinite number. Now say I want these marines to "Teleport" to the next location that is in line in front of them at the same time as all the other units, so it would be as if they were replacing the other unit for the other unit. I'm having trouble with this I don't know why. But when I make about 15 marines (1) for (1) location and have them move over to the right, they move ONE by ONE, but I want them to move at the same time but preserve the trigger for more waves of any different unit to follow this line of locations. I want them to teleport to the location rather than issuing an order for the unit to move to the location then the next. How do I do this? It is very puzzling. I have an example of what I have.

Condition:
Player * Brings [any unit] to location [ 0 ]
Action:
Move all [any unit] at location [ 0 ] to location [ 1 ]

Please help me, thank you.

:ermm:



None.

Jun 8 2010, 3:00 pm Aristocrat Post #2



Quote from LaZyMiCro
I'm having problems moving units from location to location. Say I have an infinite amount of locations in a line. Say I want to make about 1 Marine for 1 location for about 10 locations total out of that infinite number. Now say I want these marines to "Teleport" to the next location that is in line in front of them at the same time as all the other units, so it would be as if they were replacing the other unit for the other unit. I'm having trouble with this I don't know why. But when I make about 15 marines (1) for (1) location and have them move over to the right, they move ONE by ONE, but I want them to move at the same time but preserve the trigger for more waves of any different unit to follow this line of locations. I want them to teleport to the location rather than issuing an order for the unit to move to the location then the next. How do I do this? It is very puzzling. I have an example of what I have.

Condition:
Player * Brings [any unit] to location [ 0 ]
Action:
Move all [any unit] at location [ 0 ] to location [ 1 ]

Please help me, thank you.

:ermm:

Please, PLEASE post a test map.

My initial suspicion: Your location is too small.



None.

Jun 8 2010, 4:47 pm rockz Post #3

ᴄʜᴇᴇsᴇ ɪᴛ!

If the locations overlap, you'll be satisfying multiple triggers and they will all fire.

Another problem might be wait blocks if you're using wait blocks. Really though, I don't see how you can mess this up, so you're going to have to post the triggers/the map to get any definitive answer. To post the triggers, open up SCMDraft's "trigedit" and copy/paste them in a code/collapse box.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jun 8 2010, 10:45 pm LaZyMiCro Post #4



I'm guessing the first answer might be correct, that the locations are to small. I tried to figure it out but I know I'm not a complete retard as to making the trigger something completely obvious as to making this trigger not work. Also I'm not using any wait blocks on it.I was so puzzled but I think it is the fact that my location is to small. Also I have one more question, for my below trigger, can I replace my Condition to "Always" instead? :ermm:

Condition:
Player * bring 1 [any unit] to location [ 0 ]

Action:

Move [ all ] of [ any unit ] at location [ 0 ] to location [ 1 ]
Preserve trigger.



None.

Jun 8 2010, 11:23 pm Roy Post #5

An artist's depiction of an Extended Unit Death

Quote from LaZyMiCro
... can I replace my Condition to "Always" instead?
You can, and it honestly wouldn't make a difference, except that the trigger would be constantly running in the background, which isn't important unless your map is going to be on the larger side.

If you have a trigger for each unit to move right Regardless, you need to have the move actions in the correct order, or else a unit will try to move on a location where there is already a unit. Make the trigger/action moving the unit furthest to the right run first, and then the next unit furthest right, etc.

Post has been edited 1 time(s), last time on Jun 8 2010, 11:28 pm by Roy.




Jun 8 2010, 11:37 pm ImagoDeo Post #6



The 'Move Unit' action instantaneously teleports units.
The 'Order' action tells units to perform an order, such as moving or attacking or patrolling.
This might be the problem. Or you need to explain the problem more clearly.



None.

Jun 9 2010, 8:39 am LaZyMiCro Post #7



I solved my problem before coming back to your last comments, and Roy was right. I had the triggers, locations correct, but the order of the triggers was completely the mirror opposite. So I had units running from right BEFORE left rather than LEFT before right which is what I wanted. Also I might be adding in some hyper triggers for this action. Can I add a trigger that acts just like a hyper trigger lets say this for example. And, sorry, I will try to make better explanations for my next posts if I have any problems. Thank you for your time. It is very much appreciated.

Conditions:

Always

Actions:

Wait for 10 milliseconds
Wait for 10 milliseconds
Wait for 10 milliseconds
Wait for 10 milliseconds

Etc.. Can I do this like I can a hyper trigger with 10 milliseconds replacing the 0 millisecond?

:ermm:



None.

Jun 9 2010, 8:46 am bobo Post #8



if u use 10ms its the same as 0. it goes like this
0-42
43-84
85-168
etc..
basically every 42 frames, but yes u can use wait "x" ms instead of 0



None.

Jun 9 2010, 8:49 am LaZyMiCro Post #9



Okay, thank you bobo.



None.

Jun 9 2010, 9:25 am Lanthanide Post #10



42 milliseconds, not frames.

There are 23.8095 frames per second at Fastest game speed.



None.

Jun 9 2010, 9:37 am LaZyMiCro Post #11



So what would you suggest I use instead? I want all these units to have a fixed time so I can fire a missile which will have a fixed time as well. This missile or in my case (an Observer which I am using as a "Stealth Missile") will fire from Point M all the way to Point A. Also you have to create a Cannon to fire this missile. So Plus wait time for The Cannon which is 10 seconds to be created, the Wait Time For The Observer which has 14 Locations to fire through Plus the Wait time for the enemy forces. The Enemy forces are going from Left to Right while the missile is being fired from Bottom to Top. I'm trying to balance this out as best I can. I have the enemy forces on a wait time of 800 milliseconds. Which seems to be fast enough because the wait time without a wait block is to slow but I found 800 to be nearly prefect.

Sorry, I'm not familiar with frames or anything.

:ermm:



None.

Jun 9 2010, 1:58 pm NudeRaider Post #12

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

If you need something timed in game time use death counters. 1 trigger loop = 1 death count = 2 frames with hypers.
If you need something timed in real-time use waits. Although you can enter ms precise values they will be rounded to the next frame which on fastest will be every 42ms.

I wrote an in-depth explanation of the frame concept that StarCraft's engine is based on, but give me a moment to dig it up...
There: http://www.staredit.net/211782/




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
[2024-5-05. : 9:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
Please log in to shout.


Members Online: jun3hong