How to invoke action on complete other action

Sabek

New member
Hi, I have a poblem with activating another action after the previous one has finished. I can't activate it because the previous one is still active. Is this a settings issue, or is there another way to do this correctly? There is my code. Someone can help me with that?

1754567960820.png
 
Hi, how is this void called ? I'm assuming it is called immediately when your charged throw is completed, and if yes one possible issue is that you would need to wait a little bit before using the item again if Stop Use Ability On Complete Delay (among your first properties at the top of the Item Action component) isn't set to 0.

I can't look at UCC in depth on my side due to hardware issues, but can offer you one screenshare for free if you need.
 
I'd like to trigger actions one after another. This is a sequence of fishing rod throwing actions: Loading -> throw -> default fishing position. I'd like to trigger them one after the other, but when I trigger it in the method assigned to "Use on complete," it won't activate.
 
Can you please tell us which value you have for Stop Use Ability On Complete Delay towards the top of your charged throw Item Action component, and share a screenshot of the line or event that calls OnUseComplete_ChargeThrow ?
 
Okay please bare with me, here’s a new series of question :
-Can you confirm the log line in your function is displayed in the console when it’s supposed to ?
-What happens if you put a delay before calling the second action ? You can either use a coroutine, the scheduler or even just use the Delay float just on top of the Unity Event in the inspector.
-Are you able to start the second action alone, without calling the first one before ?
 
- The function I sent is calling correctly. Activating the action: CharacterLocomotion.TryStartAbility(itemAbility) cannot start the action because the previous one is currently running. The condition doesn't pass.
- How do I implement this delay? I Tried coroutine but animations were bugged
- I can, but it's not logical in this implementation. I have to load the throw first and then call it.
 
Last edited:
- How do I implement this delay?
Here as I indicated :

IMG_9590.jpeg

- I can, but it's not logical in this implementation. I have to load the throw first and then call it.
On the contrary, it is perfectly logical to check this kind of thing out of the expected order, you will need to adopt this mindset in your gamedev journey. We need to determine whether the issue is purely about the transition between the two actions of if the second one issue not able to start to begin with.

Edit : if your second action does have a specific dependency on the first one, like a reference to a spawned object or a specific animation transition, if the delay doesn’t fix the issue then please try getting rid of those dependencies for the moment to see if the basics of the action work.
 
Last edited:
Maybe, I don’t know, knowing whether the delay changes anything will in any case be a useful piece of information. Will you just please try it ?
 
Okay that's one step forward, but "bugged" isn't enough of a description for us to help you ! Feel free to make a recording, and the offer for a screenshare still stands.
 
I have animations:
- idle - just idle animation
- casting - for casthing throw
- throwing - until throwing of hook
- fishing - animation of fishing

I triggered animation of throwing in called ability. If im waiting for starting I have a few frames with idle animation and its look like bug glith
 
At point exactly do you have those few frames of idle when waiting ? Is it when you're using the delay, and which animations do you want to switch to and from ?

Lastly please install OBS if you don't have it already, it's an awesome free recording software. This is already getting too abstract, we'll need some clear visuals to help here, please make a simple recording showing the issue and have both the game and animator displayed at runtime. Feel free also to take the time to show us what you did in the animator.
 
I fixed that by locked animation by bool in animator :)
I have another question. Is there any way to place an item (e.g., a fishing rod) in the hand so that the hand is in the assigned slot on the rod? I have dozens of fishing rods and I'm wondering if I can achieve this with a single item slot.
 
Glad you got that fixed. If I understand your question correctly, you’ll need the standard its parenting setup. Please take a look at the Item Slots doc page and the Atlas demo character prefab and his empty item parents underneath the Items objects.

You’ll need to do something similar with a first empty objects called Items with a Character Item Slot (by default its balle must be 0 for right hand, 1 for left and 2 for others), and create an empty child with an Object Identifier matching the Parent ID in Third/First Person Perspectives Item for each different fishing rod.

Hope all of this makes sense and is helpful !
 
Back
Top