• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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,480
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