• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Creating a Event - All Regions

Status
Not open for further replies.
Level 9
Joined
Jan 22, 2009
Messages
346
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.
 
Level 4
Joined
Jul 18, 2009
Messages
85
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.
 
Level 9
Joined
Jan 22, 2009
Messages
346
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.

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.
 
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>
 
Level 9
Joined
Jan 22, 2009
Messages
346
This was what I was looking for!

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>

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 ;) .
 
Status
Not open for further replies.
Top