Jump to content

Photo

[2.55] FFC's use bad Hero coords on screen init


  • Please log in to reply
3 replies to this topic

#1 Mitchfork

Mitchfork

    no fun. not ever.

  • Contributors
  • Real Name:Mitch
  • Location:Alabama

Posted 21 June 2021 - 12:28 AM

If an FFC is checked to "Run Script at Screen Init" and that script has to check for the hero's coordinates, it will use the hero's last coordinates from the PREVIOUS screen instead of the current one.

 

For example, if the hero enters a screen from the south, we would expect that an FFC checking their Y position would return 160 (Y coord of the bottom of the screen).  However, it will actually return 0 on the first frame.  You can see the inverse when entering from the north, and the same thing happens with the X position from the east/west.


Edited by Mitchfork, 21 June 2021 - 10:37 AM.


#2 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 21 June 2021 - 12:32 AM

This is correct, as the FFC running on screen init runs *BEFORE SCROLLING*. So, at that time, that is the position Link is at.



#3 Twilight Knight

Twilight Knight

    Tell all with glee, Argon's on PureZC

  • Members
  • Real Name:Sven
  • Location:Rotterdam, NL

Posted 21 June 2021 - 02:01 AM

the PRECIOUS screen

Gollum.jpg
(sorry, I couldn't help myself)


  • Mitchfork and Aslion like this

#4 Mitchfork

Mitchfork

    no fun. not ever.

  • Contributors
  • Real Name:Mitch
  • Location:Alabama

Posted 21 June 2021 - 09:24 AM

This is correct, as the FFC running on screen init runs *BEFORE SCROLLING*. So, at that time, that is the position Link is at.

So then this is intended behavior? That's annoying to a couple of my scripts... 
 

Gollum.jpg
(sorry, I couldn't help myself)

Lol, whoops. All of my screens are precious. ;)


  • Twilight Knight likes this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users