1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Help with my mod (How to play select and play in a specific area?) :) Thanks

Discussion in 'World Editor Help Zone' started by Sideblade, Aug 18, 2013.

  1. Sideblade

    Sideblade

    Joined:
    Aug 17, 2013
    Messages:
    63
    Resources:
    0
    Resources:
    0
    Has anyone ever played Trolls vs Elves on warcraft3? Well you know at the beginning of a round the host picks an "arena" to play in? I need something like this for my map (there are 4 different areas) how do I do this? THANKS! :goblin_yeah:
     
  2. jonhysone

    jonhysone

    Joined:
    Oct 29, 2012
    Messages:
    1,241
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I don't know if I'm correct but you need to try this :
    This is Init's Trigger to setup regions
    • Initialize Areas
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Set Area[1] = Area 1 <gen>
        • Set Area[2] = Area 2 <gen>
        • Set Area[3] = Area 3 <gen>
        • Set Area[4] = Area 4 <gen>
        • Set Current_Area = Area[1]
        • Set TInteger2 = 1
        • For each (Integer TI) from 1 to 4, do (Actions)
          • Loop - Actions
            • Set Area_Centre_Base[TI] = (Center of Area[TI])
        • Player Group - Pick every player in (All players) and do (Actions)
          • Loop - Actions
            • Camera - Pan camera for (Picked player) to Area_Centre_Base[1] over 0.00 seconds

    This is changing to the next area
    • Next Area
      • Events
        • Player - Player 1 (Red) Presses the Right Arrow key
      • Conditions
      • Actions
        • Set TInteger2 = (TInteger2 + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • TInteger2 Equal to 5
          • Then - Actions
            • Set TInteger2 = 1
          • Else - Actions
        • Player Group - Pick every player in (All players) and do (Actions)
          • Loop - Actions
            • Cinematic - Fade out over 0.50 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
            • Camera - Pan camera for (Picked player) to Area_Centre_Base[TInteger2] over 0.00 seconds
            • Cinematic - Fade in over 0.20 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency

    Previous Area
    • Previous Area
      • Events
        • Player - Player 1 (Red) Presses the Left Arrow key
      • Conditions
      • Actions
        • Set TInteger2 = (TInteger2 - 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • TInteger2 Equal to 0
          • Then - Actions
            • Set TInteger2 = 4
          • Else - Actions
        • Player Group - Pick every player in (All players) and do (Actions)
          • Loop - Actions
            • Cinematic - Fade out over 0.50 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
            • Camera - Pan camera for (Picked player) to Area_Centre_Base[TInteger2] over 0.00 seconds
            • Cinematic - Fade in over 0.20 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency

    Applying Area
    • Choose Area
      • Events
        • Player - Player 1 (Red) Presses the Up Arrow key
      • Conditions
      • Actions
        • Trigger - Run Start Playing <gen> (checking conditions)


    NOTE : Well this works only with Player 1 . There is a system that detects host . But there is 50 % chance to miss host .
    NOTE 2 : When A Player presses Up arrow key . Your triggers must run which I didn't mention .
     
  3. Sideblade

    Sideblade

    Joined:
    Aug 17, 2013
    Messages:
    63
    Resources:
    0
    Resources:
    0
    Ok cool looks good :) Where can I get and how do I install it? Or do I do it all by hand?
     
  4. jonhysone

    jonhysone

    Joined:
    Oct 29, 2012
    Messages:
    1,241
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Hmm if you mean 'Host detector' then take a look at this link
    http://www.wc3c.net/showthread.php?t=86119

    Also , Create a variable named Host , type Player , No-Arrayed. In Map Initialization, Add these triggers in case you applied 'Host detector' :
    • Melee Initialization
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Trigger - Add to Next Area <gen> the event (Player - Host Presses the Right Arrow key)
        • Trigger - Add to Previous Area <gen> the event (Player - Host Presses the Left Arrow key)
        • Trigger - Add to Choose Area <gen> the event (Player - Host Presses the Up Arrow key)
     
  5. Mythic

    Mythic

    Media Manager

    Joined:
    Apr 24, 2012
    Messages:
    7,875
    Resources:
    107
    Models:
    91
    Icons:
    5
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    107
    Use dialogs. Arrow Keys for Selection? Eh.

    • Dialog Display
      • Events
        • Time - Elapsed game time is 0.50 seconds
      • Conditions
      • Actions
        • Dialog - Clear Dialog[0]
        • Dialog - Change the title of Dialog[0] to Select Arena Region
        • Dialog - Create a dialog button for Dialog[0] labelled |caaffcc00Echo Isle...
        • Set DialogButton[0] = (Last created dialog Button)
        • Dialog - Create a dialog button for Dialog[0] labelled |caaffcc00Darkspear...
        • Set DialogButton[1] = (Last created dialog Button)
        • Dialog - Show Dialog[0] for Host


    • Init Hero
      • Events
        • Dialog - A dialog button is clicked for Dialog[0]
      • Conditions
      • Actions
        • Cinematic - Fade in over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Clicked dialog button) Equal to DialogButton[0]
          • Then - Actions
            • Set ArenaImpathables[0] = EchoImpath2 <gen>
            • Set ArenaImpathables[1] = EchoImpath <gen>
            • Set ArenaRegion = Echo Isles <gen>
            • Set ArenaSafe = EchoSafe <gen>
          • Else - Actions
        • Wait 1.00 seconds
        • Player Group - Pick every player in (All players matching ((Matching Player controller equal to Computer) or (Matching Player controller equal to User)) and do (Actions)
          • Loop - Actions
            • Set TempPoint = (Random point in ArenaRegion)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Or - Any (Conditions) are true
                  • Conditions
                    • (ArenaImpathables[0] contains ArenaPoint) Equal to True
                    • (ArenaImpathables[1] contains ArenaPoint) Equal to True
              • Then - Actions
                • Custom script: call RemoveLocation(udg_TempPoint)
                • Set TempPoint = (Random point in ArenaSafe)
              • Else - Actions
            • Unit - Create 1 (Unit) for (Picked player) at TempPoint facing Default building facing degrees
            • Custom script: call RemoveLocation(udg_TempPoint)


    The example arena is 'EchoIsles'. In case there are impathables and you don't want your units stuck, set the Impathables to a region in the map.
     
    Last edited: Aug 19, 2013
  6. jonhysone

    jonhysone

    Joined:
    Oct 29, 2012
    Messages:
    1,241
    Resources:
    1
    Maps:
    1
    Resources:
    1
    He knows about dialog . But he wants it same like Troll vs Elves , By arrows . Dialog's idea is good . But he wants arrows only .
    Also using an arrayed dialog is completely useless >.> . Why not remove that array ? :p
    Also may I ask? Why all units controlled by 'Computer' and why 0 arrays O_O? Don't they cause Desync or whatever it's named?
     
  7. Mythic

    Mythic

    Media Manager

    Joined:
    Apr 24, 2012
    Messages:
    7,875
    Resources:
    107
    Models:
    91
    Icons:
    5
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    107
    If he wanted multiple dialogs. For example, [0] is for area selection and [1] is for difficulty etc.
    What causes desync? Oh and yeah about the Computer forgot about that. Should be 'or'.
     
  8. Sideblade

    Sideblade

    Joined:
    Aug 17, 2013
    Messages:
    63
    Resources:
    0
    Resources:
    0
    I cant find the Set area action.............. ??? :?
     
  9. Mythic

    Mythic

    Media Manager

    Joined:
    Apr 24, 2012
    Messages:
    7,875
    Resources:
    107
    Models:
    91
    Icons:
    5
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    107
    Set RegionVariable.
     
  10. Sideblade

    Sideblade

    Joined:
    Aug 17, 2013
    Messages:
    63
    Resources:
    0
    Resources:
    0
  11. Mythic

    Mythic

    Media Manager

    Joined:
    Apr 24, 2012
    Messages:
    7,875
    Resources:
    107
    Models:
    91
    Icons:
    5
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    107
    Oh right. The answer is.. no. Have you desync'd while trying that?
     
  12. jonhysone

    jonhysone

    Joined:
    Oct 29, 2012
    Messages:
    1,241
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I really don't know when a thing deysnc's or WHATEVER! . Is there a way to know this?
     
  13. jonhysone

    jonhysone

    Joined:
    Oct 29, 2012
    Messages:
    1,241
    Resources:
    1
    Maps:
    1
    Resources:
    1
    To select an area , Add these actions :
    • Cinematic - Enable user control for (All players)
    • Floating Text - Destroy (Last created floating text)
    • For each Variable TempInteger from 1 to Elves, do (Actions)
      • Loop - Actions
        • Unit - Create 1 Priest for Player(TempInteger) at StartPoint[(Player number of (Player(TempInteger))] facing Default building facing degrees
        • Custom script: call RemoveLocation(udg_StartPoint[udg_TempInteger])
        • Camera - Set Player(TempInteger)'s camera Angle of attack to 305.00 over 0.00 seconds
    • For each Variable TempInteger from 1 to Trolls, do (Actions)
      • Loop - Actions
        • Unit - Create 1 Troll for Player(TempInteger) at StartPoint[(Player number of (Player(TempInteger)))] facing Default building facing degrees
        • Unit - Hide (Last created unit)
        • Custom script: call RemoveLocation(udg_StartPoint[udg_TempInteger])
        • Camera - Set Player(TempInteger)'s camera Angle of attack to 305.00 over 0.00 seconds
     
  14. Mythic

    Mythic

    Media Manager

    Joined:
    Apr 24, 2012
    Messages:
    7,875
    Resources:
    107
    Models:
    91
    Icons:
    5
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    107
    Why hide the Troll?
     
  15. jonhysone

    jonhysone

    Joined:
    Oct 29, 2012
    Messages:
    1,241
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Hide it till Elves run , The game start timer finishes then the troll will be unhidden .
     
  16. Sideblade

    Sideblade

    Joined:
    Aug 17, 2013
    Messages:
    63
    Resources:
    0
    Resources:
    0
    I think I figured out how to make the select area action.... :) So now I'm pretty sure I can make use of these resources :) Thanks guys
     
  17. Mythic

    Mythic

    Media Manager

    Joined:
    Apr 24, 2012
    Messages:
    7,875
    Resources:
    107
    Models:
    91
    Icons:
    5
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    107
    Which one?
     
  18. jonhysone

    jonhysone

    Joined:
    Oct 29, 2012
    Messages:
    1,241
    Resources:
    1
    Maps:
    1
    Resources:
    1
    For each integer , Actions....First lines ..~_~
     
  19. Sideblade

    Sideblade

    Joined:
    Aug 17, 2013
    Messages:
    63
    Resources:
    0
    Resources:
    0
    Hmmmm.... I have a problem..... when I press an arrow key (left or right key) it jumps to the area it started on and wont go to the other areas... any ideas? :vw_wtf:
     
  20. jonhysone

    jonhysone

    Joined:
    Oct 29, 2012
    Messages:
    1,241
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Did you make sure that the variable is increasing? Or whatever , Did you store regions into variables and points else?