Author Topic: Problem with thrown enemies after pause  (Read 100 times)

Starlock

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Problem with thrown enemies after pause
« on: August 08, 2018, 04:37:45 am »
When I lift a destructible object, and then pause and check the Info of an item, the action command no longer allows the hero to thrown the object. This only seems to happen when the info message is used. Does anybody have any idea what could be a likely cause of this?

EDIT: I've tested it further, and this will happen no matter what whenever any dialog is opened while paused
« Last Edit: August 08, 2018, 04:41:59 am by Starlock »

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1123
    • View Profile
Re: Problem with thrown enemies after pause
« Reply #1 on: August 08, 2018, 09:08:24 am »
Which Solarus version are you using? Which game and which version of that game?

Starlock

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Problem with thrown enemies after pause
« Reply #2 on: August 08, 2018, 04:47:32 pm »
I'm using 1.5.0, since any version higher than that causes an issue with one of my custom entities. It's a problem happening on my own game.

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1123
    • View Profile
Re: Problem with thrown enemies after pause
« Reply #3 on: August 08, 2018, 06:36:40 pm »
The bug also happens in my games and still with 1.6. I guess we had never noticed before :)
https://gitlab.com/solarus-games/zelda-xd2-mercuris-chess/issues/133

Max

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Re: Problem with thrown enemies after pause
« Reply #4 on: August 09, 2018, 12:38:28 am »
I also have this problem in my game, which I think is 1.5.3? I don't think I ever solved the issue, but I'll look into what I found out once I get home.

Max

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Re: Problem with thrown enemies after pause
« Reply #5 on: August 09, 2018, 04:38:28 am »
Just to confirm, I still have this issue also. 1.5.1, though.

I did some testing a while ago, and my suspicion is that game:set_paused(false) puts the hero in an "idle" state instead of in a "carrying" state? Anyway, I think I traced the issue to game:set_paused(false), but then I forgot and never fixed it.

To reproduce it on my end, my pause screen shows a dialog and some images (that's all it does), and every time I pause when carrying an item, I get this bug.

Question- does swinging your sword force the item to be thown and reset the action button? That's how it works for me, which "solves" the issue but it's still a bug.

« Last Edit: August 09, 2018, 04:40:49 am by Max »

Starlock

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Problem with thrown enemies after pause
« Reply #6 on: August 09, 2018, 04:56:39 am »
Yeah, using the sword causes the hero to throw the carried object.

Diarandor

  • Hero Member
  • *****
  • Posts: 978
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Problem with thrown enemies after pause
« Reply #7 on: August 09, 2018, 05:16:39 pm »
That (i.e. the hero throwing the item) can be avoided if you add some code to the corresponding event(s) on_key/command_pressed().
“If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you.”

Max

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Re: Problem with thrown enemies after pause
« Reply #8 on: August 09, 2018, 07:04:23 pm »
Well right now, the fact that the hero throws an item on swinging the sword is the only thing that keeps this bug from being game-breaking, so maybe don't address that issue yet, haha. Also it makes sense, if you've got a shoebox or whatever in your hand then you suddenly swing a weapon you'd probably drop the shoebox :p