Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Moving locations
Moving locations
This topic is locked. You can no longer write replies here.
Oct 4 2009, 6:56 am
By: Drakiel  

Oct 4 2009, 6:56 am Drakiel Post #1



If I have (example) 4 different burrowed units. 1 location. and use triggers:
Always
-
Move LOCATION to Burrowed1
Move LOCATION to Burrowed2
Move LOCATION to Burrowed3
Move LOCATION to Burrowed4
Preserve Trigger

Will that location move from burrowed to burrowed, so I can cover 4 areas with one location.
If the locations are constantly, and quickly, moving from burrowed to burrowed (with hyper triggers). When the unit walks on the location, he shouldn't have to "wait" there for more than 1/10th a second, am I wrong? Theoratically, it should be seemless, right?

Goal: Marine walks to a doodad "house" (burrowed unit in front of it), make action occurr.

I'm going to test it out sometime today and I'll confirm. But if anyone knows now, let me know please. Thanks!



None.

Oct 4 2009, 7:04 am Vrael Post #2



It depends on how you order your triggers. If you do something like this:

Trigger1:
Center Location on Burrowed1
Trigger2:
Center Location on Burrowed2
Trigger3:
Center Location on Burrowed3
Trigger4:
Center Location on Burrowed4

Trigger5:
Conditions:
Current Player brings at least 1 unit to Location
"Player owning burrowed 1" brings at least 1 "burrowed unit" to Location
Actions:
W/e you plan on doing

Trigger6:
Conditions:
Current Player brings at least 1 unit to Location
"Player owning burrowed 2" brings at least 1 "burrowed unit" to Location
Actions:
W/e you plan on doing

Trigger7:
Conditions:
Current Player brings at least 1 unit to Location
"Player owning burrowed 3" brings at least 1 "burrowed unit" to Location
Actions:
W/e you plan on doing

Trigger8:
Conditions:
Current Player brings at least 1 unit to Location
"Player owning burrowed 4" brings at least 1 "burrowed unit" to Location
Actions:
W/e you plan on doing

Then only Trigger 8 will ever fire, because when the "Center Location" triggers are done, the Location is on Burrowed4, and the next trigger to fire will know only that the Location is on Burrowed4.

If however, you order the triggers (from top to bottom) 1,5,2,6,3,7,4,8, then it should work as I believe you want it to.

That way, when trigger 5 runs, it will be immediately after trigger 1, so the location will be on Burrowed1, the correct location for trigger 5, and then trigger 2 runs, and the location will be on the correct Burrowed unit for trigger 6, and so on and so on.

Basically, you can use 1 location for many things, since we know how the trigger order in Starcraft works. If we need to use a condition which uses a moving location, we can simply create a trigger right before our current trigger that centers the location for use in the next trigger, and place it immediately before our current trigger in the trigger list.

Post has been edited 1 time(s), last time on Oct 4 2009, 7:18 am by Vrael.



None.

Oct 4 2009, 7:18 am Drakiel Post #3



K, I tried my idea:

