Create builder unit for RTS

tell me how to create a classical building unit for the strategy (RTS)?

  1. One resorses
  2. allowed to build on flat terrain (with minor errors)
    Example games with builders: CnC Generals , Warhammer 40k, Lord Of The Kings

So I am going to throw this back at you … because no one will just tell you how to do it.

So how would you do it? Not necessarily in code, but if you wanted to make this happen, what steps would you have to take to get the unit doing what you need it to.

The hard part of making games is learning how to tackle these systems, unfortunately if every time you struggle and then ask on the forums and someone just does it for you, you will never learn how to do it yourself. If you can’t work out how you would do it without having to program it either, then you will also never learn.

I would suggest that you maybe either look at some tutorials or look at the Marketplace for an RTS starter kit and maybe start from there. Good luck.

I’ve got another example game for you to look at!

He is also working on it. I wrote that does not know how to make a builder :slight_smile:

What is a builder to you?

Are you talking about a builder unit or a builder system that actually builds stuff?

builder system units:)

And by create do you mean how to model and texture them from scratch. Do you mean how to create them in game. Or do you mean how to create the logic that makes them act like how thy are supposed to act?? You’re first pos is too vague

oh. only Logic

You would need some ai to get them to drive to where you want them to, and then have something happen then depending on how you want the building mechanic to work. Do you just want them to go some where and spawn something?

I think this should work well
Строительство здания.png

Oh! I now understand what you are looking for. You want a builder unit (construction vehicle) and how to program it to do what it does in real-life. Like pave and excavate, stuff like that. Is that correct?

I guess something that you could do is place your ghost build actor down and have it send out a message to bulldozers to come to it. When they get in range or go through the ghost build’s overlap volume, it will start to add progress until it is done. At that point, the ghost build will switch to a complete build.

Yeah so like others have said break it down into chunks then do a bit at a time.

So first you woul need to spawn them into the world. Notlrmally in rts games this would be done by clicking on a building or adding them to a que with a build timer . When the timer hits zero you would spawn the unit at the building location with an offset .

Next you would need to select the unit and move it to the resource location. This is normally done by tracking the mouse curser position and then doing a line cast to see what it hits.

Once it reaches the destination to gather the resources would again probably involve you clicking on the unit then clicking on the resource wish to gather.

The actual gathering would then just be a looped animation .

Or if you wanted the build unit to build something at the location you would have to perform you’re checks. Then spawn the object you want to build and most likely destroy the original unit and play another animation

First, I do not know how to effectively get these 8 points around the building to indicate the bulldozer come in the next one. When it reaches, it has already started the logic further: Here firstly need to check whether landscape not changed, if not built there that the enemy or if there is an enemy unit. Second, how very little lift or release the terms of the landscape, thus making the surface smoother?

I would worry about setting up a control scheme that you can use to even implement this. You’ll need an rts like camera and inputs to begin testing this properly. Once you get to a point where you will be able to start putting in th ability to add ghost builds you can then start on this. You’ll need it to test your system.

Detecting flat or semi-flat terrain should just be a matter of line tracing 4 points to the first thing they hit below their origin and seeing if it is within a certain threshold. The points origin would be in front of the builder unit, probably width of the shovel, half the height, projected forward from the forward direction.

I think that the central point should be checked, too
but, how?
I hope the experience will come to me :))

Music : main theme GENERALS GWW (Demo ver.) -

What did u make them assets?