• 🏆 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] Multiple action in same time

Status
Not open for further replies.
Level 10
Joined
Feb 20, 2008
Messages
448
This is probly my noobest question XD,

How can i execute 3 axction at same time

exemple in this trigger i create 3 dummy, but i want hose 3 dummy appear at same time >.>
  • slam
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Sakura Power Slam
    • Actions
      • Set SAKR[0] = (2.00 x ((Real((Level of Sakura Power Slam for (Casting unit)))) x (Real((Strength of (Casting unit) (Exclude bonuses))))))
      • Set SakT[1] = (Position of (Casting unit))
      • Set UNITGRUP[31] = (Units within 500.00 of SakT[1] matching (((Matching unit) belongs to an enemy of Player 2 (Blue)) Equal to True))
      • Unit - Create 1 Detonate for Player 2 (Blue) at SakT[1] facing Default building facing degrees
      • Animation - Change SakT2[0]'s animation speed to 400.00% of its original speed
      • Unit - Add a 0.50 second Generic expiration timer to (Triggering unit)
      • Set SakT2[0] = (Last created unit)
      • Unit - Create 1 dummy Clap for Player 2 (Blue) at SakT[1] facing Default building facing degrees
      • Set SakT2[1] = (Last created unit)
      • Unit - Create 1 Dummy power up for Player 2 (Blue) at SakT[1] facing Default building facing degrees
      • Set SakT2[2] = (Last created unit)
      • Unit Group - Add SakT2[0] to UNITGRUP[31]
      • Unit Group - Add SakT2[1] to UNITGRUP[31]
      • Unit Group - Add SakT2[2] to UNITGRUP[31]
      • Environment - Create a 3.00 second wave deformation from SakT[1] to SakT[1] with radius 500.00, depth 128.00, and a 0.20 second trailing delay
      • Unit Group - Pick every unit in UNITGRUP[31] and do (Unit - Cause Caster_Unit to damage (Matching unit), dealing SAKR[0] damage of attack type Spells and damage type Normal)
      • Wait 2.00 seconds
      • Animation - Change SakT2[0]'s animation speed to 100.00% of its original speed
      • Unit Group - Pick every unit in UNITGRUP[31] and do (Unit - Remove (Picked unit) from the game)
      • Custom script: call RemoveLocation(udg_SakT[1])
      • Set SAKR[0] = 0.00
 
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Units[1] = Detonate
    • Set Units[2] = dummy Clap
    • Set Units[3] = Dummy power up
The Units variable is "Unit-type", with array.

  • slam
  • Events
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 3
      • Loop - Actions
        • Unit - Create 1 Units[IntegerA] at ....
This is not the whole trigger, this is just the action to make those 3 unit types appear at the same time.
 
Level 4
Joined
May 16, 2009
Messages
61
  • slam
  • Events
  • Conditions
  • Actions
  • For each (Integer A) from 1 to 3
  • Loop - Actions
  • Unit - Create 1 Units[IntegerA] at ....
  • Unit - Set Expiration timer for last created unit....
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
It appears at the same time with a loop, seriously.

I have just tested it:

I started a loop (another trigger) that adds +1 to an integer every 0.01 second before the action was executed.
After the action, I stopped that loop and immeadiately showed the integer from the loop to the player.

Time elapsed: 0.00 seconds

That should be enough proof that they appear at the same moment.
(Other tests provide enough good info that it was a reliable test).

This is what should be inside the loop:

  • loop actions
  • For each (Integer A) from 1 to 2, do (Actions)
    • Loop - Actions
      • Unit - Create 1 dummy Clap for Player 2 (Blue) at SakT[1] facing Default building facing degrees
      • Set SakT2[Integer A] = (Last created unit)
      • Unit Group - Add SakT2[Integer A] to UNITGRUP[31]
But this has been said twice before... you probably just mesed something up.
 
Status
Not open for further replies.
Top