[RESOLVED] Clicking action... seems to not change animation?

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
User avatar
Eizzoux
Posts: 571
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

[RESOLVED] Clicking action... seems to not change animation?

Post by Eizzoux »

It's strangely specific, but I just noticed how in this levelset the custom pointer I did doesn't 'click' on most of screens for some reason.

Except it does in editor. That is really quite strange.

By the way, it is also level number sensitive (anim_mode: level_nr), so I guess that might be the reason... somehow?
𒈟
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Clicking action... seems to not change animation?

Post by Holger »

Very strange! I cannot reproduce this -- the custom pointer in your level set works as expected for me. That is, I can click everything just as with the unmodified pointer.

However, I noticed that it is invisible on some level selection screens (but still can click). Will have to check what's going on here...
User avatar
Eizzoux
Posts: 571
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: Clicking action... seems to not change animation?

Post by Eizzoux »

Ok, sorry, I have worded it a bit wrong. What I mean is, I made a typical two-part global anim for all game screens (global.anim_1.part_1.[DEFAULT]), where .part_1 is un-clicked state and .part_2 is clicked. In Editor, it has a clicking animation just as it should (basically the pointer sprite just gets inverted), while in pretty much all other screens like main menu or playing it just stays the same no matter if you click or not. And aside from that, the pointer is also affected by the 'level_nr' animation mode, so it changes for every level.

Code: Select all

global.anim_1.part_1.[DEFAULT].gfx: gfxDoor.png
global.anim_1.part_1.[DEFAULT].gfx.y: 180
global.anim_1.part_1.[DEFAULT].gfx.width: 16
global.anim_1.part_1.[DEFAULT].gfx.height: 10
global.anim_1.part_1.[DEFAULT].gfx.frames: 30
global.anim_1.part_1.[DEFAULT].gfx.frames_per_line: 6
global.anim_1.part_1.[DEFAULT].gfx.anim_mode: level_nr
global.anim_1.part_1.[DEFAULT].x: 1
global.anim_1.part_1.[DEFAULT].y: 1
global.anim_1.part_1.[DEFAULT].class: pointer
global.anim_1.part_1.[DEFAULT].style: passthrough_clicks
global.anim_1.part_1.[DEFAULT].anim_event: click
global.anim_1.part_2.[DEFAULT].gfx: gfxDoor.png
global.anim_1.part_2.[DEFAULT].gfx.y: 230
global.anim_1.part_2.[DEFAULT].gfx.width: 16
global.anim_1.part_2.[DEFAULT].gfx.height: 10
global.anim_1.part_2.[DEFAULT].gfx.frames: 30
global.anim_1.part_2.[DEFAULT].gfx.frames_per_line: 6
global.anim_1.part_2.[DEFAULT].gfx.anim_mode: level_nr
global.anim_1.part_2.[DEFAULT].x: 1
global.anim_1.part_2.[DEFAULT].y: 1
global.anim_1.part_2.[DEFAULT].class: pointer
global.anim_1.part_2.[DEFAULT].style: passthrough_clicks
global.anim_1.part_2.[DEFAULT].anim_event: unclick:any
About the anim, yeah, just noticed that as well, and not only that, pretty much all other anims disappear as soon as you move to another folder in levelset list. I assume the problem might be that game potentially forgets the level number once you move to another folder... Oh wait... Levelset folders are levelsets as well, but with 0 levels, so game may be just loading as a levelset but since there's no level number to consider, it just renders them invisible. That's what I at least think.
𒈟
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Clicking action... seems to not change animation?

Post by Holger »

I have to check both cases... I think it's both by intention (sort of), but not working as it should. (Global animations probably disabled on level set screen, because loading new artwork here (but should not result in invisible pointer), and clicking pointer style global animations might also be buggy. Will have to debug these two issues.)
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Clicking action... seems to not change animation?

Post by Holger »

It's strangely specific, but I just noticed how in this levelset the custom pointer I did doesn't 'click' on most of screens for some reason.
Well, this one is easy: You have defined a global animation to recolor the screen border for each different level number, and this global animation has the same size as the screen. This means that it blocks all mouse clicks to global animations that are processed later, which unfortunately was the case for the mouse pointer here.

This problem cannot be fixed by using a different draw order, as the processing order of different screen types like "TOONS" or "[DEFAULT]" (as used for the screen border coloring animation and the mouse pointer used here) is not deterministic (for the user). (In fact, I have changed this now, so that "[DEFAULT]" (or no screen type at all) is processed before all other screen types, as this is most probably used for a custom mouse pointer.)

However, you can simply fix this -- just add "global.anim_1.TOONS.style: passthrough_clicks", and mouse clicks will go though! :-)

The next version will behave much better in this and other cases -- thanks a lot for all your "nitpicking" regarding global animation quirks, which helps me a lot to find silly bugs and problems like this one. :)
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Clicking action... seems to not change animation?

Post by Holger »

... and another one:
About the anim, yeah, just noticed that as well, and not only that, pretty much all other anims disappear as soon as you move to another folder in levelset list. I assume the problem might be that game potentially forgets the level number once you move to another folder... Oh wait... Levelset folders are levelsets as well, but with 0 levels, so game may be just loading as a levelset but since there's no level number to consider, it just renders them invisible. That's what I at least think.
You are more or less exactly right here -- I have also fixed this now, so "level_nr" style global animations are now also displayed just as expected on the level set selection screen. Thanks again! :)
Post Reply