Search Unity

[UPDATED] ICECreatureControl v1.4.0 - creature AI for enemies, animals, monsters, zombies ...

Discussion in 'Assets and Asset Store' started by icetec, Aug 11, 2015.

  1. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi Enoch,
    thanks a lot for this infos. I have already implemented your above-mentioned changes as suggested.

    The negative speed option has already been implemented in one of the first versions for small backward movements during an attack, so it is quite possible that something has gone wrong during the revision. I'll check and fix that.

    Many thanks Enoch! All mentioned problems are fixed with the next minor update, which should be available at the end of next week.

    Btw. I'll answer your other post tommorow ...

    Have a great day!

    Pit
     
    Enoch likes this.
  2. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi Rasto,
    you could use the Effect option of an Impact to initialize an empty object with a custom script to send the mentioned message.

    By doing so you could handle it directly, but you are right, it would be a general benefit, if a body part could send messages directly when it gets a hit and therefore I'll add a BehaviourEvent object to the Impact.

    Have a great day!

    Pit
     
  3. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I did find one thing that worked. If I click the Save button to save the creature preset to a file then when I save the scene everything gets saved properly. But there are tons of assets with custom editors that don't have this problem so I would suggest reaching out to Unity to see if there might be something you're doing wrong.
     
  4. Enoch

    Enoch

    Joined:
    Mar 19, 2013
    Posts:
    198
    Thanks for the response it has to be tough keeping up with everybody's posts. You're doing a great job! I am loving this product now that I am starting to understand it. Source Code for the win.

    Btw for anyone that was curious I fixed my issue with runtime Waypoints for the patrol mission with the following:
    Code (csharp):
    1.  
    2. public void SetWaypointGroup(ICECreatureControl creature, GameObject waypointGroup)
    3.         {
    4.             creature.Creature.Missions.Patrol.Waypoints.Reset();
    5.             creature.Creature.Missions.Patrol.Waypoints.WaypointGroup = waypointGroup;          
    6.             var cwps = CreatureControl.Creature.Missions.Patrol.Waypoints.Waypoints;
    7.             for (int i = 0; i < cwps.Count; i++)
    8.             {
    9.                 cwps[i].Enabled = true;
    10.                 cwps[i].Selectors.Priority = 20;
    11.             }
    12.         }
    13.  
    Basically call this with the parent object to all your waypoints and your done. Works perfectly.
     
    icetec likes this.
  5. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I started following the first tutorial making a new creature.
    But my character with it's scripts is no more working , it is stuck with no animation playing and no controls responding ? Why the plugin would interfere with the player object controls, physics and animations ?
     
  6. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi zenGraden

    Oh...Yes, this asset named as "ICE Creature Control " but this asset is not for provide us player control system for creature. This is system for creating "AI Creature" and enable us to handling systems like condition, status, memory, and of course including their animation.

    Short to say, this asset is created for overwrite(manage) animation and physics, to controlling mainly NPCs. Not for controlling Player for now.

    Thanks to Pit the creator of this asset, code has been polished in v1.3.x, so as long as source codes are visible, you can create integration easily with a lot type of player controlling frameworks like "Third Person Controller","UFPS" or "Easy Weapons" and so on.

    regards,

    Ryuichi
     
  7. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    @Ryuichi
    To clarify,my player character controller works well, but as soon as i include ICE creatures ; it stops working.

    EDIT
    ICE Creature needs it's own layers and game settings, if you have a character controller system with it's own layers and game settings, depending on the settings it can not work with ICE Creatures.
    The solution is to use a simple controller without any specific game settings or layers worked.
     
    Last edited: Feb 18, 2017
    Ryuichi173 likes this.
  8. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    @icetec
    I like the plugin it has lot of options, it is mainly animals and creatures oriented and less characters oriented, so there is some things that could make it more adpatable and more fine tuned for any kind of games with characters (flying , leviation etc ...)


    It's a long list of requests, perhaps we can code them later instead of asking an implemention.

    1) Stamina bar option
    Each creature attack will decrease the stamina bar. When it reaches 0, the creature must wait a defined time until the stamina bar if full again or until some treshold limit before beeing able to perform another action.

    2) Limit max number of melee and ranged attackers and wander wait zone radius
    For melee characters have an option to let only 3 or 5 characters approach and attack the player at same time , the others will wait in some at their position or wander in a "melee wait zone radius".
    This will avoid characters blocking others when there is one target only.

    3) Acces to a new counter variable couting the number of attackers melee and ranged attacking the player or the creature
    Characters or creatures could use this variable in interactions actions to choose to attack or not the player or to choose any other action, like some units only attacking when there is at least two attackers.

    4) Keep creatures with ranged attacks to stay away from each other within a range
    When they move towards the player , they group as a block in front of the player blocking other creatures behind from firing at the player with ranged attacks ( because it's navmesh they take the same shortest navmesh path to the player ).

    5) Others creatures blocking creature move
    There is no real avoidance system with Navmesh but only moving around and pushing others navmesh agents.
    When a creature is moving to player, but it's velocity is below a treshold during some time it would be good to have an option if we need it, to tell the creature to stop and wait idle a random delay range before moving again.
    Because i don't like how NavmeshAgents behave when they are several trying to move to player close distance, they are pushing each others and the players and it looks weird.

    6) Actions repeat with random delay range
    The animations and actions can be "loop"
    But i would need a delay options with random time range value , to have a creature attack and wait a some time before playing again the animation. Can this be made in the action or the behaviour animation or both ?

    6.1) How to vary between several actions ?
    - How to launch this combo that would be actions luanched in sequence : attack 1 , then attack 2, attack 3 if the player is still in range and in sight.
    - How to randomly launch actions attacks 1,2,3 ?
    This is to avoid the borring same action playing in loop that looks not natural.

    7) About angle of sight of creatures , is this a bug ?
    I have a creature with a very low turning speed to face the player, how to tell it to attack only when the player in in some angle sight ? Can we define the creature angle sight ?
    Because the "selection angle" for the creature for the attack is checking the angle player is facing to the creature instead of checking the creature facing angle to the player.Did i missed something ?

    I would need some more options to make actions with more fine tuned conditions

    8) Angles between creature and target conditions (horizontal , vertical)
    - for example validate an attack when the angle between creature and player is within a
    range horizontally and an optionnal vertical angle second check

    9) target position condition inside a tweekable height MIN - MAX
    (If the player is in range BUT it is flying and is just above the creature, the creature can't
    attack).

    10) Outside of "Minimum radius" condition for actions
    The player is in creature range, but player is on top or above creature, the creature should flee away

    11) Flee away from target action
    Flee away to a valid position (or navmesh) in opposite direction of target within a radius.

    12) Condition : Target not reachable with timer wait
    Using navmesh, if the player moves to a position not inside navmesh, the creature get stuck at a navmesh limit without any animations and any actions.
    There is namesh function : NavMeshAgent.CalculatePath it returns True if a path is found.

    The creature should stop moving and wait a little because the player is flying or in some region the creature cant reach (navmesh).
    If the time limit is reached and the target is still not reachable the creature should be able to perform any another action like "alert", "move away" "move to home location" etc ...


    13) Easy AI : Variables creation and acess with chained conditions
    It would be great to be able to create our own variables for a creature and use them to control Actions
    For example a dragon or magic character would make these checks for each action below :
    Action Fireball attack = on player in range + Mana stock > Fireball need + action weight = 80%
    Action Mana recharge = player out of range + Mana stock < 50% + action weight = 50%

    etc ...
    This could be done using :
    - BlackBoard variables panel
    Where we declare and initialise variables for each creatures
    mana -> float -> value max = 300 -> regenerate speed/second = 0
    itemOwned -> bool -> false

    - Add weight value to actions, i don't know if "probability" is the same signification ?
    - Add pre conditions lists to any actions
    "Player in range" == True
    "Mana" >= 20%
    "Action weight" > 50%

    - Post variables assignments when an action is finished
    "Mana" -> Decrease -> 10
    "itemOwned -> Set Value -> true



    I don't know if the plugin should stay focused on simple creatures or if it should extend to become more multi purpose ? Because this reprensents some more work.
    I'll see if i can make my own actions and conditions from the existing code, perhaps it's the best way to extend the plugin.

    Thanks.
     
    Last edited: Feb 18, 2017
    Ryuichi173 likes this.
  9. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi zenGarden

    I agree with you. In case of several situation which you mentioned, I created "Wait" actions or duplicated rules to creatures to enable to work more randomly if not using custom scripts for controlling them.

    That's means that AI checking duplicated rules a lot of time.

    Yes, may be my solution is wrong some ways.
    If Pit answered to solve these problems, it will be help for me, too.

    regards,
    Ryuichi.
     
  10. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hi Ryuichi

    Yep, if it was more flexible and let people make their own conditions and variables , we could really make any kind of AI far beyond what is possible actually.

    I also proposed some Easy AI based on conditions and actions weight similar to some existing systems.This would give us endless possibilitiess to extend the AI , specially usefull for characters.
     
    Last edited: Feb 18, 2017
    Ryuichi173 likes this.
  11. Enoch

    Enoch

    Joined:
    Mar 19, 2013
    Posts:
    198
    Personally What I think this asset needs posthaste is an injection point for our own code.

    User defined code methods for following:

    1) Target Selection Criteria - advanced tab for target selection needs to allow us to attach or own bool returning functions (you pass us the selection object we pass back true or false). This would allows us to make conditional selections for whatever criteria we want, you can't code for every case but we can, we just need a consistent supported place to put our logic that won't get overwritten on every update.

    2) Behavior Selection Criteria - same as above but for behavior rules (within the same behavior) instead of target selection.

    3) User expanded Data Set - The current set is great but you're going down the path of trying to cover every possible situation we as users could need. This will eventually be an exercise in futility. Let us define the Data model. Continue to provide a starter data model built on top of a more generic system but let us add our own custom attributes to the creature. Note: that if you do 1 and 2 this become less of an issue, we can attach our own expansion monobehavior data model scripts, that our own Target Selectors and behavior selectors consume.

    4) A Weight value for behavior rules - If I select Random for multiple rules on a behavior, I would like to specify a weight for the random behavior rule selection. This way I can specify which rules are more likely to execute over others.
     
    TeagansDad and TonanBora like this.
  12. Jacky_Boy

    Jacky_Boy

    Joined:
    Dec 8, 2013
    Posts:
    95
  13. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Is there video tutorials showcasing how to :
    -Call character script custom functions from some action ?
    -How to use "Target Events" and "Creatures Messages" ? is there some examples videos ?

    Thank you.
     
  14. Sorrowthief

    Sorrowthief

    Joined:
    Dec 14, 2016
    Posts:
    48
    These are things that I would love myself. Pit mentioned that more tutorials are coming and some will be more focused on things like NPC combat and stuff so hopefully we will get more in depth tutorials soon. I do beleive he is hard at work with the next patch and I think there will be some very cool new features that may help us with these sort of things. I've been messing with it a lot and every day I figure out something new I can accomplish with Ice, so hang in there and keep trying till we get new vids or tutorials.
     
  15. Sorrowthief

    Sorrowthief

    Joined:
    Dec 14, 2016
    Posts:
    48
    How can you make an animation play just once. Right now I have an NPC that when my player approaches he begins his string of animations for standing, then talking. I have checked play once on the standing part and it says clamp. It alsways seems to loop or cycle back to the standing anumation after the talking animation finishes. Is this something I need to accomplish with Events?
     
  16. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    In "animation" and "wrap mode" you can choose "Once".

    I also think he is too buzzy right now, let's keep our requests for later.

    I am not sure asking to bring more stuff to ICE Creatures to control and manage complex characters AI is a good thing.Perhaps it should stay simple for managing creatures eco system and able to be used for simple characters behaviours ( ICE Creatures is also good for people that don't have any coding knowledge).

    As i was using it to control characters i felt limited very quickly if you read my list of requests.
    ICE Creatures is really designed first to manage creatures eco system not to manage complex characters AI with more features and parameters.
    So i switched to NodeCanvas Behaviour Trees to make AI for characters and creatures or Npcs, but i would be happy to come back to ICE Creatures if it would expand to allow deeper characters AI and behaviours or if it was a simple way to add our own scripts logic to add more conditions to tigger actions actions.
     
    Last edited: Feb 19, 2017
  17. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    493
    You can already do this.
    If you watch my first ICE live stream recording, I show you how to use a Creature's Stamina to limit the actions it can take (in the case shown in the video, preventing prey from running if it gets exhausted).

    You can create multiple rules for behaviors, each rule with its own settings. You can then set the behavior to select which rule to use based on random chance.

    Nope, not a bug. :)
    You have to toggle the Line Of Sight button on the selection criteria for interactors that you only want to be in effect if the target is within the creature's field of view.
    To do this though, you have to go to the creature's Status settings, and scroll down and enable Sensora options.
    These options allow you to set the creature's field of view, and its sight range.

    Create an "ESCAPE" behavior, and set its "Move" option (inside the movement settings for the behavior) to "Escape" and adjust the escape settings as needed.

    I like the creating our own variables idea! :)

    Number 2 would also be handy, as there does not seem to be an easy way to avoid enemies clustering around one target, and pushing, and shoving one another in an attempt to reach said target.
     
  18. AcePhilips85

    AcePhilips85

    Joined:
    Mar 18, 2016
    Posts:
    20

    Hello Pit! I've been away from using the ICE asset for a few weeks while I worked on some other aspects of my game. I am back and ready to continue learning the new version. As I said before, I am using ICE in integration with Opsive TPC. I followed all of your steps and almost everything seems to be working just fine. I can have my creatures pursue and attack my player character, and my player character can damage and kill my creatures... but my creatures do not seem to deal any damage to my player character or effect their health in the TPC like they did in previous versions of ICE creature control. Perhaps i'm missing a step? how can I get my creatures to apply damage to my player character? I have been through both sections for integration and damagehandling in the pdfs but I can not seem to get anything to work. Thank you again for your hard work. Have a great day!
     
  19. AcePhilips85

    AcePhilips85

    Joined:
    Mar 18, 2016
    Posts:
    20

    Also, This was a great resolution for having my colliders disabled when my creature dies in previous versions of ICE... but this script no longer seems to work in the new version. My creature dies, and the collider does not disable itself with this script anymore. I was wondering if there is an updated version of this script for the new versions of Unity and Ice creature control. I've said it before and i'll say it again... this asset hands down has the best support I've seen so far. Thanks again for all you and your team do for us. Have a great day!
     
  20. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi TobanaBora

    I'm always appreciating you because you give us detailed answer!
    Perhaps, previous my answer was too a lot of lacks of informations.

    By the way, how do you doing if there are too alot of duplicated conditions in behaivers?
    Simplicate them to enable to control? or do you have tips to compress them?
    I think, condition group may be help for it, but sometimes I forgot what group I had made.


    Hi AcePhilips85

    Have you ever tried new "Corpse" option?
    I think, it might be help for your situation if it is not special case.

    "If use Corpse is flagged you can assign a GameObject which will be used if your creature dies"
    Detail is written in Manual.

    And about TPC integrations, it is written in manual too.

    "To combine ICE with supported third party products, just open the ICE Integration Menu and press ‘Identify Supported Assets’. ICE will scan now your project folder for supported files and will add a custom define for each detected and useable asset."

    Anyway, ICE has been completely changed comparing to previous since v1.3.x.
    Code has been polished, and interaction to other asset has been simplified...BUT "How to" has completely changed too, so you might be better to forget previous one, especially about codes.


    regards,

    Ryuichi.
     
    Last edited: Feb 19, 2017
  21. AcePhilips85

    AcePhilips85

    Joined:
    Mar 18, 2016
    Posts:
    20
    Hello! thank you for the reply. I have looked into the corpse option, but this option does not satisfy me as much as a disabled collider does. I was hoping there was a way to continue with that. Also, i'm not sure integration is simplified. I can not get my creature to damage my player. I tried for four hours and i'm just lost on what to do. Do you know of how I can do this, or at least how to downgrade to previous versions so I can continue work on my project? This whole update of unity and ICE has made things so much more difficult, especially since before all I had to do was add a TPC adaptor and everything was taken care of. I am not sure if your on the development team for this asset, or if your just nice enough to try and help. Either way thank you for the reply. I just don't feel like my questions were answered on a. how do I disable a collider when my character dies (it was better for me) and B. how do I get my creature to apply damage to my character. If I follow the steps in the guides for integration and for applying damage My character can damage and kill my creature but my creature can not damage and kill my player.
     
    Ryuichi173 likes this.
  22. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi AcePhilips85

    Oh, I'm only a fan of this asset. Excuse me if I confused you.

    Hmm....You can not get your creature to damage your player?
    I think, DirectOrMessage option might be able to alternative solution for adding damage to player.
    Or It might be better to ask Opsive who creator of TPC to update integration for ICE , because the integration he providing is outdated.

    Any way, best solution is waiting Pit's answer. I feel sorry for that.

    regards,

    Ryuichi.
     
    icetec likes this.
  23. AcePhilips85

    AcePhilips85

    Joined:
    Mar 18, 2016
    Posts:
    20

    I think i have resolved to letting go of the old and moving forward with allowing ICE to provide the status of my player character. I figured out how to get the creatures to kill my player character. I really like opsives health system... but what i like better about the status of the player character with ice creature control is that it is very complex. I didn't realize its more than just health. Its so much more. and a hunger and thirst system too, what? This really is an amzing asset and i'm going through the manual now to try and figure out how to add a health bar to my canvas and so on. My game will be much better off if I just use TPC for my character controller and allow ICE to do all of the health system mechanics. And you were very helpful, thank you.
     
    Ryuichi173 likes this.
  24. Enoch

    Enoch

    Joined:
    Mar 19, 2013
    Posts:
    198
    I can confirm this is a bug possibly in the latest version of unity (I am using 5.6.0b8). I got the same problem and traced it all the down. The Editor is actually setting the enum correctly and inside the debugger the value reads "Once" but for some reason the EnumPopup is always displaying that enum value as "Clamp". As far as ICE goes however I think the data is correct, it is just displaying wrong in the editor. I doubt this is an ICE bug and more likely a Unity bug as that enum and the EnumPopup are both in the Unity space.
     
  25. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi Enoch,
    I hope this will be helpful for you …

    The timer starts when the target is activated. The interval is uniform and independent of reaching a target.

    That's in fact a critical point I am trying to take into account, but however, the random range should also be chosen so that any potential position within the range is reachable.

    You can adapt the Reaction Time (Status Settings) to specify this interval. You could adapt this value to zero to perform the complete perception procedure in each frame, but this is not recommended, because a natural creature can’t perceive its surrounding environment in milliseconds while reacting directly to a given situation without delay. Also please note that perception and response (depending on the settings) can be very complex procedures, which could have a negative impact on performance, so the reaction time should never be set to zero if many creatures are used at the same time and you should increase the Reaction Time whenever you run into a problem with the performance.


    Act #1 is always the initial Rule, which defines typically the minimum requirements to select a target e.g. SENSE. All further rules are optional to specify more details e.g. SENSE, HUNT, ATTACK or SENSE, FLEE, DEFEND.

    You can define as much rules as you want and by using the selection criteria you can design extreme complex scenarios e.g. SENSE, HUNT, ATTACK, EAT or SENSE, HUNT, ATTACK, EAT or DEFEND (in cases your creature was injured during a former attack).

    Please note that there are always more than one single way to reach the desired goal. The Selection Criteria allows you to combine countless conditions and to find the best way to realize your expected goal will need time, especially if you try out new scenarios. Therefore, please take the time to play with the settings but also think about the single steps before starting to realize complex selection scenarios. Finally, the only golden rule here is to keep the conditions as simple as possible.

    Tip: You can use the ‘E’ button to enable/disable a single condition, so you can check the impact of a single condition without to delete other ones. You can observe and modify the conditions also at runtime. Please consider here also the color-code: green means that a condition is positive, red that it is negative. A yellow condition marks unchecked conditions e.g. in cases that a higher AND condition is already negative. And a green Target marks the current active target.

    In principle, the rule with fulfilled selection criteria and the highest priority will be always selected. If multiple valid rules with the same priority would be available, the final rule would be selected by chance. The Stopping Distance have no impact to this selection procedure.

    Normally, interaction rules are executed serially, provided the priority is incremented for each additional rule (Act), but if all defined interaction rules have identical and/or fulfilled selection criteria (including priority), they would be selected by chance. You could also combine both selection procedures by grouping multiple rules by using the same priority.

    By default, rules have no spatial limit or any other conditions, so all rules would be automatically valid, but it is recommended to define at least one or more conditions and different priorities.

    A typical minimum condition is the ‘Selection Range’, so an interactor will be only selected if the creature is within this range. Tip: you can activate the DEBUG feature to display these ranges.

    If you define now multiple rules you can decrease this range for each rule e.g. SENSE = 50m, HUNT = 40m, ATTACK = 2m. But please consider to increase also the priority, otherwise you will not get the expected result, because if your creature is within the ATTACK distance of 2m, it will be also within the SENSE distance and the HUNT distance as well, so all three rules would be valid and would be selected by chance. That’s not a bug, it’s a feature, which allows you to define multiple rules for a specific task e.g a second HUNT rule, so your creature can hunt the target by using different tactics or think about a human NPC, which shall interact dynamically with your player in different ways.

    In addition to the above-mentioned procedure you can define also multiple behaviour rules for each behaviour mode, so you can quickly define several animations and movements for a specific behaviour and/or situation. Your creature can select these behaviours by random or in sequence and keep them for a certain period of time before it changes to the next.

    Yeap, you can activate the advanced target selection criteria and could use the ActiveTargetTime as condition, so you can define how long a target can be active until the conditions will be false.

    Please check the Deathmatch Tutorial Scene which is included in the Tutorial folder.

    That’s already included ... you can handle it by using the dynamic stats of a creature and the advanced selection criteria of a target.

    That’s true. All features and settings can be very intimidating, but do not worry ... just take the time to play with the features and enable the debug features to get a visual feedback and you will see it is easier than initially thought and please feel free to contact me whenever you have a question or if you run into a problem with ICE.

    Have a great day!

    Pit
     
    Enoch likes this.
  26. AcePhilips85

    AcePhilips85

    Joined:
    Mar 18, 2016
    Posts:
    20
    Hello pit! I have been experimenting with several different options I have for my game using ICE. I was wondering if you could help me get my creature to apply damage to my Opsive TPC health component. I have identified supported assets and have added the ice world damage adapter script to both my player character and my creature. Nothing I have tried seems to work. Is it necessary to add a melee or ranged weapon to my ICE creature to get this effect? Please help. Thank you for your time.
     
  27. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hi Pit,

    There is one important request i would like to see in the plugin :
    -The ability to define two or more attacks that can occurs randomly to make it look more natural
    -The ability to loop differents attacks in some specific order
    - the ability to have some random min max delay between attacks, perhaps the delay option should be included in actions.

    Thanks.
     
  28. AcePhilips85

    AcePhilips85

    Joined:
    Mar 18, 2016
    Posts:
    20
    Hello! I am not a developer for this asset but I noticed your post on this thread and thought I may be able to help you out a bit since I get my creatures to do this.

    1. The ability to define two or more attacks that can occur randomly:

    -Highlight your creature in the hierarchy and scroll down to the ICE creature control script in the inspector.
    -Click on the behaviors tab and scroll down to your attack behavior. At the bottom of this behavior section you should see something that says add behavior rule. click the "add" tab.
    - Enable attack rule #2
    - Enable the animation, select your second attack animation for your creature (assuming you have more than one attack animation in the animation component for your creature)
    -you can add as many attack animations to your creature as you would like using this method as long as they are in the animation component. just keep adding behavior rules and adding attack animations.
    -once your happy with the amount of attack animations for your creature scroll back up to the top of your attack behavior and change the order type from "cycle" to "random" and your creature should randomly select attack animations like this.

    Hopefully this helps.

    If your looking to loop different attacks in a specific order then you should use the "cycle" order type.

    If your looking for a delay in your attacks i'm not sure the specifics of the process and i'll need to defer that to the developer. Let me know if this works out as well for you as it does me. Have a great day!
     
    lezan_, icetec and TonanBora like this.
  29. AcePhilips85

    AcePhilips85

    Joined:
    Mar 18, 2016
    Posts:
    20
    Also, one issue I forgot to mention. The wrap mode for attack rule one in the animation tab should be loop. The wrap mode for all other attack rules on the animation tab should be once... or clamp. the order type at the top of the behavior section should be random.
     
  30. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    hello,
    how can the jump (or climb or vault) behavior be triggered while traversing an off mesh link when using navmeshagent navigation?
     
  31. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Thank you AcePhilips85, this is what i was seeking.

    I am not sure delay after or before actions is implemented in the plugin, but this could help for many other usages.
     
    AcePhilips85 likes this.
  32. AcePhilips85

    AcePhilips85

    Joined:
    Mar 18, 2016
    Posts:
    20
    GREAT NEWS EVERYONE! I did not have a Ice melee weapon component attached to my creatures melee weapon. I attached it and now damage is affected just as I desire to my TPC player character. I thought I had one all this time and it was just not set up properly. I thank those who helped ... thanks to pit and ryuchi173.
     
    Ryuichi173, icetec and TonanBora like this.
  33. AcePhilips85

    AcePhilips85

    Joined:
    Mar 18, 2016
    Posts:
    20
    You are very welcome.
     
  34. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Some tips i found to get a smooth navigation behaviour with multiple navmesh agents trying to get close to the player :
    https://www.gamedev.net/resources/_...-avoidance-for-rpgrts-games-using-unity-r3703
    It asks you to create differently the creatures prefab with a "proxy" gameobject and use the new code (There is an example to download and test, you only need to bake navigation before launching it).

    I will create the creatures prefab using this way and incorporate the code for navigation call with this one to get smooth movement and strafing with good orientation.
    You can push it further using that and limiting the number of creatures entering the close distance to the player.
     
    Last edited: Feb 21, 2017
    icetec likes this.
  35. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hello Rasto, off mesh links are currently only very unsatisfactory supported and run automatically once the creature reaches an off mesh link position or rather if 'isOnOffMeshLink' is true. For this, 'autoTraverseOffMeshLink' must be activated. During the OffMeshLink is active, the creature will run its JUMP behaviour, so you have to make sure, that this behaviour is available and suitable. But as mentioned, I'm not happy with the current results and will improve this feature.

    I hope this will be helpful so far.

    Have a great day!

    Pit
     
  36. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi Enoch,
    perfect :) ... this is exactly what will come. To realize this, I have spend the last months to rewrite and prepare v1.3.6 and so the foundations for all this are already implemented in the existing code e.g. ICECreatureAttributes, ICECreatureExtensions, BehaviourEvents, ICE World Template Designer etc. Also there will be an API for your own missions and entities.

    Here you can find the class hierarchy of ICECreatureControl v1.3.2 (I'll provide also the lates hierarchy of the whole ICE World package)
    http://www.icecreaturecontrol.com/docs/html/inherits.html

    Have a great day and let me always know your needs and requirements, which are extremely important to improve this product continuously.

    Pit
     
    Ryuichi173 and Enoch like this.
  37. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hello @zenGarden, I'm sorry for the delay. I will answer your post yet, but please give me a while. I have to finish first some other tasks.
     
  38. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    No worry, there is no urge, take your time.
     
  39. Enoch

    Enoch

    Joined:
    Mar 19, 2013
    Posts:
    198
    This is fantastic news. The possibilities here are endless.
     
    Ryuichi173 likes this.
  40. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    I cant seem to get it to work though. I have the jump behaviour defined and just to make sure I enabled it for all jump/fall/vault... I have autotraverse off mesh link selected on the navmesh agent and in the motion and pathfinding section of cc (although in the creature control next to the auto traverse off mesh link there is a FALSE in parenthesis for some reason, even thought its enabled on the navmesh agent). The jump behaviour is never ran when the creature goes down an off mesh link.
     

    Attached Files:

  41. AcePhilips85

    AcePhilips85

    Joined:
    Mar 18, 2016
    Posts:
    20
    Is there a component I should attach to a characters shield to prevent other weapons from causing damage to my player character who is equipped with the shield? how do shields work?
     
  42. Basbo

    Basbo

    Joined:
    Oct 3, 2013
    Posts:
    11
    Hello Pit, the new version is awesome! Got some time to experiment and I'm hooked :D

    But I have problems with the Wizard window which is rendered to broad and can't be used this way, see screenshot. This is with ICE 1.3.6, Unity 5.5.0.f3 on MacOS Sierra 10.12.3 with a retina screen.
    I hope you can fix this issue in the next update, I love the wizard for development.

    ICE_Screen.png
     
  43. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi BPollux, I'll directly check it ... do you get this issue also if you select an other sections, such as PLAYER or CREATURE?
     
  44. Basbo

    Basbo

    Joined:
    Oct 3, 2013
    Posts:
    11
    Yes, this issue comes on all sections of the wizard, it doesn't change when I select the different buttons. I also tried different screen resolutions but same...
     
  45. volak_

    volak_

    Joined:
    Feb 21, 2017
    Posts:
    8
    Hi Pit - thanks for the plugin I've been learning it the last few days and its pretty straight forward coming from a programming background.

    Couple things though -
    Whats the best way to have creatures do damage? I found a video online which states we should use a collider on a body part so the attack animation does damage. But if any player or creature touches that body part even when not animating they'll take damage - which is not ideal for weapon like staffs which only do damage when reaching a certain velocity etc etc.
    Seems another option is to have the interactor or behavior send a TakeDamage event? but that won't work if for example the staff doesn't hit the target.
    So I guess in an ideal situation we should be able to enable and disable body parts during animations? Is this possible?


    And one small thing - if you can make interactors with game objects of the same type (canibles) a little more intuitive that would be awesome. Currently creatures end up targeting themselves 50% of the time or so and stand still jittering.
    Adding an ADV condition to not select self works kinda, but if you also use a retaining timer as part of a "must complete animation" logic the npcs end up targeting someone else for a single frame and retaining the attack ACT for the whole timer.
     
  46. Enoch

    Enoch

    Joined:
    Mar 19, 2013
    Posts:
    198
    I can respond to this since it is something I just did.

    To fix this problem I derived a class from ICECreatureBodyPart and then registered my own functions with OnRegisterBehaviourEvents. What this allowed me to do is setup two functions (actually I have more than just those two) those were: ActivateCollider and DeactivateCollider. Inside those functions I simply disabled and enabled the colliders. Now on the attack behavior I defined in the events section both ActivateCollider and DeactiveCollider appear in the drop down (you also have specify the body part in the essentials section). I simply call ActivateCollider at the start of the animation and Deactivate near the end.

    Note you could just modify ICECreatureBodyPart directly but deriving a class and keeping if in your own hierarchy protects you from future updates overwriting your changes.

    Also some else mentioned Shield blocking. I also implemented a way to do that via my derived class by Overriding Hit( GameObject _target, Vector3 _point ), I could then detect the hit object was a shield and then I basically reduced damage by 75% for the next half a second or so. That way if the body part (a sword) hit a shield first, when it hit the body it would do 75% less damage.

    I hope that helps.
     
  47. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Those are good ideas!:)
    I think those are best solutions, for now.
    Conversely, it might say that there are no way for non-programmer, for now...

    :Edited

    According to Pit, using Behavior Event we can activate/deactivate collider If it is not special case.
    Yes, I completely forgot about it. :oops:
    To use Event, simply enable the section and ADD a new event on Behavior section.
    It might be simplest way to avoid problem.
    Of course we have to write codes(message) to call methods in some cases.

    Any way, I wondering that whether Pit planning to provide battle system(or basic part of the game) for us or he want be focus on AI.
    Blocking, parrying etc etc.., they are deeply connected with Battle system.
    In other words, to officially support such contents, he may have to construct System, too.
    It might make difficult to integrate with other assets...

    Of course, Pit might have a great idea which cannot imagine for me. :D
     
    Last edited: Mar 1, 2017
  48. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi @BPollux, it seems to be a problem with the Screen.width on Mac Retina screens. Here you can find a update of the wizard script that should fix this issue.
    http://icecreaturecontrol.com/files/scripts/ICECreatureWizardOSXfix.unitypackage

    Have a great day!

    Pit
     
  49. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    The animation triggers still dont work when the creature respawns. When I change in ice_object_animation :

    if ((_stop && _parameter.End()) || (!_stop && (_parameter.Start() || _parameter.Update()))) {
    AnimatorComponent.SetTrigger(_parameter.HashId);
    }

    to:
    bool end = _parameter.End();
    bool start = _parameter.Start();
    bool update = _parameter.Update();
    if ((_stop && end) || (!_stop && (start || update))) {
    AnimatorComponent.SetTrigger(_parameter.HashId);
    }
    then the animations are triggered even when the creature is respawned. With the original code the trigger is triggered only once and when the creature is respawned its is not triggered when the behavior starts.

    Regarding the Jump behavior on off mesh links:
    Please check the screenshots for the settings to try to get the creature to jump. It just walks over the off mesh link.
     

    Attached Files:

  50. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hello Rasto, thank you for this ... I check the cause and will fix it directly, also I will look more closely at the mentioned JUMP and audio problems and will post the solution here.

    Have a great day!

    Pit