1. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  2. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice
  3. Melee Mapping Contest #3 - Results are out! Congratulate the winners and check plenty of new 4v4 melee maps designed for this competition!
    Dismiss Notice
  4. The winners of our cinematic soundtrack competition have been decided! Step by the Music Contest #11 - Results to check the entries and congratulate the winners!
    Dismiss Notice

Creating a Event - All Regions

Discussion in 'World Editor Help Zone' started by xp3r009, Aug 16, 2009.

  1. xp3r009

    xp3r009

    Joined:
    Jan 22, 2009
    Messages:
    272
    Resources:
    0
    Resources:
    0
    Hey everyone,


    I quite need this question very quickly (recommended to be today) since I'm quite busy and this is a school project, however for my ease would there be a way to have a event (I don't really mind if it is GUI or JASS) that generically when a unit goes to a region a the trigger takes place.

    I have seen only events of regions being more specific, however I would like to be more generic and affect all regions I have created. I have heaps, and this is a board game. I need this very urgently, but if not I have another method but I would have to do every single one (I have groups though, which are in my English Book so that I got it organised). Otherwise, is there a way to make this generic (exclude affecting playable map area or entire map as such).


    I need this urgently, so anyone who solves the question of course will be +rep. This is urgent for the school project.

    Andy Phan.
     
  2. Hinte

    Hinte

    Joined:
    Jul 18, 2009
    Messages:
    85
    Resources:
    0
    Resources:
    0
    I'm not sure about regions, but i know another way that might work for you.

    • Event
    • Time - Every 0.10 seconds of game time ~Change this to w/e works for you
    • Condition
    • (Terrain Pathing at (Position of your unit) of type buildablilty is off Equal to True
    • Actions
    • W/e you want
    • Trigger - Turn off this Trigger


    So make your regions so buildability is off example black marble. When your unit enters the area with black marble it will do the actions. We turn off the trigger so that it doesnt spam your actions. Then we add another trigger for when he leaves the black marble so that it will do the action again when he reenters the black marble.

    • Event
    • Time - Every 0.10 seconds of game time ~Change this to w/e works for you
    • Actions
    • Wait Until ((Terrain pathing at (Position of your unit) of type buildability is off) Equal to false), checking every 0.10 seconds.
    • Trigger - Turn on (the above trigger)


    Hope that can help you.
     
  3. xp3r009

    xp3r009

    Joined:
    Jan 22, 2009
    Messages:
    272
    Resources:
    0
    Resources:
    0
    Thanks I will see how it goes; I may do it another way, and I already have the regions; probably a map could go for example. I got a clue, it just that it is sort of confusing in a way.
     
  4. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,127
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    There is also this part you might have missed:
    • Map Initialization
    • Events
      • Time - Elapsed time is 0.00 seconds
    • Conditions
    • Actions
      • Set Region[1] = Region 0001 <gen>
      • Set Region[2] = Region 0002 <gen>
      • Set Region[3] = Region 0003 <gen>
      • Set Region[4] = Region 0004 <gen>
      • Set Region[5] = Region 0005 <gen>
      • Set Region[6] = Region 0006 <gen>
      • Set Region[7] = Region 0007 <gen>
      • For each (Integer A) from 1 to 7, do (Actions)
        • Loop - Actions
          • Trigger - Add to Trigger2 <gen> the Event (Unit - A unit enters Region[(IntegerA)])

    • Trigger2
    • Events
    • Conditions
    • Actions
      • <Actions Here>
     
  5. xp3r009

    xp3r009

    Joined:
    Jan 22, 2009
    Messages:
    272
    Resources:
    0
    Resources:
    0
    This was what I was looking for!

    Hey, it makes sense! Thanks, this seems to be a lot more useful, I am totally saving this page to refer back to (I guess this was what I was looking for). Thanks, and +rep. This one helped and I can understand it. I owe you one ;) .