Trigger("Player 7"){
Conditions:
Always();

Actions:
Move Location("Player 7", "Zerg Drone", "Anywhere", "Town-Human-Patroll(scroll)");
Move Location("Player 7", "Zerg Hydralisk", "Anywhere", "Town-Human-Patroll(scroll)");
Move Location("Player 7", "Devouring One (Zergling)", "Anywhere", "Town-Human-Patroll(scroll)");
Move Location("Player 7", "Hunter Killer (Hydralisk)", "Anywhere", "Town-Human-Patroll(scroll)");
Move Location("Player 7", "Zerg Drone", "Anywhere", "Town-Human-Patroll(scroll)");
Move Location("Player 7", "Zerg Hydralisk", "Anywhere", "Town-Human-Patroll(scroll)");
Move Location("Player 7", "Devouring One (Zergling)", "Anywhere", "Town-Human-Patroll(scroll)");
Move Location("Player 7", "Hunter Killer (Hydralisk)", "Anywhere", "Town-Human-Patroll(scroll)");
Move Location("Player 7", "Zerg Drone", "Anywhere", "Town-Human-Patroll(scroll)");
Move Location("Player 7", "Zerg Hydralisk", "Anywhere", "Town-Human-Patroll(scroll)");
Move Location("Player 7", "Devouring One (Zergling)", "Anywhere", "Town-Human-Patroll(scroll)");
ETC ETC
Preserve Trigger();

And you're right, even that, the location is just going to the nearest burrowed and stays there ;o(.
Your trigger-settup sounds like it should work then. Simple idea, but more complicated than mine. Ummm.. I wondering if it's worth it to do it like this since it will be for patrolling units (location to location, like to force a manual "junkyarddog" on enemies roaming a forest)

Is it worth the effort, to save a handful of locations (per regeion)

And THANKS Vrael for your concept!



None.

Oct 4 2009, 7:20 am Vrael Post #4



Yes the method you just posted definitely will not work. Basically, after that trigger has run, the location "Town-Human-Patroll(scroll)" will be left on the Devouring One, since that is the last action to execute in the trigger. Then, when the next trigger goes to run, the location is still on the Devouring One, so any triggers meant to detect units at the Drone, for example, will not work correctly.

Also, for patroling units you will need a second moving location. One location (probably your Town-Human-Patrol location) will have to be the "Origin" and you will need to center a second location for the "Destination" of the units, because we cannot break up the order command into different parts. This can be done though, its not hard, you just need to break it up like this:

1). Trigger to center on the Drone
---a. actions while location is on Drone
---b. actions while location is on Drone
---c. actions while location is on Drone
2). Trigger to center on the Devouring One
---a. actions while location is on Devouring One
---b. actions while location is on Devouring One
---c. actions while location is on Devouring One

ect. ect.

As long as they are immediately after one another in the trigger list (check text trigger editor for correct order) it should work fine. I use this in my map, and I'm sure plenty of others do.



None.

Oct 4 2009, 7:23 am NudeRaider Post #5

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

Yes it is worth it. Making your map better is always worth spending like 15-30 minutes of extra time.




Oct 4 2009, 9:34 am Drakiel Post #6



Well, it's not so much "making my map better" as much as it's saving Locations so I don't reach the 255 limit.



None.

Oct 4 2009, 9:55 am Vrael Post #7



Depends on how many locations you plan on using. If you have a huge map and need a lot of locations, do everything you can to save them, 255 runs out fast. If you have a small map and only need like 60, don't bother.



None.

Oct 4 2009, 5:54 pm Drakiel Post #8



I have a headache... I THINK this is the correct way to do this, right?
Setup: 8 different burrowed zerg units throughout the "town".
Goal: Units in the town to patrol randomly among the 8 burrowed units.
Goal: Using only TWO locations.

Basicaly:
-Set randomize Switches
-Move Location
-If switches are THIS
(8 different times, for the 8 outcomes)
-Then Order, move, to Burrow1

-Move Location
-I switches are THIS
-Then Order, move, to Burrow2

-Move Location
-I switches are THIS
-Then Order, move, to Burrow3

ETC ETC...
I've already spent like 20minues on this and I'm only through 2 out of 8 sets. Am I doing this right? I tend to always take the LONG road to accomplish things. Triggers posted below.

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Always();

Actions:
Set Switch("Switch1", randomize);
Set Switch("Switch2", randomize);
Set Switch("Switch3", randomize);
Preserve Trigger();
Comment("Switch1, 2, 3 - Randomize permanently");
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Always();

Actions:
Move Location("Player 7", "Zerg Defiler", "TownHumanPatrol(START)(scroll)", "TownHumanArea");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", set);
Switch("Switch2", set);
Switch("Switch3", set);

