• 🏆 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!

regions

Status
Not open for further replies.
Level 6
Joined
Jan 29, 2010
Messages
213
Hi all.I need some help I stucked in one place:

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • (Unit-type of (Triggering unit)) Equal to Footman
    • (position of (Triggering unit)) equal to (center of (region[(Integer A)])
    • Actions

If that's impossible write down here I'll understand that then... :vw_unimpressed:
 
Level 6
Joined
Jan 29, 2010
Messages
213
thenks:)) but now other problem.

a5|b5
a4|b4
a3|b3
a2|b2
a1|b1

regions.jpg


Imagine that footman can stand in any of this regions. he can go only forward 1region. If you'll select him than in next region before him will appier footmen with "corporeal form" and some kind of aura ability with no effect just to show where your footman can go (if you select other unit, that unit witch was last created will be removed). footmen will have skill with arrow image named move. If you cast that skill on last created unit, than last created unit will be removed ftom the game and footman goes to region where last created unit where standing.
 
Level 6
Joined
Jan 29, 2010
Messages
213
No. I need only regions like:
how to get region forward to unit like:
  • Selection
    • Events
      • Player - Player [Integer A] Selects a unit
    • conditions
      • If (unit type of (footman)) stands in region a1 than
    • Actions
      • set a1 = a1+1 <=a2>
      • Pick every unit in center of a1 and do (multiple actions)
        • Loop actions
          • If (All conditions are true) then do (Actions) else do (Actions)
            • If - Conditions
              • unit type of picked unit equal to 0
            • Then - Actions
              • unit - create 1 footman in center of <a2> for (owner of (triggering unit))
            • Else - Actions
              • Do nothing
  • Movement
    • Events
      • Unit stars casting an ability
    • Conditions
      • Ability being cast equal to move
      • (Unit type of(targeted unit)) equal to footman
    • Actions
      • If (All conditions are true) then do (Actions) else do (Actions)
        • If - Conditions
          • (Owner of (targeted unit)) equal to (player1(red))
        • Then - Actions
          • Unit - Order (unit type of(casting unit)) move to (position of (targeted unit))
          • Unit - remove (targeted unit) from the game
        • Else - Actions
          • Do nothing
 
Last edited:
Level 13
Joined
Oct 25, 2009
Messages
995
No. I need only regions like:
how to get region forward to unit like:
  • Selection
    • Events
      • Player - Player [Integer A] Selects a unit
    • conditions
      • If (unit type of (footman)) stands in region a1 than
    • Actions
      • set a1 = a1+1 <=a2>
      • Pick every unit in center of a1 and do (multiple actions)
        • Loop actions
          • If (All conditions are true) then do (Actions) else do (Actions)
            • If - Conditions
              • unit type of picked unit equal to 0
            • Then - Actions
              • unit - create 1 footmen in center of <a2> for (owner of (triggering unit))
            • Else - Actions
              • Do nothing
  • Movement
    • Events
      • Unit stars casting an ability
    • Conditions
      • Ability being cast equal to move
      • (Unit type of(targeted unit)) equal to footman
    • Actions
      • If (All conditions are true) then do (Actions) else do (Actions)
        • If - Conditions
          • (Owner of (targeted unit)) equal to (player1(red))
        • Then - Actions
          • Unit - Order (unit type of(casting unit)) move to (position of (targeted unit))
          • Unit - remove (targeted unit) from the game
        • Else - Actions
          • Do nothing

Order target?
Remove target?==
u dun have create a dummy or no need==
 
Level 6
Joined
Jan 29, 2010
Messages
213
Ok I see no one can't understand I'll give you easier way :/
I need only one thing:
if selected unit stands in region named "IntegerA" than "IntegerA+1", pick every unit in region "IntegerA+1" "If picked unit equal to 0 than, order to move selected unit to that region... (like: selected unit stands in region 4, "4+1(=5)", pick every unit in region 5, If picked unit equal to = 0 than, Order slected unit to move to region 5).
 
Level 12
Joined
Apr 16, 2010
Messages
584
I think i got it and i hope its right.
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set Region[1] = No region
      • Set Region[2] = No region
      • Set Region[3] = No region
      • Set Region[4] = No region
      • Set Region[5] = No region
      • Set Region[6] = No region
      • Set Region[7] = No region
      • Set Region[8] = No region
      • Set Region[9] = No region
      • Set Region[10] = No region
      • 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
              • (Region[(Integer A)] contains (Triggering unit)) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in (Units in Region[(Integer A)] matching ((Region[(Integer A)] contains (Triggering unit)) Equal to True)) and do (Actions)
                • Loop - Actions
                  • -------- your actions --------
            • Else - Actions
 
Status
Not open for further replies.
Top