Help with triggering buildable/unbuildable terrain

  • Thread starter Thread starter Warren X
  • Start date Start date
W

Warren X

Guest
Hey, got a bit of an issue. I'm trying to enable a voting system to allow players to allow or disallow the building of structures in certain areas. By default it is disallowed but with a vote the players will be able to allow it. I have the dialog set, I have the terrain changing with the vote, I even found the pathing triggers and was tinkering with them. My only issue is I can only find the trigger to change the CENTER of the region's pathing ability. There any way I can set up a variable, or change it so that it accepts the entire region instead of one measly little point? Any help would be appreciated.
 
I looked at that. That is really inconvenient; I don't know why Blizzard would do that. Anyway, the only solution that I see is to use nested integer loops to turn off every point in the region. I know, it sucks. If anyone has a better way then post it though.
 
Arrgh...

ACK. That is gonna be a pain cuz it's a very large area we're talking about here, and I have four of them to do. =/ I guess that project is going on the back burner, maybe someone knows a better way and posts it before I decide to do it again... :banghead:
 
Just a question here:
If you change the terrain to a tile that is usually unbuildable, won't that do it already?
(Or the other way around)
 
Warren X said:
ACK. That is gonna be a pain cuz it's a very large area we're talking about here, and I have four of them to do. =/ I guess that project is going on the back burner, maybe someone knows a better way and posts it before I decide to do it again... :banghead:

It's actually not as hard as you would think. It may lag the game up slightly though, so be sure to turn it off after use.

Code:
For Integer A from <leftboundary> to <rightboundary>.
     For Integer B from <bottomboundary> to <topboundary>.
          Turn buildability for (Center of (playable map area)) offset by (Integer A, Integer B)

If you don't mind changing the terrain, Ace's way would be more efficient.
 
Tried that...

<quote> Just a question here:
If you change the terrain to a tile that is usually unbuildable, won't that do it already?
(Or the other way around)</quote>

You'd think so, but no it won't. I tried just triggering a terrain change from unbuildable ground to buildable, but it still doesn't (de)activate buildable pathing on the terrain. Hence the question. And SilverHawk, to use that code that you displayed, do I just make one region and measure its size, then use negative/positive offsets relative to the center? And if I measure, do I measure in blocks or pixels? Hmm, will have to test. I might even have the answer for myself before you reply. =)
 
Doesn't work...

AceHart said:
Just a question here:
If you change the terrain to a tile that is usually unbuildable, won't that do it already?
(Or the other way around)

You'd think so, but no it won't. I tried just triggering a terrain change from unbuildable ground to buildable, but it still doesn't (de)activate buildable pathing on the terrain. Hence the question. And SilverHawk, to use that code that you displayed, do I just make one region and measure its size, then use negative/positive offsets relative to the center? And if I measure, do I measure in blocks or pixels? Hmm, will have to test. I might even have the answer for myself before you reply. =)

Edit: Sorry for the double post, wasn't sure if the quote tags were housed in < or [
 
I think I got it

Here's what I'm coming up with so far. Assume the leftmost X value is 3968, the rightmost 4224, the uppermost -2944, and the bottommost -2592.

Code:
 For each (Integer A) from 3968 to 4224, do 
(For each (Integer B) from -2944 to -2592, do 
(Environment - Turns terrain at ((Center of (Playable map area)) offset by ((Real((Integer A))), (Real((Integer B))))) Any pathing to On))

That what you're talking about, SilverHawk?
 
Didn't work out...

I tried that method using the coding that I had posted, and it didn't work out for me. I tried using the values as integer values in the code, as well as actually calling the values using the convert real to integer action. I also tried changing my center point, from center of playable to center of entire, to a symmetrical region that basically has the center at the origin, and nothing did it. Am I implementing the code wrong?
Code:
 For each (Integer A) from (Integer((Min X of Vote Pink <gen>))) to (Integer((Max X of Vote Pink <gen>))), do 