Actions:
Move Location("Player 7", "Unclean One (Defiler)", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", set);
Switch("Switch2", set);
Switch("Switch3", not set);

Actions:
Move Location("Player 7", "Zerg Defiler", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", set);
Switch("Switch2", not set);
Switch("Switch3", set);

Actions:
Move Location("Player 7", "Zerg Zergling", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", set);
Switch("Switch2", not set);
Switch("Switch3", not set);

Actions:
Move Location("Player 7", "Devouring One (Zergling)", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", not set);
Switch("Switch2", set);
Switch("Switch3", set);

Actions:
Move Location("Player 7", "Hunter Killer (Hydralisk)", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", not set);
Switch("Switch2", set);
Switch("Switch3", not set);

Actions:
Move Location("Player 7", "Zerg Drone", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", not set);
Switch("Switch2", not set);
Switch("Switch3", set);

Actions:
Move Location("Player 7", "Zerg Hydralisk", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", not set);
Switch("Switch2", not set);
Switch("Switch3", not set);

Actions:
Move Location("Player 7", "Zerg Lurker", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Always();

Actions:
Move Location("Player 7", "Unclean One (Defiler)", "TownHumanPatrol(START)(scroll)", "TownHumanArea");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", set);
Switch("Switch2", set);
Switch("Switch3", set);

Actions:
Move Location("Player 7", "Unclean One (Defiler)", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", set);
Switch("Switch2", set);
Switch("Switch3", not set);

Actions:
Move Location("Player 7", "Zerg Defiler", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", set);
Switch("Switch2", not set);
Switch("Switch3", not set);

Actions:
Move Location("Player 7", "Devouring One (Zergling)", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", not set);
Switch("Switch2", set);
Switch("Switch3", set);

Actions:
Move Location("Player 7", "Hunter Killer (Hydralisk)", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", not set);
Switch("Switch2", set);
Switch("Switch3", not set);

Actions:
Move Location("Player 7", "Zerg Drone", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", not set);
Switch("Switch2", not set);
Switch("Switch3", set);

Actions:
Move Location("Player 7", "Zerg Hydralisk", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", not set);
Switch("Switch2", not set);
Switch("Switch3", not set);

Actions:
Move Location("Player 7", "Zerg Lurker", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Switch("Switch1", set);
Switch("Switch2", not set);
Switch("Switch3", set);

Actions:
Move Location("Player 7", "Zerg Zergling", "TownHumanArea", "TownHumanPatrol(END)(scroll)");
Order("Player 7", "Terran Civilian", "TownHumanPatrol(START)(scroll)", "TownHumanPatrol(END)(scroll)", move);
Preserve Trigger();
}

//-----------------------------------------------------------------//

EDIT EDIT EDIT:
So I just caught the TownHumanArea and TownHumanPatrol(START)(scroll) are now INVERTED, it was an error previously.... off to continue writing it.

Post has been edited 1 time(s), last time on Oct 4 2009, 6:15 pm by Drakiel.



None.

Oct 4 2009, 5:58 pm Drakiel Post #9



IF that set of triggers worked...
It looks like.... i can just copy and paste it all in SCMDraft's version trigger edit...
I need to learn to use SCMDraft's triggers faster...



None.

Oct 4 2009, 6:19 pm Drakiel Post #10



OH MY GOD PUNCH ME IN THE FACE!!!
I can't get this crap working. Just tested it and NADA happends in-game. Like the triggers don't even exist. The Terran Civilians don't even move. Argh! *Smashes his lappy 486*
Ugh, I'm going to bed. I'll be back in the morning (night time in USA).



None.

Oct 4 2009, 6:22 pm Kaias Post #11



Quote from Drakiel
OH MY GOD PUNCH ME IN THE FACE!!!
I can't get this crap working. Just tested it and NADA happends in-game. Like the triggers don't even exist. The Terran Civilians don't even move. Argh! *Smashes his lappy 486*
Ugh, I'm going to bed. I'll be back in the morning (night time in USA).
Did you paste them into the text trigger editor? because you have to validate them first (hit the check button) before saving them.



None.

Oct 5 2009, 12:35 am Vrael Post #12




Just to clarify what Kaias means.

Your trigger set does look correct, except the two locations should NOT be inverted locations. "Start" location should be big enough to capture any units close to the burrowed unit, and the "END" location can be an arbitrary size, since units will move to the middle of it anyway. I think your triggers look right though, otherwise. Make sure P7 is in the game, for one thing, if its not working correctly.

The brief theory behind what I think you are doing is this, right:

1). Move Origin Location to one of the burrowed units.
2). Randomly Select a destination
3). Order units at the burrowed unit to that destination
4). Repeat for all burrowed units

Correct?

Post has been edited 1 time(s), last time on Oct 5 2009, 12:42 am by Vrael.



None.

Oct 5 2009, 1:58 am Norm Post #13



I'm not sure if you're considering this: but if you have more than one center location in a list of actions, only the last one will take effect for the remainder of the trigger loop.



None.

Oct 5 2009, 4:39 am Drakiel Post #14



Thanks Kaias. Yea that was my first time using "Trigedit Alpha1" (SCMDraft written triggers) - And I DIDN'T validate.
However, now that I've tried, I get the following error:
Error at line 1402: Started
Error at line 1418: done!

If I attempt to validate again AFTER this error, I recieve the following error:
Error at line 1418: Started
Error at line 1418: done!

Now it seems obvious to assume line 1418 has an error on it. I don't see where I can find line 1418.



None.

Oct 5 2009, 4:50 am Vrael Post #15



That error actually means it compiled correctly. It's the only GOOD error. If you'll take a look at the section on Text Triggers in the FAQ, you'll find a little bit of info on it and a picture.



None.

Oct 5 2009, 5:14 am Drakiel Post #16



Well SOMETHING's wrong... screw it, I'll just post my map.

Attachments:
(3)Shards of Descension.scx
Hits: 2 Size: 109.57kb



None.

Oct 5 2009, 5:35 am CecilSunkure Post #17



I can't take a look at it at the moment, but one thing I've done a few times is I've hosted the wrong map because I saved in scmdraft to a new filename.. I hope you didn't do that as well :><:

I've spent hours "fixing bugs" just to find out I had been hosting the wrong file..



None.

Oct 5 2009, 5:42 am Drakiel Post #18



Quote from Vrael
Just to clarify what Kaias means.

Your trigger set does look correct, except the two locations should NOT be inverted locations. "Start" location should be big enough to capture any units close to the burrowed unit, and the "END" location can be an arbitrary size, since units will move to the middle of it anyway. I think your triggers look right though, otherwise. Make sure P7 is in the game, for one thing, if its not working correctly.

The brief theory behind what I think you are doing is this, right:

1). Move Origin Location to one of the burrowed units.
2). Randomly Select a destination
3). Order units at the burrowed unit to that destination
4). Repeat for all burrowed units

Correct?

Yes, that "brief theory" is corrent and my end-goal for this Post.
At least we're all on th same page. Thanks for yor patience with me so far, guys.



None.

Oct 5 2009, 6:12 am Vrael Post #19



Your burrowed zerg units are owned by player 6, not player 7.



None.

Oct 5 2009, 7:33 am Drakiel Post #20



Oh, blahness. Well I HAD the trigger to give burrowed units from p6 to p7 (to prevent unborrowing of non-hero units). But I deleted them (and forgot) after my first "try" of randomized locations.

I added the following trigger:
//-----------------------------------------------------------------//
Trigger("Player 7"){
Conditions:
Always();
Actions:
Give Units to Player("Player 6", "Player 7", "Zerg Lurker", All, "TownHumanArea");
Give Units to Player("Player 6", "Player 7", "Zerg Zergling", All, "TownHumanArea");
Give Units to Player("Player 6", "Player 7", "Zerg Hydralisk", All, "TownHumanArea");
Give Units to Player("Player 6", "Player 7", "Zerg Defiler", All, "TownHumanArea");
Give Units to Player("Player 6", "Player 7", "Infested Terran", All, "TownHumanArea");
Give Units to Player("Player 6", "Player 7", "Hunter Killer (Hydralisk)", All, "TownHumanArea");
Give Units to Player("Player 6", "Player 7", "Devouring One (Zergling)", All, "TownHumanArea");
Give Units to Player("Player 6", "Player 7", "Unclean One (Defiler)", All, "TownHumanArea");
Give Units to Player("Player 6", "Player 7", "Zerg Drone", All, "TownHumanArea");
}

And it STILL doesn't work... It's my luck, I tell ya!



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:18 pm]
Ultraviolet -- 🔪🐈
[12:34 pm]
NudeRaider -- curiosity kills the cat!
[06:18 am]
Sylph-Of-Space -- No complaints here, i'm just curious!
[2024-5-18. : 11:05 pm]
Ultraviolet -- :wob:
[2024-5-18. : 3:55 pm]
Zoan -- :wob:
[2024-5-18. : 10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[2024-5-18. : 3:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
Please log in to shout.


Members Online: Roy