Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Unity RTS Engine

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

  1. Scott90

    Scott90

    Joined:
    Jan 23, 2013
    Posts:
    3
    I have RTS Engine v1.4.8 from the asset store.
    I also have Mirror v3.17.4, installed prior, from the asset store. (Errors still persist)

    When I attempt to play multiplayer from the MainMenu scene I get this error.

    "Scene 'MultiplayerMenu_Mirror' couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded."

    I can only assume there's supposed to be a 'MultiplayerMenu_Mirror' scene present within the files but I can't find one.

    Thanks for the help btw.
     
  2. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Ya it seems to be missing. Plus the two scenes showing up as deleted in build settings.
    I just dont understand how you are getting compile errors.
    But then again how could you enter run time with compile errors?

    Oh they were just Import errors my bad. I may of gotten those to. Cant remember.
    Most likely.

    Maybe the last version messed things up.
     
  3. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    @OussamaB You really need to add ToolTips to your public variables in the inspector.
    Code (csharp):
    1. [Tooltip("True if the building doesn't cost any resources")] public bool Free;
    so many things I'm not so quite what they do and having to look it up in the guide is super time consuming where a simple hover over would answer my question.
    Even if it seems obvious what something does throw a tool tip on it anyways. Doesn't get in the way or anything.


    At first I'm just setting up Capital Building and houses for 3 races that will be in my game.
    I get hit with two errors during play mode though. I'm sure I'm just not setting something up right.
    Trying to set up buildings with minimum requirements. Just to get the jiff of things.

    Code (csharp):
    1.  
    2. Destroying assets is not permitted to avoid data loss.
    3. If you really want to remove an asset use DestroyImmediate (theObject, true);
    4. UnityEngine.Object:DestroyImmediate(Object)
    5. RTSEngine.FactionSlot:SpawnFactionEntities(GameManager) (at Assets/RTS Engine/Game Managers/Scripts/FactionSlot.cs:202)
    6. RTSEngine.FactionSlot:Init(Int32, FactionManager, GameManager) (at Assets/RTS Engine/Game Managers/Scripts/FactionSlot.cs:194)
    7. RTSEngine.GameManager:InitFactions() (at Assets/RTS Engine/Game Managers/Scripts/GameManager.cs:309)
    8. RTSEngine.GameManager:Awake() (at Assets/RTS Engine/Game Managers/Scripts/GameManager.cs:162)
    9.  

    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. RTSEngine.BuildingPlacer.PlaceBuilding () (at Assets/RTS Engine/Buildings/Scripts/BuildingPlacer.cs:84)
    4. RTSEngine.Building.Init (RTSEngine.GameManager gameMgr, System.Int32 fID, System.Boolean free) (at Assets/RTS Engine/Buildings/Scripts/Building.cs:131)
    5. RTSEngine.BuildingManager.CreatePlacedInstanceLocal (RTSEngine.Building buildingPrefab, UnityEngine.Vector3 placementPosition, System.Single yEulerAngle, RTSEngine.Border buildingCenter, System.Int32 factionID, System.Boolean placedByDefault, System.Boolean factionCapital) (at Assets/RTS Engine/Buildings/Scripts/BuildingManager.cs:86)
    6. RTSEngine.FactionSlot.SpawnFactionEntities (RTSEngine.GameManager gameMgr) (at Assets/RTS Engine/Game Managers/Scripts/FactionSlot.cs:205)
    7. RTSEngine.FactionSlot.Init (System.Int32 factionID, RTSEngine.FactionManager factionMgr, RTSEngine.GameManager gameMgr) (at Assets/RTS Engine/Game Managers/Scripts/FactionSlot.cs:194)
    8. RTSEngine.GameManager.InitFactions () (at Assets/RTS Engine/Game Managers/Scripts/GameManager.cs:309)
    9. RTSEngine.GameManager.Awake () (at Assets/RTS Engine/Game Managers/Scripts/GameManager.cs:162)
    10.  
     
    Last edited: Sep 23, 2019
  4. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Alright I fixed the 2nd error. It was from not having a Border component on my Capital building.
    Now I'm trying to figure this one out.
    I wish the errors would return more useful information :(
    no idea whats going on.

    Code (csharp):
    1.  
    2. ArgumentException: The Object you want to instantiate is null.
    3. UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:374)
    4. UnityEngine.Object.Instantiate[T] (T original) (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:265)
    5. RTSEngine.NPCBuildingCreator.ActivateBuildingRegulator (RTSEngine.NPCBuildingRegulator buildingRegulator, RTSEngine.NPCBuildingCreator+BuildingCenterRegulator centerRegulator) (at Assets/RTS Engine/AI/Scripts/NPCBuildingCreator.cs:58)
    6. RTSEngine.NPCBuildingCreator.OnBorderActivated (RTSEngine.Border border) (at Assets/RTS Engine/AI/Scripts/NPCBuildingCreator.cs:157)
    7. RTSEngine.CustomEvents.OnBorderActivated (RTSEngine.Border border) (at Assets/RTS Engine/Scripting/Scripts/CustomEvents.cs:335)
    8. RTSEngine.Border.Init (RTSEngine.GameManager gameMgr, RTSEngine.Building building) (at Assets/RTS Engine/Buildings/Scripts/Border.cs:99)
    9. RTSEngine.Building.OnBuilt () (at Assets/RTS Engine/Buildings/Scripts/Building.cs:167)
    10. RTSEngine.BuildingHealth.CompleteConstruction () (at Assets/RTS Engine/Buildings/Scripts/BuildingHealth.cs:145)
    11. RTSEngine.BuildingHealth.OnMaxHealthReached (System.Int32 value, RTSEngine.FactionEntity source) (at Assets/RTS Engine/Buildings/Scripts/BuildingHealth.cs:82)
    12. RTSEngine.FactionEntityHealth.AddHealthLocal (System.Int32 value, RTSEngine.FactionEntity source) (at Assets/RTS Engine/Faction Entity/Scripts/FactionEntityHealth.cs:128)
    13. RTSEngine.Building.Init (RTSEngine.GameManager gameMgr, System.Int32 fID, System.Boolean free) (at Assets/RTS Engine/Buildings/Scripts/Building.cs:137)
    14. RTSEngine.BuildingManager.CreatePlacedInstanceLocal (RTSEngine.Building buildingPrefab, UnityEngine.Vector3 placementPosition, System.Single yEulerAngle, RTSEngine.Border buildingCenter, System.Int32 factionID, System.Boolean placedByDefault, System.Boolean factionCapital) (at Assets/RTS Engine/Buildings/Scripts/BuildingManager.cs:86)
    15. RTSEngine.FactionSlot.SpawnFactionEntities (RTSEngine.GameManager gameMgr) (at Assets/RTS Engine/Game Managers/Scripts/FactionSlot.cs:205)
    16. RTSEngine.FactionSlot.Init (System.Int32 factionID, RTSEngine.FactionManager factionMgr, RTSEngine.GameManager gameMgr) (at Assets/RTS Engine/Game Managers/Scripts/FactionSlot.cs:194)
    17. RTSEngine.GameManager.InitFactions () (at Assets/RTS Engine/Game Managers/Scripts/GameManager.cs:309)
    18. RTSEngine.GameManager.Awake () (at Assets/RTS Engine/Game Managers/Scripts/GameManager.cs:162)
    19.  
     
  5. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I'm thinking i need to start over from scratch.
    Hitting Create new map in the menu isn't helpful at all. Maybe after you already know what you are doing.
    There is to much allowance for human error it seems.

    This error for example. I have no idea what it means. There isn't even a NPC Territory manage Component in the scene

    The building center regulator hasn't been assigned in the NPC Territory Manager component!
     
    Last edited: Sep 24, 2019
  6. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Those errors are harmless and are needed because of the missing references to the multiplayer part of the asset. It doesn't come with the asset directly because it uses another (free) networking asset on the store: Mirror. You can clear those errors, they'll be gone for good and then import the multiplayer integration from the RTS Engine's docs here: soumidelrio.com/docs/unity-rts-engine/multiplayer-mirror/
     
    Scott90 likes this.
  7. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    For the first error, it seems like you're assign a prefab instead of a spawned instance in the scene to the capital and/or houses in the faction slots? That's why it's concerned about destroying assets.

    The second error as you found out is related to the fact that the capital buildings require a Border component. The next patch (which has already been submitted but still awaiting to be accepted from the asset store team) will no longer force you to have a capital building assigned as long as the game goal is not "Destroy Capital".
     
  8. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    You're definitely right, the asset is getting bigger and adding Tooltips for properties and assertions and error checking when initializing entities and components will make things easier for everyone to fix the errors like you just had in your earlier post.

    I'm currently working on adding a new camera controller, once that's done, I will take the time to add tooltips and error checking across all the main components.
     
  9. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    What most users do is they start with the demo scene, they start configuring it and changing units/buildings in it and then once they get used to how everything works. They create their own scene from scratch. While this might not sound ideal, it's a great way to learn at least the basics of how everything works. The documentation includes information about what every field in every component does.
     
  10. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Ya i gave up. Im going to start over from scratch editing the current buildings and units etc...
    I think you need two different buildings sets for each faction. So we can see how doing two different races will work out.
    I think what i'll do right now is just do two factions like you have using the same building set.
    Then i'll work on getting each faction ot have its own set of buildings.
     
  11. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    On Construction states.
    Why does Health Range go by health instead of percentages?
    That means if you update a building max health you have to go and update it there as well.
    Or what if you did a upgrade where all buildings have plus another 100 health. Then you go and build a new one and now the construction state ratio is off.
     
  12. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I'm doing a lot better now with starting over and editing the demo.
    I get this error though not sure what to make of it.

    Everything seems fine in the WharehouseRegulator and the Buildig Placer script
    Think it started happening when I got rid of food as a resource.

    Code (csharp):
    1.  
    2. Build Around object or Building Center for Warehouse hasn't been specified in the Building Placement Request!
    3. UnityEngine.Debug:LogError(Object)
    4. RTSEngine.NPCBuildingPlacer:OnBuildingPlacementRequest(Building, GameObject, Single, Building, Single, Boolean) (at Assets/RTS Engine/AI/Scripts/NPCBuildingPlacer.cs:45)
    5. RTSEngine.NPCBuildingCreator:OnCreateBuildingRequest(NPCBuildingRegulator, Boolean, Building, Boolean) (at Assets/RTS Engine/AI/Scripts/NPCBuildingCreator.cs:343)
    6. RTSEngine.NPCBuildingCreator:Update() (at Assets/RTS Engine/AI/Scripts/NPCBuildingCreator.cs:235)
    7.  
     
  13. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Building Y Offset on the Building Placement component doesn't seem to do anything. Unless thats only for while its being placed? And not the final placement?

    i have this problem right now where when my capital building is placed its setting the Model Y axis to .85 for some reason.
    The colliders seem all fine.
    I don't understand why the model would ever get adjusted. Should just fine the main box collider bottom side y position and set it to that.

    Also I disabled borders and i made it so i can place any building where I want. For some reason though I can't place a 2nd capital building. Is there a max set on capital building some where?
    I completely removed the building border on the capital building. and set all buildings to be able to build out side the border. Doesn't mention anything about a capital buildig limit in the guide.




    How it looks during run time

     
    Last edited: Sep 24, 2019
  14. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    When setting up my villager.
    Should the collecting animation be set in a loop? I notice when he walks up to a tree he only does the chop animation once then stops.
    Doesn't seem to be anything in the manual on setting up animation or did I miss it?

    Also I notice there is no animation state for carrying supplies.

    Could really use
    Carrying supplies when running, walking, idle, and getting hit
     
  15. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Found a bug with construction states.
    From health 0 to 300 it never shows UnderConstruction
    At 300 it does show Model though
    So it may just be the first key state being ignored.
    Version 1.4.8.1


     
  16. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    This makes a lot of sense, I will be updating this and add the option to either do this using percentages or actual health point values. Added to my to-do list.
     
  17. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Yes, the Warehouse regulator that comes in the demo scene requires the Warehouse building to be built around a food type resource, so removing that type of resource will prompt that error.
     
  18. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I just tested it right now and it does indeed has an effect on the final placement of the building.

    That's a strange one. Is the building holding at the correct position while getting placed and then building model's height gets adjusted right after clicking on the mouse to place it? Or is it adjusted as soon as you start placing it.



    I tried disabling the Border components and place a second capital building (with placing outside border enabled) and it worked.
    Are you getting any kind of error? or maybe a UI message while attempting to place the second capital building?
     
  19. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Yes, the animation should be in a loop.

    That's what the Animator Override Controller is used for. Please check the "Drop Off Override Controller" in this doc page: http://soumidelrio.com/docs/unity-rts-engine/units/gather-resource-component/
     
  20. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Try reversing those states (first one is the one with health range: 300-600 and the next one is with health range 0-300).
    Here's a quote from the Building Health component (link: http://soumidelrio.com/docs/unity-rts-engine/buildings/building-health-component/ ):

    I do admit this quite confusing, I should be adding tooltips for the exposed fields in order to avoid this in the future.
     
  21. Crycover

    Crycover

    Joined:
    Dec 13, 2018
    Posts:
    2
    Bugs Engine

    The game is full of bugs. Errors increased after the last update. The user doesn't help me fix errors and doesn't refund my money. Don't buy this assets.
     
  22. Crycover

    Crycover

    Joined:
    Dec 13, 2018
    Posts:
    2
    Don't buy this assets producer don't help.
     
  23. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I've been providing hours and hours of support to this user on the discord server since July. Two days ago, he asks for a refund and threatens to post these comments on the forums if I don't provide one. I can't really say for sure that this refund request is legitimate or not because a lot of time has been spent trying to help this user and the refund request comes months after using the asset. I asked him to contact the asset store and if they enforce a refund, I'll accept but instead, he does this.

    I've reported this post and hopefully, it'll get removed.
     
  24. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648

    Well this is strange. It slowly increases the model Y axis as its being built. Here is a video showing it. Edit: Most likely has something to do with the building Construction Effect cause the max height is set to .85. Alright i'll mess around with it. Probably the way im scaling the model. I notice you scale models by changing the scale of the over all model. Where I am changing just the scale of the Model. So me changing the scale is probably messing up your math.

    Edit 2: Turns out scale didn't matter. I fixed it by simply disabling the construction effect for now by setting max height to 0. Interesting to note. Even though i have it set to 0 or .85 during construction time it auto changes it to .5 for some reason




    I figured out the capital building placement issue after all the sudden i couldn't place any building.
    The y offset setting on the Building Placement Component. If thats not set to .03 then i can't place buildings anywhere. The surrounding circle stays red. Keep in mind I have no problem leaving it at .03. I'm just saying thats what was going on. :)

    Also I just noticed for some reason my peasant is really far away from the building when building it. Does worker position handle this? All 4 worker positions are right next to the building.
     
    Last edited: Sep 25, 2019
  25. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Thanks man. ya that fixed it. Good stuff. Great support. Only been using RTS Engine for about two days now and im moving right a long.

    Does RTS Engine not have save game for Singe player at least?
     
    Last edited: Sep 25, 2019
  26. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Alright I got this figured out. Was simple enough. Animator Override Controller wasn't what I was needing though. Anyways it was Source Effect and Target Effect with the EffectObj;

    It doesn't make sense why there is only one Drop Off Object and One Drop Off Override Controller. Seems each Element should have its own. Other wise Im going to have to create special logic on my Source Effect script and change the Drop Off Object according to what resource he is carrying back.
     
    Last edited: Sep 26, 2019
  27. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    @OussamaB
    I came up with a good idea for you man.
    Another asset developer makes orcs, humans elves, undead, barbarians and other character sets for RTS games.
    He also sells a more degraded human characters with buildings for only $15. These human characters are not as advance as the other character sets he sales.

    So my idea is this. Ask him if he will release the asset in the link below for free to everyone which will allow you to use this asset for your demo. In your RTS Engine asset page you will advertise him if people want more characters sets.

    This way your demo will look better, your characters will all have animations and will increase sells for both you two developers.

    I think your current graphics makes it a little harder to learn too. Some models look close alike. Plus it will make users be more comfortable when playing around with the demo and you will be able to set up the demo even further with having animations for all the states.

    https://assetstore.unity.com/packages/3d/characters/toony-tiny-rts-set-135258
     
  28. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    OnDisabled Event on EffectObj.cs seems to be broken. That or im doing something wrong.

    I created a child game object on my Villager named Target Effect and added the Effect Obj component and assigned it to TargetEffect on ResourceCollector component.

    When my villager starts to chop wood he fires the method OnResourceCollectEffect();
    When my villager stops chopping wood OnDisable never gets called?



    I notice every time he starts collecting wood he creates a new TargetEffect gameObject with the Effect Obj component.
    The old ones never get removed. Default life time is set for 3 seconds.
     
  29. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Idk I think im going the wrong way with all this. All I need is a simple call back when the village starts collecting, stops collecting and drops off.
    I notice in the Manual it says the DropOffObject only works when Auto Collect is disabled. Why is that? Doesn't make any sense. I'm not sure if i want to use auto collect yet. Might have the user decide later on.

    Anyways found a bug with DropOffObject. When DropOffObject Activates for some reason his parent transform scale decreases super tiny. Making his Object not show up.

    Target Effect and Source Effect is really just for particles i can see that now.
    I don't know if i like the Animator Override Controller route to send a event that he started to collect and that won't help me out to send me a event when he is finish collecting.

    Each Resource Element should have their own Drop Off Object and Drop Off Over ride controller.
    And 3 call backs on the component. Starts Collecting, stops collecting and drops off.
    Can just be a empty string field and we fill in the function name.
    Also need a call back for when the resource runs out of resources. For instance I want to make my gold mine collapse when it runs out of resources.


    Another large problem is there is no control over SecondarySelection on Resource.cs
    Soon as he starts chopping wood the main model hides and it shows the Secondary model.
    What I want to do is keep the main model showing until all the wood is ran up and then have the tree fall over and disappear. I can fix this for now by simply using the Model as the Model and the Secondary model.

    Also i was thinking today. If a villager is chopping wood and the tree runs out of wood before the villager is full does he go to the next tree or does he return with the wood? Cause he really should go to the next tree. was wondering about this. That should happen even when auto collect is off.
     
    Last edited: Sep 27, 2019
  30. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Ahh I figured out whats going on with the OnDisabled Event on EffectObj.cs not working.
    It fires if i tell my villager to stop chopping wood but it doesn't fire if he stops chopping wood when he is full and heads back to drop off. So thats probably bug. I'm sure you want it to trip in both situations.
     
  31. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    On the next update can you add a intensity setting on the SelectionManager so we can make selection glow.
    When you are setting color by script during start it over writes intensity settings on shaders.

     
  32. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Oh well, the construction effect is supposed to be something for the demo game only but I think I've left it out in the new map configurations prefab. That component must be disabled for the building prefabs as it will be only enabled once the building has been placed. Else, it will cause this weird behavior you're getting.
     
  33. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    If the worker positions are unreachable to the navigation mesh then units will take the closest position to it. Leaving the worker positions unassigned will make the unit always look for the closest position to the building. You can turn on the navigation tab and take a look at your scene and see the space that the Nav Mesh Obstacle component of the building is occupying.
     
  34. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Thanks for the kind words.

    This feature will be coming as soon as I'm done with the refactoring/re-writing updates I'm currently invested in, so probably really soon.
     
  35. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Makes sense, added to my to-do list.
     
  36. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Auto collect means that each unit of a resource that a unit collects gets added automatically to the faction's resources so the unit will not be doing any resource dropping at a drop off building since resources get added automatically.

    Can I ask what exactly are you going to use the source effect for? Maybe there's an easier way to have something for each resource type.

    Yeah, correct, figured this out and fixed it. Thanks a lot for reporting this, if you want to have the fix before the next patch, please either e-mail me or send me a private message on the discord server with your invoice number.
     
  37. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The drop off object is simply a child object of the unit that gets activated when the unit is dropping off resources, else it remains hidden. The Resource Collector component doesn't really change its scale or its parent object for that matter.

    Not really, it can be used for any type of object you want. But it's supposed to be only temporarily visible and that's what most particles are for.

    You don't need the Animator Override Controller for that. Check out the resource collection events on this page: http://soumidelrio.com/docs/unity-rts-engine/scripting/custom-events/

    Yup added to my todo list.

    Well these are currently custom events only (see above link) but the one for drop off is missing. I will consider adding Unity Events for which you can drag and drop methods in the inspector.

    There's a custom event for this (see above link).
     
  38. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Yeah, that is what the current secondary model is used for. There are so many specific use cases, will see how I can put more control for you regarding switching the resource model but this won't be a priority for now.

    The villager would stop collecting, if the villager has "Auto Collect" enabled, then it will immediately search for the next resource and start collecting it.
     
  39. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Problem is not all the shaders might have this intensity setting so having an intensity field on the selection texture wouldn't make a lot of sense.
     
  40. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Ya i see your point kinda on that. but I don't think it errors if you apply it to a shader that doesn't support it.
    The problem is soon as I make the first edit to RTS Engine i might as well just start doing my own edits for everything. Cause when you do a update then I can't just replace the scripts that I placed edits on.

    I guess if there was a call back every time the color changes then I could readjust it with another script.
    You probably don't edit that selection manager script very often though.
     
    Last edited: Sep 27, 2019
  41. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Thanks man i'll just wait for the patch. I'm patient.
    Ahh ok that event page is what I needed in the manual thanks man.
    Can probably do everything except drop off like you said.


    Edit: On your CustomEventsExample picture in the manual
    Its showing you are using OnEnabled and OnDisabled.
    Those methods should be OnEnable and OnDisable.
    Its a common mistake. I've done it in the past.



     
    Last edited: Sep 27, 2019
  42. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I just wanted to note. The OnDisable bug when stop collecting. also effects your custom event UnitStopCollecting. I'm sure you know that though. Just wanted to let ya know to make sure it gets fixed in both spots. I'm sure fixing one probably fixes the other though.

    also is there a way to get how many workers are currently collecting on a resource?
    Was trying to see if it was stored in resource but can't seem to find it. Couple methods that I'm not sure what they do.
     
    Last edited: Sep 27, 2019
  43. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    My 7 AI's on this map aren't collecting resources.
    They build 4 villagers and thats it.
    I'm editing the demo so idk why the first two that i didn't even change anything on would not be working.
    No errors going on.

    Must be some additional thing im suppose to setup for AI?


     
  44. spktools_com

    spktools_com

    Joined:
    Mar 28, 2019
    Posts:
    15
    When I'm taking the catapult prefab, and replacing the model with a longer one it starts going up and down from time to time. Any ideas what this could be? Nothing except the model is changed from the original catapult prefab so I guess it must have something todo with gravity or weight? Thanks for your help

    See video:
     
    Last edited: Sep 29, 2019
  45. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
  46. spktools_com

    spktools_com

    Joined:
    Mar 28, 2019
    Posts:
    15
    @Shadowing thanks for the notice. I updated the access
     
    Shadowing likes this.
  47. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Oh hmm. Is there a hill there is that flat surface?
     
  48. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Well, the times that the color changes should be when the entity is created or converted. That's it, and for both of these, there are dedicated custom events for both units and buildings and you can access the selection texture there.
     
  49. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Yeah, thanks a lot for pointing this out. Will fix it.
     
  50. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Can you update S-Inventory please? Thank you