(For each (Integer B) from (Integer((Min Y of Vote Pink <gen>))) to (Integer((Max Y of Vote Pink <gen>))), do 
(Environment - Turns terrain at ((Center of (Entire map)) offset by ((Real((Integer A))), (Real((Integer B))))) Buildability pathing to On)
 
Just a weird thought, but, here it comes:
Use an invisible, walkable, unbuildable doodad covering your buildable region.
And remove it if needed.
 
Warren X said:
Code:
 For each (Integer A) from (Integer((Min X of Vote Pink <gen>))) to (Integer((Max X of Vote Pink <gen>))), do 
(For each (Integer B) from (Integer((Min Y of Vote Pink <gen>))) to (Integer((Max Y of Vote Pink <gen>))), do 
(Environment - Turns terrain at [B]((Center of (Entire map)) offset by ((Real((Integer A))), (Real((Integer B)))))[/B] Buildability pathing to On)


I cannot find the last action in WE is it a WEU? But isnt it esier to have somting like this:
(Environment - Turns terrain at (Point((Real(Integer A)),(Real(Integer B))) Buildability pathing to On)
 
Hehe AceHart, not a bad idea. =P I may just do that but I wanna learn how to use this pathing trigger anyway tho. :D And phyrex1an, that's my fault, I made a silly error when I was coding that script, your point idea works...somewhat. For whatever reason, the nested integer loops are carrying down the Y value, but not the X, so I'm getting a one square wide bar of pathable ground going up and down at the far left of the region. I double and triple checked my values and they are indeed min of region to max of region. It almost seems as if it jumps from the first integer value in the X loop into the nested integer loop, and never returns. Any thoughts?
 
Are you sure that the loops are nested? The Y loop should be inside the X loop, and the pathing action should be inside the Y loop.
 
Positive. Here's how I do it, step by step:

1. Use the "For each integer A, do action" action command. Low number is a "convert real to integer" of the minimum X of the region, and the high is the same conversion of the maximum X.
2. For "do action" in the prior command, I do "For each integer B, do action." Low number is the real to integer conversion of the minimum Y of the region, high is the maximum Y.
3. For the "do action" in the Integer B loop, I use the "Environment - Turn Pathing On/Off" action.
4. For the variable after "turns terrain at" I use "convert coordinates to point" and use "convert integer to real" to take integer A and integer B from the loop, and apply them as X and Y, respectively.
5. Pathing selected is "Buildability."

I'm pretty confident I'm doing it right, but maybe not. Let me know.
 
Warren X said:
Hehe AceHart, not a bad idea. =P I may just do that but I wanna learn how to use this pathing trigger anyway tho. :D And phyrex1an, that's my fault, I made a silly error when I was coding that script, your point idea works...somewhat. For whatever reason, the nested integer loops are carrying down the Y value, but not the X, so I'm getting a one square wide bar of pathable ground going up and down at the far left of the region. I double and triple checked my values and they are indeed min of region to max of region. It almost seems as if it jumps from the first integer value in the X loop into the nested integer loop, and never returns. Any thoughts?

The only thing that can cause that, if this is not a bug caused by blizzard, is that the y loop isnt inside the x loop but the turn buildability is inside the y loop.

One thing: This is leak like I dont know what, yous should assign the point you want to turn on into a variable and then remove the point after that. Search for "point leak" or simular at the forum and you will find how do do that.
 
This has gotton out of hand.

I know a secret.

-Make that area of the map a BUILDABLE tile.
-Go to the doodad editor.
-Copy & Paste the 'Pathing Blocker - Ground (large)' doodad.
-Rename your custom doodad to 'Building Blocker'.
-Now change your doodads pathing map. Press CTRL-D to see the REAL names of pathing maps.
-Pick a big square one thats 'Unbuildable'.

Note, you can pick from doodads, destructables, units, whatever you like. Pull down the boxes to find more.

-Go to the map editor.
-Go to View - > Pathing - ground. Now you can see them. (Unbuildables are blue.)
-Place enough of your big, custom blocker to cover the area you don't want.
-NOW you can't build there.

If they VOTE that you CAN build there, pick all doodads of type (your blocker) and remove them from the game. Change 'appearance' of terrain if you want to.

DONE.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top