Trying to create multiple summons with only one of each unit being summoned

camatrix87

New Member
Reaction score
0
I have been looking at the threads related to Misha and Feral Spirit for when a unit is already summoned and when the button is pressed again the old summons disappears and the new one shows up next to the summoning unit. This has not helped me unfortunately. Misha and Feral Spirit use the same set so doing a custom ability based off of one of each will summon both units at the same time. I have been trying to use triggers so solve this problem but have not been getting anywhere. I have been trying to get it so that when my unit starts to cast an ability, if there is already a unit on the field, it will replace the old unit with the new one, essentially:

Summon
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Summon Bear
(Number of living (Unit-type of (Summoned unit)) units owned by (Owner of (Summoning unit))) Greater than 1
Actions
Unit - Remove (Summoned unit) from the game

I will need to do this twice to get my other two summon spells going other then my one based off of Misha.
 

camatrix87

New Member
Reaction score
0
Sorry, I guess I didn't explain myself well enough. I don't want to summon more then one unit per spell, and when one summons is already out, then I want to old one to disappear. Summon water elemental will spawn multiple units if I keep pressing the summons button and Archimedies Dark Portal is meant for multiple units to come out in a single spell. Feral Spirit and Summon Misha will make the old summons disappear once they are recast and this is what I want, just one multiple units with different spells. For example: I have a summon Bear (which is based off of Misha). I can't reuse this as when one button is pressed then all 3 of my summons for my one unit will summon at once. My next Summons is a water elemental and is based off of the summon water elemental, but as long as you keep pressing the summons button, you will get more and more water elementals on the screen. The next is a Quilbeast and this is the same as summon water elemental in that it will create multiple summons as long as the button is pressed. The only other summons that will only have one unit on screen at a time by removing the old summons is Feral Spirit (which the summon Misha is based off of). So my question was how do I make the summon water elemental and summon quilbeast a one unit summons without having to resort to the cooldown times being based on the length of the summons.
 

dannyboydude

Ultra Cool Member
Reaction score
33
ok set a unitgroup for all the units of summoned type owned by the casting unit player

and pick every unit next remove it and you only have 1 summoned unit

EDIT : WOOT 600TH POST!!!!!!!
 

camatrix87

New Member
Reaction score
0
ok set a unitgroup for all the units of summoned type owned by the casting unit player

and pick every unit next remove it and you only have 1 summoned unit

EDIT : WOOT 600TH POST!!!!!!!

