• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Spell variable store use ?

Status
Not open for further replies.
Level 7
Joined
May 18, 2010
Messages
264
  • Wolfs Roar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |cffff0000Wolf's Roar|r
    • Actions
      • Set WR_cast = (Casting unit)
      • Set WR_Point = ((Position of (Casting unit)) offset by 150.00 towards (Facing of (Casting unit)) degrees)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 10) Greater than or equal to ((Level of |cffff0000Wolf's Roar|r for WR_cast) + 5)
        • Then - Actions
          • Unit - Create 1 Spirit Wolf (Level 1) for (Owner of WR_cast) at (WR_Point offset by (0.00, 0.00)) facing (Position of (Triggering unit))
        • Else - Actions
can u show me how to make this for like
level of WR_cast unit's level of spell = whyc wolf creates (spirit wolf(level1) level 2 level3 - to 5 ?i cant figure it out pls
i h8 to make 200 triggers for a such simple thing that i know can be shorthend
 
Level 7
Joined
May 18, 2010
Messages
264
Please describe your problem a bit more and btw you leak a location, twice.

Yes im quite avare of that
I wana make a spell
i got 5 lvls of my spell and 5 wolfs units wana make a trigget to check
level of my spell and to make a wolf it lvl.
exzample
spell casted is lvl 3
i wana make wolf level 3. get it?
 
It is probably most efficient to have a trigger like this with a Unit-type variable array:
  • Lala
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Set WolfType[1] = Spirit Wolf (Level 1)
      • Set WolfType[2] = Spirit Wolf (Level 2)
      • Set WolfType[3] = Spirit Wolf (Level 3)
      • Set WolfType[4] = Spirit Wolf (Level 4)
      • Set WolfType[5] = Spirit Wolf (Level 5)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
Then you can make your spell look something like this:
  • Wolf Roar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |cffff0000Wolf's Roar|r
    • Actions
      • Set WR_Point1 = Position of (Triggering unit)
      • Set WR_Point2 = WR_Point1 offset by 150.00 towards (Facing of WR_cast) degrees
      • Unit - Create 1 WolfType[(Level of (|cffff0000Wolf's Roar|r) for (Triggering unit))] at WR_Point2 facing WR_Point1
      • Custom script: call RemoveLocation(udg_WR_Point1)
      • Custom script: call RemoveLocation(udg_WR_Point2)
:)
 
Level 7
Joined
May 18, 2010
Messages
264
Custom script: call DestroyTrigger(GetTriggeringTrigger())
whats this one for ? destojing that triger?

But THX Much +rep to ya all
 
Level 7
Joined
May 18, 2010
Messages
264
Wolfs Roar
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to |cffff0000Wolf's Roar|r
Actions
Set WR_cast = (Casting unit)
Set WR_Point = ((Position of (Casting unit)) offset by 150.00 towards (Facing of (Casting unit)) degrees)
Unit - Create (Random integer number between 1 and 3) WOLF[(Level of |cffff0000Wolf's Roar|r for WR_cast)] for (Owner of WR_cast) at (WR_Point offset by (0.00, 0.00)) facing WR_Point
will the random intiget 1-3 wolfs work?
 
Status
Not open for further replies.
Top