Summoning Skill Problems

blurished

Active Member
Reaction score
1
when the spell is clicked, there are 4 possible summoned unit. the trigger i use is as follow:

Spirit Summon
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Spirit Summon ORI
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 4) Equal to 1
Then - Actions
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
Unit - Add Fire Summon to (Last created unit)
Unit - Order (Last created unit) to Orc Far Seer - Feral Spirit
Else - Actions

1st problem because i added the 4 sec generic expiration timer, the summoned unit dispersed out after a few sec. i know it can be solved by making the expiration time = summoned unit time, but i want to know if theres a better way

2nd problem= like stated there are 4 possible summoned unit, but from time to time my unit will just do the skill without running the trigger. suggestion?
 

0WN3D

New Member
Reaction score
15
Spirit Summon
Events
Unit - A unit Begins casting an ability <<< might want to change this into Start the effect of spell
Conditions
(Ability being cast) Equal to Spirit Summon ORI
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 4) Equal to 1 <<< this part is the prob of question 2
Then - Actions
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
Unit - Add Fire Summon to (Last created unit)
Unit - Order (Last created unit) to Orc Far Seer - Feral Spirit
Unit - Add a 4.00 second Generic expiration timer to (Last created unit) Else - Actions

A Possible cause of prob 1 is maybe be the unit has no mana, a long casting time or maybe something else
Prob 2 is due to the fract that 1/4 chance of activating the trigger.
Have more condition liek
Set TempInterger = Random integer number between 1 and 4
TempInterger Equal to 1
TempInterger Equal to 2
TempInterger Equal to 3
TempInterger Equal to 4

And make their action summon ur random unit ^^
 

TomTTT

New Member
Reaction score
44
Exactly what OWN3D said, to clearify your condition, we can also write it this way: "If Number is 1 of 4, then do actions" (means it has a 1/4 chance to appear - 25%) Instead, set all the units to variables, like:
Set Creep[1] = Murloc Tideshunter
Set Creep[2] = Night Wolf
Set Creep[3] = Abomination
Set Creep[4] = Alpha Wolf
And now create the action:
For Each Integer A from 1 to 4 do (Actions)
Loop - Actions
Set tmpPoint = (Position of (Triggering unit))
Unit - Create 1 Creep[(Integer A)] for (Owner of (Triggering unit)) at tmpPoint
---So on, So on---
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Your 1st problem can be solved if you make the ability have 0 casting time, 0 mana cost and no cooldown, and you give the aiblity to the caster, and order the caster to cast it and then remove the ability.

Trigger:
  • Trigger
    • Events
    • Conditions
    • Actions
      • Set Creeps[1] = Footman
      • Set Creeps[2] = Knight
      • Set Creeps[3] = Rifleman
      • Set Creeps[4] = Mortar Team
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Creeps[(Random integer number between 1 and 4)] for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)


This creates a random creep from the 4. The settings of the creeps can be done in a setup trigger during map initialization. Otherwise, you can just use TomTTT's solution.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top