In search of a "Road" System

Kevin

New Member
HI!

I am in search of a road system.

A system that will take like let's say a doodad unit or other non-building unit, create a road, and change the faces of the road to match other roads around it (and change their faces too).

Something that will have a + roads a L road a T road and a I road.

IF no one knows of a road system (I searched and could not find), then what is the best way to go about it? I was thinking of creating doodad units and change their exposed face depending on other roads surrounding them. I would use a "dummy building" to trigger the creation of the doodad, then I'd delete the dummy and keep the doodad. Or should it be a UNIT with Locust? (road needs to be invulnerable, unselectable).

Just cruious.

ty ^_^
 
Werbung:

Maximilianx

New Member
i dont quite understand what you said..are you trying to make buildings face roads nearby?

if so, what are your roads made of, is it terrain, or doodads? o_O

im confused =]
 

Kevin

New Member
no what I mean is, I make a box, and I texture 4 faces of the box to look like different sections of road:

Horizontal
L turn
+ intersection
T intersection

And then here's the thing, you need to build the road on the ground right? When the road is next to another road, the road faces need to be rotated to align properly with each other.

You know like any game that uses a road system.

But roads cannot be buildings because buildings don't rotate. But that is why I was thinking of making the road a doodad, I think they can be rotated. But also, I think I'd need a building dummy unit, then I'd remove th einvisible building unit after it is built, it'd produce the road and the effect I want/need.
 

Wyvernoid

New Member
hmmm a doodad?, how can you create doodads or rotate them in game? My idea, buildings can't be rotated instantly, but there be workarounds (in JASS) just kill that building and create a new one facing the correct angle. say,
[JASS]call KillUnit(teh_building)
set teh_building = CreateUnit('teh_unitid',PLAYER_NEUTRAL_PASSIVE,x,y,teh_angle)[/JASS]

That works, cuz buildings can ONLY be rotated when it is created.
But... you may need to store something of the original buildings and restore them to the new building if you need or would like to.
 
Werbung:

Squishy-1

New Member
that would lag your game (extremely) to put in something to change the angle of a building via utility, the best thing to do would be

event response (building starts being built)

Unit is in region x gen or is on terrain (road)

change angle to x (x being based on the road type, if the road where verticle it would be 90%)
If manipulated unit is on terrain (road) then move building 200x 200y

then follow that last action up with something to move the building if there is already a building in that spot


also take note (move unit instantly facing degrees) doesnt necessarily mean movement, it also includes buildings
 
Top