View Full Version : Global Arrays...
Hopefully you guys will be able to verify this one... >_>
If you end game during the opening wipe of the first run of a quest, global arrays will never dimension. Particularly noticeable with ghost.zh enemies, which never do anything. But you can't fix it b/c I'm making a quest where you play as missingno and you have to abuse glitches to beat it.
--
Speaking of ghost.zh, I might have found a bug in that, I'm not sure? There's a line, it's in there twice, which reads:
// Too close to Link
else if(Abs(ComboX(i)-Link->X)<32 && Abs(ComboY(i)-Link->Y))
Shouldn't there be another <32 in there? TBH I have no idea what &&ing an integer actually does. :p
So if that's a bug you should pass it along to whoever wrote it.
Saffith
07-17-2016, 05:13 PM
Global arrays are allocated and initialized before you're able to do anything. Did you continue an existing saved game after changing the quest's scripts?
Shouldn't there be another <32 in there?
... Yep, that's a bug. Nothing critical, fortunately, but I'll fix it.
It's every quest that uses global arrays. End Game and continue or save during the opening wipe and they're all size 1 forever for that save. I could make a video for that too if you want, lol. I first noticed this in light of the heavens 3.0, confirmed it in my own quest, and in quest for hookshot 2. I added a check if SizeOfArray is incorrect to the top of my global script; I can trip that code easy every time if I want.
Edit - OK here's that it looks like, I should have showed a broken ghost enemy but ehhhhh - https://www.youtube.com/watch?v=fzLRKovgCyo
Saffith
07-17-2016, 06:06 PM
Nope, can't reproduce it. If you delete or move zc.sav and start a whole new save file, does that make any difference?
There was a problem a while back (until build 1341) with global arrays being saved incorrectly and screwing up every other saved game. Maybe this is a similar issue.
Edit: I tried a few more times, and now I can reproduce it... But not in 2.50.1, so it seems to be a recent issue.
Fresh install zc2.50.2 from http://www.purezc.net/forums/index.php?showtopic=68548&page=1 -- Still occurs.
What is going on :[
Saffith
07-17-2016, 06:35 PM
I see what happened now. Has to do with the change allowing the game to be quit or reset when a script hangs. As part of that, it isn't supposed to run scripts for the rest of the frame after a quit request, but that was also being triggered by continuing. Fixed now.
(I just want to make it clear, Save also causes it, not just continue. The problem was F6 vs. F9, not continue vs. quit.)
Now that I know it's not just me I'm clear to use this in my speedruns right?
Now that that's settled, here's more!!!
I have lots of dumb little grievances I mostly don't bother to bring up.
If you jump into a screen transition over water, Link is drawn swimming for 1 frame.
And it bugs me that the lens flickers and that link->jump is zeroed (combos affect midair link on) when you hit a reset room combo. At least the jump thing I was able to script a fix.
More where those came from but you probably have better things to do.
Saffith
07-17-2016, 06:54 PM
Not a problem. The same fix applies to both.
I figured; just wanted to make sure. :p
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.