0 Favourites

Help With Little RTS

  • Hello,

    I'm just trying to learn the tidbits it takes to make an RTS. Right now I'm just piecing together some bare bones elements. I've got the players and enemies. And a game engine, with one value. When a player clicks their unit some little squares show up showing where they can move. I've got an un-worked out lerp function, I'm not even sure what the lerp parameters are yet. Also when the player selects a unit the move boxes around the previously selected unit get destroyed.

    This is working pretty good, but there's a couple of issues. When the new units are selected the old units move boxes get destroyed as expected, but if the old units are selected again the move boxes don't get recreated.

    Thanks for your time.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Sorry, I'm gonna bump this thread with a new event sheet. I really need someone to show me where my data is going wrong. I'm not understanding something. I'm trying to advance from simpler games to more difficult, but this player selection and movement stuff is confusing me. Someone please take a look at the image below and tell me what I am missing in understanding and flow of control.

    Objects on layout

    three playerUnits, a moveLocation

    playerUnit [isSelected = false, isMoving = false]

    moveLocation [uid = 0, isSelected = false]

    Basically for this example I would like to click a unit, move it to one of the moveLocations that pop up around it, and select another unit and move it.

    Bugs:

    Select a unit, the move tiles show up, select a different unit, the other units move tiles disappear, and the newly selected units move tiles show up. After the third unit is selected move tiles show up and the last units disappears. When I select any of the units again the last units move tiles disappear and the newly selected unit doesn't get move tiles.

    Second bug is I can't move. This happened when I added a Boolean condition, not sure which one. Before that the lerp was working but when I selected another unit as that one was moving it would stop moving. When I selected a move tile for the other unit that I just selected the other unit would move towards it too..

    Please help with understanding on how to order these programs. I can't seem to get out of simple stuff.

    Thanks,

    Jeremy.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
95 14,388
LaurenceBedford's avatar
LaurenceBedford
Unread hot topic
157 12,693
megatronx's avatar
megatronx
Unread hot topic
89 10,763
tendividedbysix's avatar
tendividedbysix