I started to do a search on this but I didn't even really know what to search for so if there is already a thread on this that you know of please link.
I am sure this is simple and right under my nose as usual. Basically what I am wanting is to change Tosh's Mindblast ability from a targeted attack to a melee attack. When I use the ability I'd like it to emanate from his (unit) position rather than a clicked cursor position. I hope that makes sense.
Thanks for the replies. I got it working with TheAlmaity's suggestion. It reminded me of something Onetwo said in one of his tutorials, "Order matters"... and I feel a little dim for not considering it. And yeah, of course I had to move the camera actions to the same trigger as well... live and hopefully learn I suppose. Thanks again.
I just finished Onetwo's tutorial on Diablo style controls. It all works as advertised but I did run into one problem when trying to marry that tutorial with a simple hero selection dialog. Here is my Hero Selection trigger:
ChooseHero
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
Conditions
Or
Conditions
(Used dialog item) == ChooseHero1
(Used dialog item) == ChooseHero2
(Used dialog item) == ChooseHero3
Actions
Dialog - Hide HeroDialog for (Player group((Triggering player)))
General - Switch (Actions) depending on (Used dialog item)
Cases
General - If (ChooseHero1)
Actions
Unit - Create 1 Zealot (Prisoner) for player (Triggering player) at Start Local facing 270.0 degrees (No Options)
General - If (ChooseHero2)
Actions
Unit - Create 1 Stalker for player (Triggering player) at Start Local facing 270.0 degrees (No Options)
General - If (ChooseHero3)
Actions
Unit - Create 1 Karass for player (Triggering player) at Start Local facing 270.0 degrees (No Options)
Default
And then here is the map initialization trigger:
Initialization
Events
Game - Map initialization
Local Variables
Conditions
Actions
UI - Disable mouse drag selection for (All players)
Player - Make all players in (Active Players) treat each other as Ally
Variable - Set Heros[1] = (Value)
Variable - Set Heros[2] = (Value)
Variable - Set Heros[3] = (Value)
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player (Picked player)) == User
Then
Camera - Pan the camera for player (Picked player) to (Position of Heros[(Picked player)]) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Follow for player (Picked player) (Unit group(Heros[(Picked player)])) with the camera and Clear Current Target
Camera - Lock camera input for player (Picked player)
Variable - Set Player Spell Info[(Picked player)].Right Mouse Spell = Zeratul - Blink
Variable - Set Player Spell Info[(Picked player)].Right Mouse Spell Requires Target = False
Variable - Set Player Spell Info[(Picked player)].Right Mouse Spell Requires Ground = True
Variable - Set Player Spell Info[(Picked player)].Right Mouse Spell Cooldown = 0.5
UI - Display "Blink set to right mouse. " for (Player group((Picked player))) to Subtitle area
Else
Now, the Variable - Set Heros[1] = (Value) works when a unit (matching the value) is already on the map when I test it. But when I try to incorporate the created zealot from my hero selection trigger it doesn't seem to work. My first thought was to replace value with "last created unit" but that doesn't work. I have tried many other options but I haven't been able to solve this and I am pulling my hair our over it because it seems like it should be a very simple solution. I am still relatively new to the editor so it wouldn't surprise me if what I am looking for is right under my nose. Any immediate thoughts on what my problem would be? How can set up the variable to equal my selected/last created units?
If I need to give more information just let me know.
Ok, you'll have to forgive me if these have obvious answer but I have a couple of questions.
First, wouldn't rally just make the units run to a random point in the region from the structure rather than immediately spawn in the specified region?
And second, when you say "add condition to specify actual building as desired" do you mean to specify the structure that the units will be trained in? I thought that is what you might mean by that but couldn't figure it out. What would that condition look like?
Ok, scratch the trigger I wrote out above. Could someone suggest a trigger that they know would work to give the effect I am looking for?
When a unit is created at a factory it spawns a random point in a specified region and changes ownership to player 15 rather than defaulting to spawning right outside the factory.
Hey, thanks. Really appreciate the help. I am having trouble finding "source of trained unit's unit type". I did word searches with no luck. Could you tell me where that is exactly?
As the title says. The concept I am going for is to have Zerg purchased through an infested factory owned by a Terran player and rather than have them default and spawn next to the factory, I'd like them to spawn at a random point in a specified region when training progress is complete and change ownership to player 15 upon doing so.
So far I have figured out a trigger for spawning the units in the region when they complete training, however, where I seem to be stuck is figuring out how to specify that the factory is the only structure that spawns to the region since players will have other structures that operate in the normal fashion. I imagine this is a fairly simple solution but I just can't seem to figure out what is, undoubtedly, right under my nose.
Here is what I have so far.
Events
- Unit - (Triggering unit) training progress is Complete
Conditions
- (Owner of (Triggering unit)) == 1
Actions
- Unit - Move (Triggering unit) instantly to (Random point in Region 1) (No Blend)
- Unit - Change ownership of (Triggering unit) to player 15 and Change color
I was looking for exactly what you are discussing here but instructions are hard to follow... or perhaps I am just not understanding. This is the first time I am attempting custom effects so, sorry if this is obvious.
I started a new effect. I named it and defined its type but you lost me after that. I don't see the option to link any of your next steps to the effect. I see I can copy values from another effect and modify them but that doesn't really help me in your tutorial. How do you link the ability, the effect, the target, the unit, etc... to the custom effect (pet leashed)?
Well, that is what I thought. But it's not happening that way for me. When the end game screen pops up everything stops in the game. I don't think it's a glitch. Perhaps I have done something without realizing it.
0
@DrSuperEvil: Go
Thanks for the reply.
0
I started to do a search on this but I didn't even really know what to search for so if there is already a thread on this that you know of please link.
I am sure this is simple and right under my nose as usual. Basically what I am wanting is to change Tosh's Mindblast ability from a targeted attack to a melee attack. When I use the ability I'd like it to emanate from his (unit) position rather than a clicked cursor position. I hope that makes sense.
0
@TheAlmaity: Go
@Kueken531: Go
Thanks for the replies. I got it working with TheAlmaity's suggestion. It reminded me of something Onetwo said in one of his tutorials, "Order matters"... and I feel a little dim for not considering it. And yeah, of course I had to move the camera actions to the same trigger as well... live and hopefully learn I suppose. Thanks again.
0
@VindicatorDX: Go
It's a good thought but I intend to have weapon upgrade/changes with my heros. Thanks for the reply.
0
I just finished Onetwo's tutorial on Diablo style controls. It all works as advertised but I did run into one problem when trying to marry that tutorial with a simple hero selection dialog. Here is my Hero Selection trigger:
ChooseHero
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
Conditions
Or
Conditions
(Used dialog item) == ChooseHero1
(Used dialog item) == ChooseHero2
(Used dialog item) == ChooseHero3
Actions
Dialog - Hide HeroDialog for (Player group((Triggering player)))
General - Switch (Actions) depending on (Used dialog item)
Cases
General - If (ChooseHero1)
Actions
Unit - Create 1 Zealot (Prisoner) for player (Triggering player) at Start Local facing 270.0 degrees (No Options)
General - If (ChooseHero2)
Actions
Unit - Create 1 Stalker for player (Triggering player) at Start Local facing 270.0 degrees (No Options)
General - If (ChooseHero3)
Actions
Unit - Create 1 Karass for player (Triggering player) at Start Local facing 270.0 degrees (No Options)
Default
And then here is the map initialization trigger:
Initialization
Events
Game - Map initialization
Local Variables
Conditions
Actions
UI - Disable mouse drag selection for (All players)
Player - Make all players in (Active Players) treat each other as Ally
Variable - Set Heros[1] = (Value)
Variable - Set Heros[2] = (Value)
Variable - Set Heros[3] = (Value)
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player (Picked player)) == User
Then
Camera - Pan the camera for player (Picked player) to (Position of Heros[(Picked player)]) over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
Camera - Follow for player (Picked player) (Unit group(Heros[(Picked player)])) with the camera and Clear Current Target
Camera - Lock camera input for player (Picked player)
Variable - Set Player Spell Info[(Picked player)].Right Mouse Spell = Zeratul - Blink
Variable - Set Player Spell Info[(Picked player)].Right Mouse Spell Requires Target = False
Variable - Set Player Spell Info[(Picked player)].Right Mouse Spell Requires Ground = True
Variable - Set Player Spell Info[(Picked player)].Right Mouse Spell Cooldown = 0.5
UI - Display "Blink set to right mouse. " for (Player group((Picked player))) to Subtitle area
Else
Now, the Variable - Set Heros[1] = (Value) works when a unit (matching the value) is already on the map when I test it. But when I try to incorporate the created zealot from my hero selection trigger it doesn't seem to work. My first thought was to replace value with "last created unit" but that doesn't work. I have tried many other options but I haven't been able to solve this and I am pulling my hair our over it because it seems like it should be a very simple solution. I am still relatively new to the editor so it wouldn't surprise me if what I am looking for is right under my nose. Any immediate thoughts on what my problem would be? How can set up the variable to equal my selected/last created units?
If I need to give more information just let me know.
-Muse
0
Is there anyway to remove the environmental red haze that comes with the char textures?
Update: Never mind. The fix was right under my nose. I just wasn't seeing it.
0
@hobbidude: Go
Thanks for your replies. I finally found a trigger that works for what I am wanting.
0
@hobbidude: Go
Thanks for the reply.
Ok, you'll have to forgive me if these have obvious answer but I have a couple of questions.
First, wouldn't rally just make the units run to a random point in the region from the structure rather than immediately spawn in the specified region?
And second, when you say "add condition to specify actual building as desired" do you mean to specify the structure that the units will be trained in? I thought that is what you might mean by that but couldn't figure it out. What would that condition look like?
0
@SouLCarveRR: Go
The link doesn't seem to work.
0
Ok, scratch the trigger I wrote out above. Could someone suggest a trigger that they know would work to give the effect I am looking for?
When a unit is created at a factory it spawns a random point in a specified region and changes ownership to player 15 rather than defaulting to spawning right outside the factory.
0
@SouLCarveRR: Go
Hey, thanks. Really appreciate the help. I am having trouble finding "source of trained unit's unit type". I did word searches with no luck. Could you tell me where that is exactly?
0
As the title says. The concept I am going for is to have Zerg purchased through an infested factory owned by a Terran player and rather than have them default and spawn next to the factory, I'd like them to spawn at a random point in a specified region when training progress is complete and change ownership to player 15 upon doing so.
So far I have figured out a trigger for spawning the units in the region when they complete training, however, where I seem to be stuck is figuring out how to specify that the factory is the only structure that spawns to the region since players will have other structures that operate in the normal fashion. I imagine this is a fairly simple solution but I just can't seem to figure out what is, undoubtedly, right under my nose.
Here is what I have so far.
Events
- Unit - (Triggering unit) training progress is Complete
Conditions
- (Owner of (Triggering unit)) == 1
Actions
- Unit - Move (Triggering unit) instantly to (Random point in Region 1) (No Blend)
- Unit - Change ownership of (Triggering unit) to player 15 and Change color
As always, any help would be greatly appreciated.
-muse
0
@Bommes: Go
Thanks.
0
@BrotherZazef: Go
I was looking for exactly what you are discussing here but instructions are hard to follow... or perhaps I am just not understanding. This is the first time I am attempting custom effects so, sorry if this is obvious.
I started a new effect. I named it and defined its type but you lost me after that. I don't see the option to link any of your next steps to the effect. I see I can copy values from another effect and modify them but that doesn't really help me in your tutorial. How do you link the ability, the effect, the target, the unit, etc... to the custom effect (pet leashed)?
0
@MoDTassadar: Go
Well, that is what I thought. But it's not happening that way for me. When the end game screen pops up everything stops in the game. I don't think it's a glitch. Perhaps I have done something without realizing it.