I guess i'm not sure exactly what you mean by this. Do you think you could show me with triggers? I keep getting it close to working with the way I have been doing it, but it isn't completely working (spawning erratically/multiples and/or making ones that have an unlimited spawntime to them when I want them to follow the rules I have already set up.

I'm also not sure that this will work for what I want to do. It's close as it can replace the old summons with the new summons, but the program itself will pick which summons will keep (most likely the older one). That was why I was trying to use this:

test
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Summon Water Elemental (Baloo)
Actions
Unit - Remove (Summoned unit) from the game
Game - Display to (All players) for 30.00 seconds the text: it works


This is of course just a test to verify it would see all the right pieces, but it was not removing the old summons, but would display text, which means it is not seeing the summons.

If you show me what you were talking about I would love to try it and appreciate your help.
 

Bloodcount

Starcraft II Moderator
Reaction score
297
Why don't you modify whe summon bear.Just put a unit that does not have a timed life.This will work better then the summon water elemental cuz it doesn't make a new bear(you can have moore then one at a time) but chenges the other one.
 

camatrix87

New Member
Reaction score
0
Why don't you modify whe summon bear.Just put a unit that does not have a timed life.This will work better then the summon water elemental cuz it doesn't make a new bear(you can have moore then one at a time) but chenges the other one.

The problem that I am trying to solve is that my hero has 3 summoning spells, each summons something completely different. The summon Bear would summon multiple bears, as many bears as i press the spell button for. the same thing happens with Summon Water Elemental. If i was to try and reuse Summon Misha or even Summon Feral Spirit, both spells would summon at the same time. The timed bit I am not really worried about right now, again, it is the multiple summons that I am worried about.

this is of course unless I misunderstood you, sorry, was a little hard to follow what you were saying.
 

Hildagarn

Member
Reaction score
20
If you want differant units, make a dummy unit and give it a summon bear spell with one of you units, then.....
Code:
Events-Unit casts a spell
         Conditions- spell being cast equal to [U]summon bear[/U]
         Actions-create one [U]Dummy unit[/U] at position of casting unit
                    Order last created unit to [U]Summon Bear[/U]
change underlined values
 

camatrix87

New Member
Reaction score
0
If you want differant units, make a dummy unit and give it a summon bear spell with one of you units, then.....
Code:
Events-Unit casts a spell
         Conditions- spell being cast equal to [U]summon bear[/U]
         Actions-create one [U]Dummy unit[/U] at position of casting unit
                    Order last created unit to [U]Summon Bear[/U]
change underlined values

I think I see where you're going with this. You're saying to have a dummy unit summon so that the multiple summons on my Hero don't all get summoned at once. that is a different way of doing it, and would be a bit of work, damn, was hoping not to have to redo all my summons for about the fifth time.
 

Hildagarn

Member
Reaction score
20
No, you based 3 summons on summon bear.....there is a way to fix that if you don't want them to summon at the same time
what you do for that is base the ability on the condition to like thunder clap, but remove the model dmg, stun,ect..then have a dummy unit cast the ability
 

camatrix87

New Member
Reaction score
0
No, you based 3 summons on summon bear.....there is a way to fix that if you don't want them to summon at the same time
what you do for that is base the ability on the condition to like thunder clap, but remove the model dmg, stun,ect..then have a dummy unit cast the ability

LOL, sorry, no I did not base them all on summon bear, that is what I was saying. I have them based on all different thing since only one can summon a unit, then when the spell button is pressed again to summon, will the old unit disappear and the new one stay. This is what i am trying to do to the other two summons. I do not have a problem with multiple summons because I based the summons on the same summons set (i.e. all the are not on bear, one summons is on summon Misha, one is on summon water elemental, and one is on summon quilbeast)
 

DuckieKing

Elitist Through and Through
Reaction score
51
For what he wants, he cannot create a new dummy unit with the spell based off Summon Bear. Each cast by the player's unit would create a new dummy with another set of summons, leaving him with the same problem as if he based it on water elemental.

I see two ways you can do this. One, written in GUI, would have a maximum of one summoner unit per player (unless you want to put in a lot of work, in which case you'd might as well skip this option). The other is in vJass.

GUI: Create a unit group array. Add your summoner unit to the unit group with the index of the owning player's number. Base a new spell off of channel, and create a trigger that catches when that spell is cast. The new trigger will check if there is a unit of the type being summoned already in the casting player's unit group, remove it if there is, and summon the unit.

vJass: Same thing but use a struct attached to the summoner unit instead of a global unit group.
 

Hildagarn

Member
Reaction score
20
LOL, sorry, no I did not base them all on summon bear, that is what I was saying. I have them based on all different thing since only one can summon a unit, then when the spell button is pressed again to summon, will the old unit disappear and the new one stay. This is what i am trying to do to the other two summons. I do not have a problem with multiple summons because I based the summons on the same summons set (i.e. all the are not on bear, one summons is on summon Misha, one is on summon water elemental, and one is on summon quilbeast)

Still, if you do it the last way i posted, you can only have 1 of each of the summons out
 

Bloodcount

Starcraft II Moderator
Reaction score
297
The problem that I am trying to solve is that my hero has 3 summoning spells, each summons something completely different. The summon Bear would summon multiple bears, as many bears as i press the spell button for. the same thing happens with Summon Water Elemental. If i was to try and reuse Summon Misha or even Summon Feral Spirit, both spells would summon at the same time. The timed bit I am not really worried about right now, again, it is the multiple summons that I am worried about.

this is of course unless I misunderstood you, sorry, was a little hard to follow what you were saying.

Dude modify thebeatmasters 3 spells, he has 3 summoning spells, each one replaising.
 

vypur85

Hibernate
Reaction score
803
Code:
Summon
 Events
  [B]Unit - A unit Spawns a summoned unit[/B]
 Conditions
  (Number of living (Unit-type of (Summoned unit)) units owned by (Owner of (Summoning unit))) Greater than 1
 Actions
  Unit - Remove (Summoned unit) from the game

Try the above. Not sure if it works. Your trigger didn't work because there's no 'Summoned/Summoning unit' event response for 'A unit starts the effect of an ability'.
 

camatrix87

New Member
Reaction score
0
Code:
Summon
 Events
  [B]Unit - A unit Spawns a summoned unit[/B]
 Conditions
  (Number of living (Unit-type of (Summoned unit)) units owned by (Owner of (Summoning unit))) Greater than 1
 Actions
  Unit - Remove (Summoned unit) from the game

Try the above. Not sure if it works. Your trigger didn't work because there's no 'Summoned/Summoning unit' event response for 'A unit starts the effect of an ability'.

The problem with this is that is will take the one that was just summoned, and remove him, not the oldest summoned unit. that was the reason I was also not doing an Event on when a unit spawns a summoned unit in the code you saw before. Thanks though for the help, but yeah, I already tried this one.
 

camatrix87

New Member
Reaction score
0
Dude modify thebeatmasters 3 spells, he has 3 summoning spells, each one replaising.

the problem with this is that the Beastmaster only has the summon Misha that the oldest unit disappears and the new summons stays. The quilbeast summon is based on the same as the regular quilbeast and will spawn as many units as you click on the button. the summon Hawk is also just like the summon eagle and summon water elemental in that it will also spawn as many units as you click on the button. The reason it works so well for the beastmaster is because his cooldown times are in sync with his spawned units timer.
 

camatrix87

New Member
Reaction score
0
If I try and use summon Beatles (the ones from crypt lord), I have to have corpses nearby to spawn a unit and the old ones wont go away but stay until they die. That is also something I have found out. I guess I would say from the code I gave to you, the biggest problem is having the computer recognize that the old summons is still there and that that old summons is the one that I want to go away. This is a nice map, and is a little old as I have been working on it for a long time (when I get the chance). I was hoping I could work through this but haven't gotten very far.
 

vypur85

Hibernate
Reaction score
803
Code:
Summon
 Events
  Unit - A unit Spawns a summoned unit
 Conditions
  Unit-type of (Summoned unit) Equal to YourUnitType
 Actions
  If then else actions
     Condition
       (Number of living (Unit-type of (Summoned unit)) units owned by (Owner of (Summoning unit))) Greater than 1
     Then - Actions
       Set Temp_Group = (Units in (Playable map area) matching (Unit-type of (Matching unit) Equal to (Unit-type of (Summoned unit) and (Custom value for (Matching unit)) Equal to 1))
       Unit Group - Pick every unit in Temp_Group and do multiple actions
         Loop - Actions
            Unit - Remove (Picked unit) from the game
     Else - Actions
  Unit - Set custom value of (Summoned unit) to 1

Something like the above might work.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top