PDA

View Full Version : Need a refresher on how Link and ZScript interact with combos on different layers



ScaryBinary
03-23-2013, 10:12 PM
Hey folks, been awhile since I've worked on my ZC Quest (uh.....like 5 years....) but I'm getting back in the swing of things and need a bit of a refresher. I poked around the Wiki and a few ZC websites but couldn't find much info on the following topics....so here goes. Working with the latest Linux build of 2.50.

(a) If I have a combo on Layer 0, and a combo above that one on Layer 1 or 2 (or mabye both), what layers do the Combo[] arrays (e.g., ComboF[]) work with? ZScript.txt refers to "the combo on the screen"...does this mean the Combo[] arrays only provide info for combos on Layer 0? Is there any way to get the info for Combos on other layers?

(b) On what layers do the Combo Type and inherent Flag take effect? For example, will a Ladder / Hookshot combo type work properly if I put it on Layer 2, or does it have to be on Layer 0?

(c) Walkability. This seems pretty straight forward based on some ZQuest experiments I ran, but basically it looks like if I have combos on Layer 0, 1, and 2 (all at the same location), then if at least one of them is unwalkable then overall that spot is unwalkable. So, is it true that if change the walkability of a combo on Layer 0 using ComboS[], that if there is an unwalkable combo above it on Layer 1 or 2, that spot will still be unwalkable?

Anyway, I'm asking because I'm working on a script to adjust walkability on the fly and wanted to know if there was an easier way to do what I want to do. I guess for (c) I can just write a quick script and see what happens, but I wanted a definitive answer from the pros.

(Feel free to shove this over in the Scripting forum if this is too scripty for the general forum...)

Thanks!

CJC
03-24-2013, 01:12 AM
(a) If I have a combo on Layer 0, and a combo above that one on Layer 1 or 2 (or mabye both), what layers do the Combo[] arrays (e.g., ComboF[]) work with? ZScript.txt refers to "the combo on the screen"...does this mean the Combo[] arrays only provide info for combos on Layer 0? Is there any way to get the info for Combos on other layers?
I believe ComboAt(x,y) only snags information on Combo 0. I had an idea to collect combo information from other screens (particularly, screens on other maps, more specifically the screens that the layers are being referenced from), but it doesn't seem like such a reference is possible.


(b) On what layers do the Combo Type and inherent Flag take effect? For example, will a Ladder / Hookshot combo type work properly if I put it on Layer 2, or does it have to be on Layer 0?
Layers 0-2 function as if they are all in the same place. I believe this extends to inherent flags as well, rather than just walkability. I'd recommend just making a quick test screen to confirm it in game, though, just to be sure.


(c) Walkability. This seems pretty straight forward based on some ZQuest experiments I ran, but basically it looks like if I have combos on Layer 0, 1, and 2 (all at the same location), then if at least one of them is unwalkable then overall that spot is unwalkable. So, is it true that if change the walkability of a combo on Layer 0 using ComboS[], that if there is an unwalkable combo above it on Layer 1 or 2, that spot will still be unwalkable?
That's a very good question. It's possible the walkability is established when the screen is loaded, and changing it with ComboS[] will change it for all combos on that position. I'm not sure on this, though.


Sorry, I know that wasn't very helpful. Hopefully somebody else (cough SUCCESSOR cough) knows more.

SUCCESSOR
03-24-2013, 03:08 AM
Screen arrays like Screen->ComboS[] will only reference combos on layer 0. There are functions in std.zh for getting and setting combo info for layers such as GetLayerComboS(int layer, int pos).

Solidity on layer 0-2 count for walkability. So if you change a combo to walkable on layer 0 but layer 1 is still unwalkable then the combo will still be solid. Also keep in mind changing a combos solidity will affect every instance of that combo not just the one you are changing.

This does involve scripts so I am moving it to scripting.

ScaryBinary
03-24-2013, 09:34 AM
There are functions in std.zh for getting and setting combo info for layers such as GetLayerComboS(int layer, int pos).

Ah, thanks for pointing those out. I guess I glossed over those in my search through std.zh.


Also keep in mind changing a combos solidity will affect every instance of that combo not just the one you are changing.

Oh yeah. >_> Hmmm....this is going to be more of a challenge than I thought --- should be interesting! Thanks for the info/reminders!