• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Some trigger Questions

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

1) If I want create units in a circle around one (casting) Unit (0,45,90,135,180,225,270,315), normaly I would create 8 actions-triggers wich create the units - how can I create them with 1 or 2 or 3 actions-triggers?

2) Bonus damage. My Fire Mage got 2 abilities. One passive (if he cast a spell - extra damage to target (via trigger)) Now if he cast the other spell (firebolt) the first trigger deals the bonus damage but befor the firebolt reach the target. How can I create the trigger, that the target gets the bonus damage, if the firebolt hits the target.

3) My totem of Wrath. This ability creates on totem (Set Variable - Set Totem = last created Unit). This totem stands for 10 seconds. Each seconds it should do an actions. How can I create a trigger so, that if another player cast the same ability, the first totem doesn't interupt his orders?
 
Level 16
Joined
Jun 25, 2008
Messages
1,043
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set TempPoint[0] = (Position of (Triggering unit))
      • For each (Integer A) from 0 to 7, do (Actions)
        • Loop - Actions
          • Set TempPoint[(Integer A)] = (TempPoint[0] offset by 50.00 towards (45.00 x (Real((Integer A)))) degrees)
          • Unit - Create 1 Footman for (Owner of (Triggering unit)) at TempPoint[(Integer A)] facing TempPoint[0]
          • Custom script: call RemoveLocation(udg_TempPoint[GetForLoopIndexA()])
      • Custom script: call RemoveLocation(udg_TempPoint[0])
for your first question.
 
Level 24
Joined
Feb 28, 2007
Messages
3,479
For the totem, if each player can only have one totem each you could use a unit array.
When a player summons their totem, you would do something like this:
JASS:
local unit u
local integer i = GetPlayerId(GetOwningPlayer(GetCastingUnit))
set u = CreateUnit(GetTriggerPlayer() etc.)
set WrathTotem[i] = u
And then when you want a specific player's totem to do something, you just order, say, WrathTotem[3] (purple) to cast/attack/etc.
 
Status
Not open for further replies.
Top