i have a mothership unit with a region on it but i don't want it and everthing around it to teleport to the point which is inside the mothership(another part of the map)
Triggering unit absolutely won't work in this case, and I think you might need to use a global unit group given your specifications. You want this to happen when you type dock, but only selected units. So what you will want to do is set a trigger up to clear out a unit group and add all selected units to that unit group any time a unit for that player is selected. Then when you use your dock command, just do a pick each unit in unit group in your trigger, and if that unit is in the appropriate region, move picked unit to desired location.
Hey just in case 'Global Unit Group' threw you off, I just mean a unit group variable that doesn't exist inside a function, trigger, or action definition. Should be right up there on the same level as triggers, not inside of them. As for adding, will want to use THIS function:
Then you will want to use said function like this:
With p just being a variable for that particular player. Then you can just add these to said unit group.
Although after looking at that function, you don't actually need to do that, you can just pick each unit in unit group selected units for player p whenever dock is typed, then if picked unit is in desired region, dock them. But is good to know how to do both in my opinion, unit groups are very useful used right. You should have everything you need to make this happen now, I hope the editor lets you do it without too many issues!
So what you're trying to do is to this, in rough order:
1. User types "dock"
2. All selected units are moved to point 4.
You're actually almost there, but things got confusing on this thread, so I totally see where you got thrown off. I've attached your map here with what I think you're looking for. Select some units and type dock 2 and they'll move. Here's why:
Event: Game - Player Any Player types a chat message containing "dock 2", matching Exactly
Pretty clear, and you'd figured this out.
Unit Group - Pick each unit in (Selected units for player 1) and do (Actions)
Find each unit the player has selected and do something.
ActionsUnit - Move (Picked unit) instantly to Point 004 (No Blend)
Move that unit to Point 004. This function loops over each unit the group, which is how it moves everything. Hope that helps!
I want to make it so any unit I have selected in a region is moved instantly to a point when I type "dock"
@Trieva: Go
i have a mothership unit with a region on it but i don't want it and everthing around it to teleport to the point which is inside the mothership(another part of the map)
@Trieva: Go
i got the mothership from teleporting inside itself but i can't figure out how to set it to when i type dock
@Trieva: Go
ok what ever I'm doing wrong is probably easy to fix but i don't see it. i have a trigger now that says.
When Player 1 types dock
enter ship trigger;
events
conditions
actions
@dmenmonster: Go
Triggering unit absolutely won't work in this case, and I think you might need to use a global unit group given your specifications. You want this to happen when you type dock, but only selected units. So what you will want to do is set a trigger up to clear out a unit group and add all selected units to that unit group any time a unit for that player is selected. Then when you use your dock command, just do a pick each unit in unit group in your trigger, and if that unit is in the appropriate region, move picked unit to desired location.
@Deadzergling: Go
I can't figure out how to make a unit group. I know how to add them to the group but there's no groups for them to be added to.
EDIT: i got the unit group created now but i don't have the option to add units to it
@Trieva: Go
yeah i have that selected but theres no unit groups for them to be added to. and i know the unit groups exist
@dmenmonster: Go
Hey just in case 'Global Unit Group' threw you off, I just mean a unit group variable that doesn't exist inside a function, trigger, or action definition. Should be right up there on the same level as triggers, not inside of them. As for adding, will want to use THIS function:
Then you will want to use said function like this:
With p just being a variable for that particular player. Then you can just add these to said unit group.
Although after looking at that function, you don't actually need to do that, you can just pick each unit in unit group selected units for player p whenever dock is typed, then if picked unit is in desired region, dock them. But is good to know how to do both in my opinion, unit groups are very useful used right. You should have everything you need to make this happen now, I hope the editor lets you do it without too many issues!
@Deadzergling: Go
ok I found that but I'm still getting errors. it says it can't find the units. This is my first time using the editor to make triggers like this.
EDIT: if someone wants to do voice chat/screen share through google hangouts to help a bit quicker.
@dmenmonster: Go
Can you post your map? I can look into this after work.
@LucidIguana: Go
yeah ill post it. my triggers arnt to organized
@dmenmonster: Go
No problem—you gotta start somewhere. I still haven't really settled on a format for my own organization, honestly.
@LucidIguana: Go
its up now
@dmenmonster: Go
Oh, battle.net? I meant just upload here on the forum, if you don't mind.
@LucidIguana: Go
lol it up now
@dmenmonster: Go
Organize your triggers based on Blizzard maps. I found this helpful for keeping my head in the game!
@dmenmonster: Go
I feel like I'm missing something here, but if you just reply to this message, hit add attachment below, and then post, I'll take a look.
@LucidIguana: Go
i just went through the trouble of getting it approved -_-
Ok, you're all turned around here and I see why.
So what you're trying to do is to this, in rough order:
1. User types "dock" 2. All selected units are moved to point 4.
You're actually almost there, but things got confusing on this thread, so I totally see where you got thrown off. I've attached your map here with what I think you're looking for. Select some units and type dock 2 and they'll move. Here's why:
Event: Game - Player Any Player types a chat message containing "dock 2", matching Exactly Pretty clear, and you'd figured this out.
Unit Group - Pick each unit in (Selected units for player 1) and do (Actions) Find each unit the player has selected and do something. Actions Unit - Move (Picked unit) instantly to Point 004 (No Blend) Move that unit to Point 004. This function loops over each unit the group, which is how it moves everything. Hope that helps!
@LucidIguana: Go
but only if those units were in region 009 (around the ship)i think thats were i was getting stuck mainly
EDIT: I GOT IT thanks everyone