A.I Use item

Frocha

Member
Now im trying to create a basic script for the A.I to just use an item in BD.

Assets\My Scripts\Attack.cs(20,41): error CS0311: The type 'Opsive.UltimateCharacterController.Items.Actions.Use' cannot be used as type parameter 'T' in the generic type or method 'UltimateCharacterLocomotion.GetAbility<T>()'. There is no implicit reference conversion from 'Opsive.UltimateCharacterController.Items.Actions.Use' to 'Opsive.UltimateCharacterController.Character.Abilities.Ability'.

Thats the error I get, im just trying to get him to fire the item he has equipped. He has no targets or anything. Just fire the weapon.
 
I tried using that but cant get it to work. Untitled5.png

Error CS0311 The type 'Opsive.UltimateCharacterController.Items.Actions.Use' cannot be used as type parameter 'T' in the generic type or method 'UltimateCharacterLocomotion.GetAbility<T>()'. There is no implicit reference conversion from 'Opsive.UltimateCharacterController.Items.Actions.Use' to 'Opsive.UltimateCharacterController.Character.Abilities.Ability'. Opsive.UltimateCharacterController.Demo C:\Users\John Poe\Desktop\Create with Code\Test Projects\Actual_Map\Assets\Opsive\UltimateCharacterController\Demo\Scripts\AI\MeleeAgent.cs 46 Active
Error CS1503 Argument 1: cannot convert from 'Opsive.UltimateCharacterController.Items.Actions.Use' to 'Opsive.UltimateCharacterController.Character.Abilities.Ability' Opsive.UltimateCharacterController.Demo C:\Users\John Poe\Desktop\Create with Code\Test Projects\Actual_Map\Assets\Opsive\UltimateCharacterController\Demo\Scripts\AI\MeleeAgent.cs 66 Active

I've noticed "Use" works in melee agent example script, but when i tried to write my own script I get the error above. Do I have to create a "Use" ability?
 
Top