Two custom summoning spells

streng

Member
Reaction score
1
I have a problem with creating summoning hero to my map. I add two custom summoning abilities to hero. First sumon wolf and second summon ghost. Wolf is melee unit and ghost is a ranged unit. I want to allow only one unit type can be sumoned at the same time. When wolf is summoned you cant summon ghost, or when wolf is summoned you can summon ghost but replace wolf. Is possible to base it on any spell ? Or i must write triger?
When I based this spells to feral spirit coldowns are same , but summon wolf and ghost at once
 

Zorobay

Member
Reaction score
1
I am pretty sure that it cannot be done with a normal spell. I made almost the exact same thing for my map. You will have to use triggers. You can probably use two boolean variables, something like:

wolfIsSummoned and ghostIsSummoned

event (user starts the effect of an ability)
condition (ability equals <your ability that summons, let's say the ghost>)
action
if (wolfIsSummoned = false and ghostIsSummoned = false)
"btw, this spell is kind of a dummy spell. It wont do anything on its own. This trigger will do everything."
Summon unit (ghost) at point bla bla
set ghostIsSummoned = true

else if (wolfIsSummoned = true and ghostIsSummoned = false)
do nothing

else if (wolfIsSummoned = false and ghostIsSummoned = true)
do nothing


ALSO you will have to make another trigger, that sets the wolfIsSummoned and ghostIsSummoned to false whenever these units die! Hope this helps. Tell me if you did not understand the triggers, and i will create one in the editor. I am at work right now so...;)
 

streng

Member
Reaction score
1
I trying do this triger , but still canot find some commands. If you have some time can you post it for me ?

Ok My problem Is solved I write this triger:
Code:
Event:
Unit - A unit Spawns a summoned unit
Condition:
(Triggering unit) Equal to (Summoned unit)
Action:
Player - Disable Summon Bear for (Owner of (Triggering unit))
Player - Disable Summon Quilbeast for (Owner of (Triggering unit))
Wait 15.00 seconds
Player - Enable Summon Bear for (Owner of (Triggering unit))
Player - Enable Summon Quilbeast for (Owner of (Triggering unit))
For correctly working need same coldowns for sumon ability for all levels and wait time in triger.
My question is: IS it usable in multiplayer map ? I men when 2 player pick this hero at the same time ?
 
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