• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[Trigger] How to skip an animation?

Status
Not open for further replies.
Level 5
Joined
Oct 9, 2008
Messages
134
how can i do, when RED press for example " up " during a animation, the animation finish?

for now i have this xD
  • Events
    • Player - Player 1 (Red) Presses the Up Arrow key

edit: another question:

is this right?

  • Ai move1
    • Events
      • Time - Elapsed game time is 120.00 seconds
    • Conditions
      • (Player 2 (Blue) controller) Equal to Computer
      • (Player 3 (Teal) controller) Equal to Computer
      • (Player 4 (Purple) controller) Equal to Computer
      • (Player 5 (Yellow) controller) Equal to Computer
      • (Player 6 (Orange) controller) Equal to Computer
      • (Player 7 (Green) controller) Equal to Computer
      • (Player 8 (Pink) controller) Equal to Computer
      • (Player 9 (Gray) controller) Equal to Computer
      • (Player 10 (Light Blue) controller) Equal to Computer
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Position of Uber Immortal (Giant) 0519 <gen>)


Last question,

when a player leave the game, i wanna put her units in control of a pc ( not in control of another player! )
like in the map castle fight.

Plz this is really important to my map... i wait for response
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
First question:

does this action meet your requirements?
  • Animation - Play (Last created unit)'s stand animation
I believe it will stop it's animation and play the standard one.

Second question: yes... and no :p
You didn't remove the leaks and the trigger causes lag because of that.

  • AI Move 1
    • Events
      • Time - Elapsed game time is 120.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) controller) Equal to Computer
            • Then - Actions
              • Set Group = (Units in (Playable map area) owned by (Player((Integer A))))
              • Unit Group - Pick every unit in Group and do (Actions)
                • Loop - Actions
                  • Set Loc = (Position of Uber Immortal (Giant) 0519 <gen>)
                  • Unit - Move (Picked unit) instantly to Loc
              • Custom script: call DestroyGroup(udg_Group)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_Loc)
I've done it like this, because you probably have other triggers that run after 120 seconds, now you can add them all in 1 trigger, like this ^^

Erm... I've got an idea bout your last question, but it'll take some time and there might be easier solutions ^^
This is the first thing that pops into my head, sorry for that :D

Whenever a player leaves, set a boolean variable (I call it "PlayerLeft") with the array = 'player number of leaving player' to true.
Then you've got a constant looping trigger (your AI-trigger) which creates a loop from 1 to 12 (number of players in your map).

If "PlayerLeft[Integer A]" is true, then do your AI-commands, otherwise do nothing (don't even set the "Do Nothing" command, leave it blank :p).

For example:

  • Example
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerLeft[(Integer A)] Equal to True
            • Then - Actions
              • Set Group = (Units in (Playable map area) owned by (Player((Integer A))))
              • Unit Group - Pick every unit in Group and do (Actions)
                • Loop - Actions
                  • Set Loc = (Center of (Attack-Area))
                  • Unit - Order (Picked unit) to Attack-Move To (Center of (Playable map area))
              • Set Group = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Player((Integer A)))) and ((Unit-type of (Matching unit)) Equal to Footman)))
              • Unit Group - Pick every unit in Group and do (Actions)
                • Loop - Actions
                  • Set Loc = (Center of (Build-Area))
                  • Unit - Order (Picked unit) to build a Barracks at Loc
              • Unit - Order (Barracks) to train/upgrade to a Footman
            • Else - Actions
      • Custom script: call RemoveLocation(udg_Loc)
      • Custom script: call DestroyGroup(udg_Group)
I hope I've done everything right... I've done it in a hurry, but it should be about correct :p


allright, now I have a favour to ask of you...
This sounds nooby and lame, but...
click my dragons in my signature, please :cute: (ctrl + click them so you don't lose any time ^^)
 
Level 5
Joined
Oct 9, 2008
Messages
134
already clicked. xD
already give +rep.


and i will click every day you dragons but plz help me a little more xD
about the anymation skipe, i talk about the animation mode, no a unit animation.

about the second question: THANKS i try it but i have a problem..
  • AI move
    • Events
      • Time - Elapsed game time is 120.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to Computer
            • Then - Actions
              • Set Group = (Units in (Playable map area) owned by (Picked player))
              • Unit Group - Pick every unit in Group and do (Actions)
                • Loop - Actions
                  • Set loc = (Position of Uber Immortal (Giant) 0519 <gen>)
                  • Unit - Order (Picked unit) to Attack-Move To loc
              • Custom script: call DestroyGroup(udg_Group)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_loc)
if you see, i cant put this part:
  • If - Conditions
  • ((Player((Integer A))) controller) Equal to Computer
how can i do it?



