Brightsea Empire
Shopping!
#1
Posted 11 April 2015 - 08:23 PM
- MoscowModder, Jared, Demonlink and 3 others like this
#2
Posted 11 April 2015 - 08:57 PM
Did this utilize the tango? ZC sure has evolved when I first used it.
#3
Posted 11 April 2015 - 09:10 PM
I didn't use tango for this or my subscreen. The string functions built in to zscript are enough for what I need. The part I was having difficulty with was getting the shop to load when you press A at the right spot, and then close when you want it to, without activating the item equipped in A. This was way, way more difficult than it should have been. Short version, there's a check in the global that checks anytime you press A if you're standing on a combo with a certain inherent flag. If so, it finds the ffc that's also on that combo to get the shop type and then launches the shop window. Initially I had had the shop launched by the ffc itself, modifying a signpost script to launch the shop instead of displaying a message, but the function Screen->Message automatically discards the A input. With launching the shop instead, the A input still goes through (although delayed until after you close the window) and your equipped item fires. I tried putting in lines to kill the input in about a dozen different places, none of which worked.
So I took a nap, and when I got up I realized I should move the call function to the global, where the input can be more easily controlled. Then it was just a matter of the two checks (one for the inherent flag, the other for the ffc) and everything works fine
- ShadowTiger, Avaro and SyrianBallaS like this
#4
Posted 12 April 2015 - 12:13 AM
I didn't use tango for this or my subscreen. The string functions built in to zscript are enough for what I need. The part I was having difficulty with was getting the shop to load when you press A at the right spot, and then close when you want it to, without activating the item equipped in A. This was way, way more difficult than it should have been. Short version, there's a check in the global that checks anytime you press A if you're standing on a combo with a certain inherent flag. If so, it finds the ffc that's also on that combo to get the shop type and then launches the shop window. Initially I had had the shop launched by the ffc itself, modifying a signpost script to launch the shop instead of displaying a message, but the function Screen->Message automatically discards the A input. With launching the shop instead, the A input still goes through (although delayed until after you close the window) and your equipped item fires. I tried putting in lines to kill the input in about a dozen different places, none of which worked.
So I took a nap, and when I got up I realized I should move the call function to the global, where the input can be more easily controlled. Then it was just a matter of the two checks (one for the inherent flag, the other for the ffc) and everything works fine
I have no idea what you just said here, but if it makes a shop function similarly to a FF shop, with a window to purchase stuff, this MAY revolutionize a great many shops in future quests if you release the script as a seperate download (of course, after bugtests to make sure it functions properly)!
#5
Posted 12 April 2015 - 11:32 AM
Maybe? I was figuring to release the whole of my code at some point after the game's released (maybe a few months after). We shall see.
#6
Posted 12 April 2015 - 03:23 PM
Addenda: the way I ended up getting the FFC to work there's only one shop per screen, but this isn't really the end of the world. Also, I max the items at 8, but this could easily be changed to 10 if necessary. Also, I currently don't have the descriptions up, but would they really be necessary? I feel like pretty much everything you'd buy in a shop is self-explanatory, but it also wouldn't be difficult to add descriptions, just tedious.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users