Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Unity RTS Engine

Discussion in 'Assets and Asset Store' started by OussamaB, Feb 7, 2017.

  1. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    As promised, the new update has been just submitted, here's the update list:

    - Fixed shuffling factions when the map loads.
    - Fixed loosing the selection after clicking on the minimap.
    - The Unit's radius must now be set from the "Unit.cs" inspector and not anymore from the "Nav Mesh Agent" component.
    - Fixed the unit's movement when the target object is moving.
    - Added two new custom events: OnFactionEliminated, OnFactionWin
    - Added camera panning.
    - General camera movement improvements.
    - Added the option to put Units that do not belong to any faction in the map.
    - Added the feature to create "Flying Units"
    - Added the "Helicopter" unit as an example for a flying unit.

    Here are some new screenshots as well:



     
    Paul-Swanson likes this.
  2. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    285
    I am dissatisfied with the camera. Can you easily replace the camera with another asset?

    like this

    https://www.assetstore.unity3d.com/kr/#!/content/10390

    Is the building part separate from the unit's behavior?

    Can I separate unit actions and easily apply them to other games?
     
  3. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Is it just me or does the selection health bar not work like intended? It ignores pivot point and somewhat offset the empty health bar, you should either make this a mask or not scale the current way it's done, with custom UI art it's a pain to get it working.
     
  4. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    It should be easy to do that but since I don't own that asset then I can't really say much.
    The camera has been and will be more improved. What exactly is missing right now and that you urgently need?

    That is unfortunately not possible.
     
  5. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    I am sorry but the selection health bar is currently not fully implemented. I started in the past updates to add it but got busy with other features and forgot to remove the work I've done in it. I will take care of that ASAP.
     
  6. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    I think we are talking about different health bars, I mean this is always happening to me:

    Notice how the "Health bar fill" is having its own life.. and it's happening over and over again.
     
  7. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    This is unusual.
    Make sure that the health bar is child of the "SingleSelection" UI Panel. And make sure its anchor presets are: middle and center.
     
    MHolmstrom likes this.
  8. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Thanks, that somewhat did the trick.
    I was wondering about a request.
    I could do it myself I guess by enabling and disable in the "building" placement script.
    Anyhow, I want a Build button to open up a task menu for ONLY Buildings when you have a worker selected because I'll use the current task panel as an "action bar" for move command, attack command etc in future.

    But the problem is I can't separate buildings from training units, this would force the player to press that building button in order to train units but it's supposed to be a building task button, not units that will work the same way as before.
    So what I'm asking, how can I enable a panel only displaying Buildings when a select a worker?

    And this might be an issue just for me but when I write a description, selecting sprites for prefabs such as buildings it will get unloaded somehow or restored to 8h ago. I save/save the project from time to time but it just goes back, it's like my .meta files are not beeing saved anymore, any help with that?

    Edit: My AI will not spawn workers or build anymore, any hint?
    Edit 2: It spawns workers when I attack the enemy base, but not in runtime and it does not try to build either.. seems like a faction id issue but I'm not 100% sure if "Faction 1" in the Game manager is ID 0? thanks in advance.
     
    Last edited: May 17, 2017
  9. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    The current task panel displays only buildings that can be placed by the worker so it's actually what you're looking for.
    Move commands and attack commands are directly implemented.
    HOWEVER,
    I will add these commands as part of the task panel and then we will be able to split them.
    Which commands exactly are you looking for? (besides movement and attack)


    If you are updating the prefab's info from the scene without applying it to the actual prefab inside the project then it won't actually update and all your change will be discarded as soon as you click on play. This applies only for scripts that use a custom inspector. Make sure you update the prefabs directly from the project or apply every change you make to the prefab.

    - Any more? Can you remember what changes you applied to the inspector/scripts before this issue occurred?
     
  10. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    Thanks for the reply, what commands I'm looking at are patrolling go from the current pos to a temp pos you apply and ping pong from point A - B, something that triggers our existing function in 'units.cs' I can't remember the name (I'm on the phone) but it's a float look for target or something so you can use kite with your casters or anyone really.
    The normal stop and move action but within the task menu, I'll do some kind of hotkey editor for all things within the task menu.

    The building button would not work unless we can put training units, research and building tasks into categories.

    What I did was simply but a new building mesh prefab into the by then working capital center so I was confused.

    Also, I guess the next update will use faction ID 0 for natural monsters? So we don't get confused because of faction ID 1 beeing faction id 0 in the faction manager?

    Also, I know my unity so I do change the prefabs from the project, not the inspector, so I just might have to update unity or something because I think losing references to some prefabs is my editors' problem. What version is the most stable with RTS ENGINE?

    Edit 1:
    Just duplicated the actual working one and added the mesh again and this time it works.
     
    Last edited: May 18, 2017
  11. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    Okay that's a reasonable suggestion. I will separate training units, research and construction tasks in the task menu.

    This will actually cause confusion for other users. Neutral units have the faction ID of -1. In fact you just need to set them to "Free Units" (bool) in the inspector and the faction will be automatically changed.
    You can actually open the "GameManagerEditor.cs" script and modify that and have the first faction show as faction ID 0. (I can send you the modified script in case you want).

    The asset has been submitted with Unity 5.5.0 and it should work equally stable for all the versions above.
     
  12. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    If I want to get ridd of this Border thing, is it just to comment out the whoe script, delete it or tweek here and there?
     
  13. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    Getting rid of the whole border concept will make it all chaotic, AI factions depend on the borders to place buildings and expand and collect resources. You can get red of it but it will have bad consequences on the AI performance.
     
  14. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    The new update is now available on the asset, let me know what you guys think!
    In the meantime, I am already working on a new update
     
  15. patodonald

    patodonald

    Joined:
    May 4, 2015
    Posts:
    3
    hello this asset hv save game?
     
  16. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    Currently that is not available.
     
  17. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    any chase to have a tank type of unit? or a tank with like 2 turrets? (im thinking about getting this kit and the game im going to try to make will have naval units so if not i can figure something out)
     
  18. EliteSniperx16

    EliteSniperx16

    Joined:
    Apr 9, 2014
    Posts:
    68
    Hope next update has base upgrading just waiting on that for my project we got all models and ui done :p
     
  19. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    also i tried to buy this..and the unity asset store will not let me

    is there any other way to buy this?
     
    Last edited: May 27, 2017
  20. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    My border is not working anymore at all, Everything is outside of it. I have imported the default one but it's not working anyway..
     
  21. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    178
    @MHolmstrom
    Have you made sure your Border is on it own border layer?

    @OussamaB
    If you decide to touch on that Tank idea I can provide a model of a Stationary Turret (Building), Tank (Unit)
    And an APC(vehicle to carry units.)
    I'm not good at Boat modeling so I can't help with @navy3000 battleship dual turret idea. But if you use my Tank Turret and pop it on a rectangle twice it might work for Basic concept. Just let me know. Here the untextured screen grab of what I''m talking about. Iv made them in 3DS MAX 2015
     
  22. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    - The ability to have multiple attack sources (in your case multiple turrets) is planned.
    - The only thing missing to create a tank right now is probably the ability to rotate the top of the tank independently from the lower part of the tank. This feature is actually implemented in the Tower building (Attack building) and therefore it should be easy to do the same thing for the units (next update).
    - Naval units are planned but I can probably say it will be available in about maximally 3 weeks (the two next updates are already planned).
     
    navy3000 likes this.
  23. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    The next update won't but the one after it will.

    P.S: I am interested to see screenshots (maybe a video) of what you have achieved so far with the asset!
     
  24. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    What error does it give you? Have you tried contacting the asset store?
     
  25. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    "I have imported the default one but it's not working anyway.." which default one?
    What changes have you made to the scripts that relate to the border system?
    Can AI Factions still gather resources?
     
  26. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    the error is

    "The system failed to process your card at this time. Please double check your billing details, try a new credit card, or contact your bank."

    but my card is perfely fine..i was able to buy a game on steam with no problem after it failed to buy this..and i know i have more then $45.. i did send support a email but i got nothing back form them yet
     
  27. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    That would be awesome. The APC will be actually available in the next update and I'm still struggling to find a good model for it. As for the boat models, I already have a couple from the open source assets god Kenney.
    Just let me know over PM how you want to send the models. Your help is deeply appreciated.
     
  28. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    Sounds like a problem from your part. Have you tried buying assets before? Did this ever happened to you while doing that? You can maybe try purchasing a cheaper asset (one that costs a dollar or so) and see if the same error persists.
     
  29. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    i was able to buy assets before with no problem..and i have more then $45 on the card and it is not disabled or anything
     
  30. MHolmstrom

    MHolmstrom

    Joined:
    Aug 16, 2012
    Posts:
    115
    The only changes I've made is for animations and I have not yet touched the border. Unit.cs and resources.cs have some animation and custom states such as what kind of resource you are turning in and then it changes animation so my workers carry wood on the shoulder, carry food in a bag and minerals in a cart, that's the only custom things I have made.
    So the border.cs and the prefab are just as the default one from the demo level.
     
  31. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    so could you say make a paypal button set it to 45 and have it where when i pay it it gives me the files? cause the unity asset store seems to not like me..tried all i can think of
     
  32. EliteSniperx16

    EliteSniperx16

    Joined:
    Apr 9, 2014
    Posts:
    68


    There some of what i can let out for now :D , last two images are under material rework so we texturing them again , Then the last image where its the Frame being constructed then the Building :)

    I got lots to do since we having over 12+ Factions :p
     
    OussamaB likes this.
  33. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    12+? wow my game will have about 9 factions re-telling the story of WWII
     
  34. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    This is very weird.
    - You haven't answered one of my questions tho, can NPC Factions still gather resources?
    - Can you make sure that the "Border.cs" script is placed in the same game object as the "Building.cs" script?
    - Can you take a screenshot of the "Border.cs" inspector? (the one that is not working as intended).
    - Is the border created correctly? (appears in the minimap, etc).

    In order to find out the reason of this issue, please answer me these questions and I will then send you a modified "Border.cs" script that will allow you to debug the source of the problem.
     
  35. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    Are you still facing the same problem?
    The thing is I really want to keep everything organised in the asset store so that you can keep getting updates.
    In case the asset store could not fix your problem we will look for another alternative.
     
  36. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    Man this is looking so good! Please do keep me updated on your game!
     
  37. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    alright.. the auto email i got said i will get a reply with in 5 bisness days so i will let you know if they can help with the problem or not

    and yes im still getting the same problems
     
  38. EliteSniperx16

    EliteSniperx16

    Joined:
    Apr 9, 2014
    Posts:
    68
    Im actually doing WWII to SCI-FI Im not doing a WWII Story just kinda like WWII Scientists discover Alien Tech and Alien Worlds so we are making a World system where you got take over a home world and stuff like that kinda like how Dawn Of War Campaign was. But yea not focus on WWII just having WWII Stuff for Human Upgrades to WWII to Modern then to SCI-FI , And thats where im waiting on building Upgrades :D
    Actually here ill post this photo of our Upgrade Concept maybe it can help @OussamaB see what i mean by the upgrading system.

    So as you can see once "Player or AI" Have HQ Built they are allowed to build Barracks and Research Lab , Then once they have those buildings they are allowed to Unlock the Vehicle Construction Building once they have the Vehicle Construction Building they can upgrade their HQ to Tier 2 HQ , then the process repeats its self.
     
  39. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    cool!

    ya my WWII RTS will be telling the story of WWII where you can play as

    Russia

    Germany

    USA

    Japan

    France

    Poland

    italian

    U.K

    Chine

    and it will be from their point of view AKA with the US it starts when pearl is bombed and the player has to try to defend it with the 2 fighter planes

    for Japan it starts at the very start before WWII started invading China
     
  40. EliteSniperx16

    EliteSniperx16

    Joined:
    Apr 9, 2014
    Posts:
    68
    Cool! :D
     
  41. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    ya also instade of upgrading the buildings in your game..why not do something like what supcom did? AKA once you build the last building that building can build a "T2" builder that can build T2 stuff?
     
  42. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    also idea

    a bunker like building that can hold a number of units and the units can attack hostiles while they are inside the building
    like the bunker form starcraft
     
    MHolmstrom and Paul-Swanson like this.
  43. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    178
    That does look fantastic. I'm really digging the scaffolding but you've done. If you don't mind can you provide some tips on your work flow with That? I'm trying to do something similar but yours looks far superior.
     
    Last edited: May 30, 2017
  44. EliteSniperx16

    EliteSniperx16

    Joined:
    Apr 9, 2014
    Posts:
    68
    I would have to talk to my modelers on how they did it , Ive just been making props since im also working on many other things. Like how to make freaking Photon Network work on the Asset! :|
     
  45. kenmgrimm

    kenmgrimm

    Joined:
    Nov 26, 2013
    Posts:
    35
    Hey guys, it looks like in the last update StopMvt (); was added to the end of Unit.cs: void Start(). Is there a reason that this is necessary? My units no longer head to the gotoposition on spawn because Start() gets executed after the OnUnitPathComplete callback where the navmeshagent begins moving.

    A 2nd issue I've been seeing since before this last update is that when I modify the prefab of any Unit / Building / etc that uses a CustomEditor, the settings do not save once you close and re-open the editor. I had to
    EditorUtility.SetDirty(Target);

    to the end of OnInspectorGUI() in those scripts to actually get the prefabs to save.
     
    Last edited: May 31, 2017
  46. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    Thanks for the detailed explanation. I will implement the upgrading system gradually starting with building upgrades.
     
    EliteSniperx16 likes this.
  47. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    That should not be there, thanks for letting me know.

    You either need to update the prefab or add that line of code. Sorry for the inconvenience.
     
  48. kenmgrimm

    kenmgrimm

    Joined:
    Nov 26, 2013
    Posts:
    35
    Thank you. Regarding the prefab not saving when using the CustomEditor, what do you mean by "update the prefab"? I'm actually modifying the prefab directly and finding that when doing so it will not mark itself as dirty and therefore allow a save unless if I add that line of code to all of those editor scripts. Hmm, maybe you are saying to drag the prefab into the scene, modify, Apply. I guess that would work too.
     
  49. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    178
    2 Questions
    1. Is there a way to make it so certain Units can attack only Air units?
    For Ground that is easy [simply don't use the can attack air units].
    But lets say an Air Defense System that should only be able to target Airborn units or a Helicopter that would only be able to attack other Helicopters. I don't see away to enable that sort of thing. Very possible I simply didn't see it...

    2. I know in your general animation controller there are 6 states of animation.
    How simple is it to add a 'taking damage' state and then make it so it appears in the Inspector?
    I saw a Unit Damage effect, but in my purposes I'm not interested in using a particle effect. Id rather use an animation state :) (it is entirely possible I'm simply misunderstanding that game object box)
     
  50. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,157
    Both suggestions are simple to add, will be available in the next update!
    Expect the submission of the next update in maximum 3 days.
     
    EliteSniperx16 likes this.