Regions

Kazenoyoukai

New Member
Reaction score
0
How do I setup regions?

What Action do I use in a trigger to place a unit at a random place within a particular region? (E.g. place 1 Footman somewhere within Region 1)

How would I change time of day lighting for a region? I want a particular forest in my map to always be dark like night, but the rest of the map I want to be as normal.
 

Hellohihi

New Member
Reaction score
42
Press R to bring up the region editor.

Use the trigger: Create 1 [unit] at center of region 001.
(Yeah i know it leaks, fix it yourself)

Afaik you cant change the time of day for a region.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
To spawn a unit at a random point in that region you can do this:
Code:
Set tempPoint = (Center of Rect 000 <gen>)
Unit - Create 1 Footman for Player 1 (Red) at tempPoint facing Default building facing (270.0) degrees
Custom script:   call RemoveLocation(udg_tempPoint)


For a darker part in a map;
You might have to work out some sort of fade filter.
I don't think specific spots can be a different time of day.
 

Kazenoyoukai

New Member
Reaction score
0
Where is the randomizing part of either of those in the placement?

Is there any sort of lamp like doodad? In the C&C:RA2 map editor, there are "lamps", invisible doodad type things that create lighting effects around them.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Ah yeah.
Forgot you wanted random point, sorry:
Trigger:
  • Set tempPoint = (Random point in Rect 000 &lt;gen&gt;)
    • Unit - Create 1 Footman for Player 1 (Red) at tempPoint facing Default building facing (270.0) degrees
    • Custom script: call RemoveLocation(udg_tempPoint)



And you can probably find lighting effect doodads, yes.
Look up "WindexIsBack".
His models are excellent (And he may have some lighting ones) .
 

Chewbalka

New Member
Reaction score
14
if time isint important you can always just force the time to go to night when you enter the region. + a game hour every second so it goes fast but not instantly.
 

Kazenoyoukai

New Member
Reaction score
0
I'm not into the actual trigger making part of the map at the moment; I'm still planning most of it and working a little bit on the different terrain regions (I never realized quite how big 256x256 is, haha). How do I copy & paste a trigger thing someone posts on here into a new trigger in the editor? Last time I tried I couldn't figure it out.

Wolfie, can you explain that last part? I'm a little confused.

Chew, that would work, except this isn't going to be a 1-player map. I'm working on a 6-player RPG. The random placement thing is how what I'm going to do when I need to make a respawn.

Speaking of which, I have two trigger-related questions. When you tell a trigger to wait and it goes on hold, can other triggers still run during this time? Also, is it better to use a switch (if that exists) or multiple if/else cases to figure out which of a few cases you have for a certain event or multiple triggers of that event with an if for each.
 

Dest

New Member
Reaction score
26
I'm not into the actual trigger making part of the map at the moment; I'm still planning most of it and working a little bit on the different terrain regions (I never realized quite how big 256x256 is, haha). How do I copy & paste a trigger thing someone posts on here into a new trigger in the editor? Last time I tried I couldn't figure it out.

169hu9y.png


You meant it?
 

Chewbalka

New Member
Reaction score
14
you cant copy triggers from the forums into the game, you will have to re-create them.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I'm not sure if I can fully explain the last line without getting pwned by the pros :p .
You can read these threads about it though;
Which will explain it thoroughly.
One
Two
 

Kazenoyoukai

New Member
Reaction score
0
Not sure how this post was already here... hmmm...

I get what a leak is. I'm a computer science major so I kinda know a bit about having data floating around too much. I meant could you explain what you were saying about Windex.
 

Kazenoyoukai

New Member
Reaction score
0
By model, you mean like the graphic part of the units, buildings, etc.? I didn't know you could make those, wow. Thanks a lot!

How do I get to If/Then/Else statements and Custom Scripts in a trigger? Is that a JASS thing?
 

Ayanami

칼리
Reaction score
288
By model, you mean like the graphic part of the units, buildings, etc.? I didn't know you could make those, wow. Thanks a lot!

How do I get to If/Then/Else statements and Custom Scripts in a trigger? Is that a JASS thing?

The If/Then/Else is in the "Actions" part of the trigger. Custom Script is also in the "Actions" part of the trigger.
 

Kazenoyoukai

New Member
Reaction score
0
Is there a switch type function? Like for when you've got multiple cases of what to do from a single event?

If there isn't, is it better to have one trigger from the event and a series of nested if's or a series of triggers from the event for each case (or group of cases if they can easily be grouped)?

If you call wait in a trigger and it goes on hold, can other triggers still run, and can that trigger go off again for a same event while still on hold?
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
>>switch function
No
There's if then else statements.:)

One trigger with all the if-then-else statements that goes to the event/events in that trigger.

>>>If you call wait in a trigger and it goes on hold, can other triggers still run, and can that trigger go off again for a same event while still on hold?

Try it yourself? :p
Well, other triggers can still run.
That trigger can still go off again (there is an action to turn the trigger on/off, Trigger - Turn off (This Trigger)).

On a side-note; which language have you been into? just curious...
 

Kazenoyoukai

New Member
Reaction score
0
Java and C++, standard first/second-year CS stuff.

If you have possible actions from one event, is it any worse to have multiple triggers per event or a single condition with a big bunch of if/else stuff?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top