Announcement

Collapse
No announcement yet.

Possess or not Possess? That is the question.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Possess or not Possess? That is the question.

    Hi everyone!

    I work on an RTS project where the pawn is the camera.
    The Player Controller possess the camera pawn.

    But what about units? I would like to select and move my units in a classic RTS way, but should they be pawns?
    I know the Player Controller can only possess one pawn at time, so, how to keep the camera and select several units?!

    Another related question : I never know if I must fill the "owning" target in UMG widgets or in the node "Spawn Actor From Class".
    How can I know who is the possessor, the owner of the actors (it's important in multiplayer games)? Do I just need to reference the player controller in the unit?

    Thank you for your help!

    #2
    If you want to posses them absolutely use pawns unless you have acces to the source and you made actors possessable to ? as long as I know PC just has controlled pawn variable not controlled actor lol.
    Some cool unreal projects you may like!


    Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

    Download the demo Download the demo
    external link Dropbox DropBox

    Become a c++ Professional now C++ Networking Tutorial

    Comment


      #3
      For units you need some robust and simple system. I done some prototype for squad "rts" game.
      For me easiest (and flexible) system was like this:
      - pawn (player controller) is just camera, that can snap to any actor given its ID. with future plan to do some cinematic flyby etc.
      - all player units are AI driven, very simple AI player gives order, some script interprets it and gives each unit AI direct order like "go there", "shoot" or "take cover", just very basic and simple orders.
      - then you have kind of higher level AI (both for player and enemy), that would be group orders. Like "group move to destination" "Group take cover" "Group attack some target". For that you need some system (and base class (ie. parent to all other units)) that can remember its group ID, ID inside group, can solve problem of keeping spot in formation etc.

      So when you split your AI into levels like this then each level into commands, and finally add some behavior decissions on top you kind of have working AI, and with gui you will get nice tools to make AI listen to player orders. Always split big problems into smaller ones, and think how you split.

      Comment


        #4
        Nawrot Neongho
        Thank you for your answers!

        Neongho Yes! You confirm that I just need to put a reference to the PC in the pawn to rely it to a player (same for buildings). But, I don't understand how I rely a pawn to an IA Ennemy. Currently I try to draw an entire guide map of the game before developping it, and IA is a black point

        EDIT : End message losted!

        Nawrot Thank you for your examples. I prototyping them with success! I think it's the best way, especially because I will create my own pathfinding algorythm with spline movements (but AI Move To will be useless...).

        I read developers blog about RTS game with Unreal Engine. If you have some links, I take them!
        Last edited by Anonythe; 02-23-2020, 06:06 AM.

        Comment

        Working...
        X