need trigger help on terraining

mad_man1983

New Member
Reaction score
3
i know how too change the terrain from snow too rock as an example and how too change from buildable too none buildable, but i need too figure out how too change random spot too unbuildable and the same random spot too change terrain, is that possible?
 

Exide

I am amazingly focused right now!
Reaction score
448
Just set a point, and make a region around that point.
-Random point in (Playable Map)
 

mad_man1983

New Member
Reaction score
3
can you explain better? or show me code, i don't understand exactly what you mean...

anyway too explain why i want this:
i'm making a td for a friend, and you can only build towers on unbuildable terrain, and you only start with one spot of that, but whenever you build a tower another spot will be put on the map, so loigcal i need the random spot too change from snow too rock and from buildable too unbuildable

edit: now i have made a dummy too be placed random on map and making the terraing change where the dummy is and also changing buildability there, only problem i have now is that the point that is buildable is way too little for me too build a new tower on, any suggestions?
 

Sirroelivan

Gunnerkrigg Court
Reaction score
95
What are you using to change the terrain, use this.

Code:
Environment - Change terrain type at Point to Lordaeron Summer - Dirt using variation -1 in an area of size X and shape Circle

Just change the size to something bigger than 1 and alter shape as you like.
 

mad_man1983

New Member
Reaction score
3
it's not the terrain type that is too small, the terrain size is exactly right, but the point that makes it buildable/unbuildable, that's the the problem because as far as i know you can't change the size of it:banghead:
 

Exide

I am amazingly focused right now!
Reaction score
448
Code:
Actions
    Set [B]randompoint[/B] = (Random point in (Playable map area))
    [COLOR="SeaGreen"]-------- Next comes the action that you want to do on that point.. --------[/COLOR]
    Environment - Change terrain type at [B]randompoint[/B] to Lordaeron Summer - Dirt using variation -1 in an area of size 1 and shape Circle
    Custom script:   call RemoveLocation(udg_[B]randompoint[/B])
 

Sirroelivan

Gunnerkrigg Court
Reaction score
95
Then make the terrain patch a bit bigger, since overlapping section of terrain are considered buildable, even if one of the overlapping types is unbuildable, I think.
 

mad_man1983

New Member
Reaction score
3
Code:
Actions
    Set [B]randompoint[/B] = (Random point in (Playable map area))
    [COLOR="SeaGreen"]-------- Next comes the action that you want to do on that point.. --------[/COLOR]
    Environment - Change terrain type at [B]randompoint[/B] to Lordaeron Summer - Dirt using variation -1 in an area of size 1 and shape Circle
    Custom script:   call RemoveLocation(udg_[B]randompoint[/B])

well that changes the look on the terrain too what i want, but how too make exactly the same spot that changes randomly with that trigger too be builable/unbuildable? since change terrain does only change the looks and not whatever you can build or not on that spot
 

Sirroelivan

Gunnerkrigg Court
Reaction score
95
? It does I thought? If you replace terrain with unbuildable terrain it becomes unbuildable I thought?
 

Exide

I am amazingly focused right now!
Reaction score
448
well that changes the look on the terrain too what i want, but how too make exactly the same spot that changes randomly with that trigger too be builable/unbuildable? since change terrain does only change the looks and not whatever you can build or not on that spot

You said in the first post that you know how to change both, but didn't know how to use it on a random point.
-I provided the point, now do your thing. :rolleyes:
 

mad_man1983

New Member
Reaction score
3
? It does I thought? If you replace terrain with unbuildable terrain it becomes unbuildable I thought?

nope, it only changes how it looks not if you can build on it or not, so great if you want too change the looks on your map, but not so great when you try too do what i'm trying too do now =/
 

mad_man1983

New Member
Reaction score
3
You said in the first post that you know how to change both, but didn't know how to use it on a random point.
-I provided the point, now do your thing. :rolleyes:

well, i get them random and on the same spot mostly, but the problem now is this: the spot looks like it should, but the buildable spot is not the same size =/ too put it in another way, a tower has 72 in collision size i think that is the size it needs too build on too, the spot that changes it looks has that size, but the buildable spot has 1 or so in size, and that's a problem, because you cant build on a so small spot, unless i maybe scale down the entire map, that may work, but it's a lot of work too do that
 

Sirroelivan

Gunnerkrigg Court
Reaction score
95
Check post #7, I believe it might hold an answer to your problem. Another way, instead of using buildable/unbuildable, is triggers. When a players start constructing a structure, check the terrain type at the position of the structure, if it's not the right one, cancel the building.
 

mad_man1983

New Member
Reaction score
3
Check post #7, I believe it might hold an answer to your problem. Another way, instead of using buildable/unbuildable, is triggers. When a players start constructing a structure, check the terrain type at the position of the structure, if it's not the right one, cancel the building.

hmmm, check terrain type sounds like a good idea, didn't think of that :p well i'll check if i figure out how too make a trigger that checks that ^^,

edit: i have checked around on the triggers now, but i can't figure out how too make a trigger that checks terrain type at the position on building, and cancel if it's wrong terrain type... so can any one help me with that?
have gotten as far as this:
If ((Terrain type at (Center of (Playable map area))) Equal to Lordaeron Summer - Rock) then do (Do nothing) else do ???
so where do i find the part that cancel the building?
i think i have done the first part right
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top