Hi guys, can anyone explain to me what I’m doing wrong?
I don’t understand why the player only takes animations into consideration when he has to replace the weapons in his hand while if he has to take a weapon on the ground he doesn’t.
example:
if the weapon animation is reload or shot and the player approaches the weapon to take it, the fact of not taking them is ignored if the animations are one of those listed above.
which doesn’t happen if the player has two weapons in hand and has to switch
Sorry of i’m lame, does anybody know how to help me?
I’m sure you’re not lame. It’s just that people either aren’t here yet or they don’t have a solution. It’s tough to debug snippets of other people’s events.
My first thought is the line that works triggers when the count > 1. Is that the same variable as the one in the prior event that needs to be >2? I’m just wondering if that is preventing the value to be greater than 2.
It’s difficult. Sometimes it’s something obvious. It’s tough when you don’t know what things represent.
I would test to make sure each event is being triggered. You can add an action to add the value of a variable to the debugger to check its value. I like to use a sound action as a nice audible indicator that an event is being trigger. For instances, I like to use rotation or change the hue as a way of seeing which instances are picked.
Keep debugging. It could be a typo, wrong variable name or maybe an event needs a trigger once. It’s tough. Maybe someone else will see what you and I can’t.
I don’t think you’re lame at all. I think your question is just pretty advanced for a lot of the users in the forum (myself included) and we just don’t have an answer yet.
From what I can gather it seems like you’re having trouble with what the game is prioritizing and when it is displaying what is prioritized. I think you might have success if you work off the NotAVania example that is available as a game template. The main thing that I think might help you is the How to handle complex logic – The finite state machine (FSM) - GDevelop documentation This is something I plan on learning for myself in the near future.
Guys thank you so much for your replies, I’m really going crazy! I don’t understand why the fact that the player is reloading the weapon isn’t taken into consideration… I’ll try to test the code better.
I wanted to inform you that I managed to solve it by necessarily adding a new scene variable that blocks the grip of the weapon on the ground.
thank you guys
That’s good to hear!
I hope we get to test your game soon!