3 question:
i dont underesting, sorry xD
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
already clicked. xD
already give +rep.
Thanks :D
if you see, i cant put this part:
  • If - Conditions
  • ((Player((Integer A))) controller) Equal to Computer
how can i do it?
It's a player controller comparison, instead of "Picked Player", or "Matching Player", select "Conversion - Convert player index to player" and set that to "for loop Integer A"


3 question:
i dont underesting, sorry xD

So, you've got this trigger, right?
  • player leaves
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
      • Player - Player 4 (Purple) leaves the game
      • Player - Player 5 (Yellow) leaves the game
      • Player - Player 6 (Orange) leaves the game
      • Player - Player 7 (Green) leaves the game
      • Player - Player 8 (Pink) leaves the game
      • Player - Player 9 (Gray) leaves the game
      • Player - Player 10 (Light Blue) leaves the game
    • Conditions
    • Actions
      • Set PlayerLeft[(Player number of (Triggering player))] = True
(it's just to show the action actually).

Then you can create an AI-trigger (I gave an example-trigger, I don't know how to explain it otherwise...).
Erm... what do you want the AI to do?

Edit: whow, forgot to answer the second question xD
 
Level 5
Joined
Oct 9, 2008
Messages
134
apoca, 1 qestion, in the cinematic skip, wath do you press to skip? =P




also here is a problem:
  • Giantshow
    • Events
      • Unit - Uber Immortal (Giant) 0519 <gen> Is attacked
    • Conditions
    • Actions
      • Set Cinematic = True
      • Unit - Pause all units
      • Cinematic - Turn cinematic mode On for (All players)
      • If (Cinematic Equal to False) then do (Skip remaining actions) else do (Do nothing)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Apply Camera 003 <gen> for (Picked player) over 0.00 seconds
          • Camera - Lock camera target for (Picked player) to Uber Immortal (Giant) 0519 <gen>, offset by (0.00, 0.00) using Default rotation
      • Set Duration = 5.00
      • Cinematic - Send transmission to (All players) from Uber Immortal (Giant) 0519 <gen> named Uber Immortal (Gian...: Play GruntYesAttack1 <gen> and display Time for Killing....... Modify duration: Set to Duration seconds and Wait
      • If (Cinematic Equal to False) then do (Skip remaining actions) else do (Do nothing)
      • Wait 2.00 game-time seconds
      • Animation - Play Uber Immortal (Giant) 0519 <gen>'s spell animation
      • If (Cinematic Equal to False) then do (Skip remaining actions) else do (Do nothing)
      • Wait 3.00 game-time seconds
      • If (Cinematic Equal to False) then do (Skip remaining actions) else do (Do nothing)
      • Cinematic - Turn cinematic mode Off for (All players)
      • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Gate1 <gen>) over 1.00 seconds
      • Set Cinematic = False
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Apply Camera 008 <gen> for (Picked player) over 0.00 seconds
      • Set loc = (Center of Event1 <gen>)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Archer for Player 11 (Dark Green) at loc facing Default building facing degrees
          • Unit - Make (Last created unit) Vulnerable
      • Custom script: call RemoveLocation(udg_loc)
      • Unit - Unpause all units
      • Trigger - Turn off (This trigger)


in this part, i need create 5 archers in one location and 5 in other..
the trigger only create 1 archer.. so dont do nothing ^^

  • Set loc = (Center of Event1 <gen>)
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Unit - Create 1 Archer for Player 11 (Dark Green) at loc facing Default building facing degrees
      • Unit - Make (Last created unit) Vulnerable
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Press escape to skip, I thought that was obvious xD

Erm... try "For each (Integer B)", sometimes the loops are messed up if there are multiple loops at the same time :/
If that doesn't work, I'll create a small JASS-loop for it ^^

I thought you had to create 10 archers at the same position, though :eek: (I probably didn't look good).
Then do for loop integer B from 1 to 5 and do the same as my trigger, but copy/paste the loop-triggers and set loc to your position after the first actions.
Mehh, I hope you understand it :p
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
It should be about this ^^
  • For each (Integer B) from 1 to 5, do (Actions)
    • Loop - Actions
      • Set loc = (Center of Event1 <gen>)
      • Unit - Create 1 Archer for Player 11 (Dark Green) at loc facing Default building facing degrees
      • Unit - Make (Last created unit) Vulnerable
      • Set loc = (Center of Other Region)
      • Unit - Create 1 Archer for Player 11 (Dark Green) at loc facing Default building facing degrees
      • Unit - Make (Last created unit) Vulnerable
That should create 5 units at Event1 and 5 units at the other region (why make them vulnerable, actually? Shouldn't it be invulnerable? ^^)
 
Status
Not open for further replies.
Top