• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Summoning Spell

Status
Not open for further replies.
Level 3
Joined
Dec 26, 2004
Messages
43
Hi, I wanted to create an ability that could summon a ''random'' creature from a pre-determined selection.

If for instance I use the spell, i could have 20% chance to summon this creature, 20% chance to summon that creature, etc...
Is it do'able without Jass ? Thx ...

Could somebody give me advice ?
 
Level 11
Joined
Jun 20, 2009
Messages
880
  • Summon
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Feral Spirit
    • Actions
      • Set SummonType = (Random integer number between 1 and 10)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SummonType Equal to 1
        • Then - Actions
          • Unit - Create 1 Fire Element DUMMY for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Far Seer - Feral Spirit
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SummonType Equal to 2
        • Then - Actions
          • Unit - Create 1 Summon Bear DUMMY for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Far Seer - Feral Spirit
        • Else - Actions
Now both of these will have 10% to be summoned. Just give Feral Spirit -based spell to these dummy units and edit them like you want.
 
I think both of yours are forgetting something - they both leak

  • Ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon
    • Actions
      • Set variable (Temp_Point) = (Position of (Casting unit))
      • Unit - Create 1 Summon_units[(Random integer number between 1 and 5)] for (Owner of (Casting unit)) at (Temp_Point) facing Default building facing degrees
      • Custom script - Call Removelocation (Udg_Temp_Point)
      • Unit - Add a 60.00 second Generic expiration timer to (Last created unit)
That should fix it :p
 
Status
Not open for further replies.
Top