Jump to content

Photo

Multiple characters with different dominant hands


  • Please log in to reply
64 replies to this topic

#16 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 04 January 2015 - 02:51 AM

is this what you were meaning? or did you want a picture of the sprite as set up in the weapons?

 

zelda045-1.png

zelda044.png

zelda046.png



#17 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 04 January 2015 - 03:33 AM

Oh... Oh.... I'm an idiot. That's not the second sword, no wonder!  For whatever reason,the second sword isn't activating to override the main sword, the reason the sword's been using the lefty sprites is because it was still left-handed, and because I never set the sword sprites on it (in the item editor), because I didn't think I'd need lefty sprites *facepalm* so, yeah, looks like the script isn't actually doing anything....

 

EDIT: Checked to see if I was a double-idiot and set it to a pickup script, instead of an action script. I didn't.

 

Further Edit: It's not cuz it's on a sword item, either. when I changed the item class to custom, it stopped doing anything at all.

 

FURTHER, FURTHER EDIT: Disregard this entire post. I, like an idiot, forgot to load the FFC script into a slot. Now it works.... half the time... . Every other slash comes off as left-handed, so it will slash right-handed (that part works beautifully, by the way, thank you), but the next slash is left-handed. Which, from what I gather, is exactly how it's intended to work, so, there's that. Honestly, if it can't be fixed, THIS I can work around. Needed something more to separate the characters than their dominant hand and outfits, anyways. And the image is kinda funny, in my head, Justin flailing around, swinging his guitar back and forth like a maniac. On the other hand, if it CAN be fixed, all the better, since it would allow me to add a third character to the game, who I've felt bad about not including.


Edited by Lineas, 04 January 2015 - 10:11 AM.


#18 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 06 January 2015 - 11:29 AM

On a similar note, is it possible to make certain items in the subscreen selectable ONLY if you have a specific item (Kinda like how the arrows are only selectable if you have the bow, but slightly more refined, hopefully referring to item id instead of itemclass... Or both, maybe, now that I think about it, itemID for the "character select" items and item class for the "microphones")? Since I have two characters, and one follows the other around, already, I thought I'd try making it so you have to use BOTH characters at the different parts of the game, by splitting the inventory between the two characters. I figure it'd be too much to have the game keep a record of every equipment item the player picks up (where would it even store that information?), so that I could freely remove equipment items from the inventory, then re-add them later, when the player switched characters again, so I hit on the idea of making items that are only selectable/useable if you have a specific character (since the character selection is run by the ring items, anyways), then splitting the selectable area of the subscreen into three sections, one for Justin's weapons, one for Brian's weapons, and one for weapons they both can use. Plus, I need to be able to do it, in order to make the majority of the player's weapons dependant on him having the "microphone" item. In both cases, I assume it would work in a manner similar to the Bow and Arrow items, where you need the Bow in order to be able to select and use arrows, but in this case, you'd need the "Character Select- Brian" item to use certain items, and the "Character Select- Justin" item to use others. And I need it to be able to work with multiple dependant items, so that a specific "song" (we'll use one of mine, as an example) will require both the "Microphone" AND the "Character Select- Brian" items in order for it to be selected and used, while another might only require the microphone, or another might not require the Mic, but it requires a specific character. Also wanted to make an item to switch characters on the fly, but that should be as simple as having an action script that removes one item, and adds another to your inventory depending on which you currently have. Might get a little complicated, if I decide to make bigger differences between the characters, such as making one of us faster than the other, or slightly more durable (I dunno, I think dividing damage by 2 is a bit much for having differences between the characters, so that would probably  need to be scripted, as well, so I could make it more like a 10-25% reduction, instead), but that should be easily worked around with an if statement. Anyways, if anyone could point me in the right direction, so I could start scripting this stuff, I would be very appreciative.



#19 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 06 January 2015 - 11:41 AM

You'd have to try using existing subscreen trickery to do any of that item stuff, because scripts can't run while the active subscreen is up. Yes, really. Not even the global.

 

 

I figure it'd be too much to have the game keep a record of every equipment item the player picks up (where would it even store that information?), so that I could freely remove equipment items from the inventory, then re-add them later, when the player switched characters again, 

 

This, on the other hand, wouldn't be that hard to do. There's already a variable that tracks the status of all possible equipment items (Link->Item[]), so you'd just need to copy it to another array, then restore the values when you switch characters. A function in the global to immediately alter this array whenever you pick up an item would be the easiest way to do it, I think.



#20 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 06 January 2015 - 01:16 PM

Oh.... In that case, I think I can work around the other issue... I think. I already have some experience with replacing LWeapons onscreen and adding special effects to them, just can't remember if I was ever able to make arrows collide on unwalkable combos.... I'll have to look over my scripts from TotG.



#21 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 06 January 2015 - 01:34 PM

Okay, here's what you need to change. Just in case you want it, I'm adding a flag that will choose between right-hand only and alternate hands (like it is now):

 

Change this:

Old item script

 

Into this:

New item script

 

Then set D4 to 1 for swords that are always right-handed.



#22 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 06 January 2015 - 11:25 PM

Oh, awesome! Now I can add a secret character to the game who you can only access after beating the game!



#23 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 07 January 2015 - 12:29 PM

Wondering, if I were to make a dummy item that is placed silently into your inventory upon picking up the other items, like a greyed-out version that I'd place underneath the item on the subscreen, and make unselectable, could I then just make a script to check if the dummy item is in your inventory, and if you have a specific item, then if you meet both conditions, it returns whatever items have dummies underneath? I'm thinking that I'd check if the player has either Justin or Brian as their character, and if they have the microphone, then return items appropriately, then write a script, so, if the PC is Brian, it returns items a-f and takes items g-l, if it's Justin, it returns items g-l and takes items a-f, and if the microphone isn't in your inventory, it automatically takes items a-e, g-k and m-q and returns them upon pickup, all based on the dummy items that were picked up, but never removed from inventory. I mean, if that's possible (which, I think it is. I don't see why it wouldn't be, I know you can add/remove items from your inventory via script). It would kill two birds with one stone: Keep the items you've picked up on the subscreen when you can't use them, while still being technically removed,and therefore unselectable. Honestly, I'm asking because the whole recording the inventory to an array thing confuses me, and while this is more messy, it seems like it would do a more pretty job.


Edited by Lineas, 07 January 2015 - 12:30 PM.


#24 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 07 January 2015 - 12:46 PM

That would work, yes. It seems a lot more tedious because you'd have to set up all the dummy items and the item pickup scripts in ZQuest instead of just typing them out in ZScript, but it's functionally identical to the array approach.



#25 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 07 January 2015 - 01:19 PM

Take note that the Link->Item[] thing is automatic - regardless of whether an item is in your subscreen or not, checking Link->Item[] will tell you if you have the item or not.



#26 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 07 January 2015 - 01:33 PM



That would work, yes. It seems a lot more tedious because you'd have to set up all the dummy items and the item pickup scripts in ZQuest instead of just typing them out in ZScript, but it's functionally identical to the array approach.

 

Well, yeah,but I'd be setting up the dummy items, regardless, since I wanted to keep a picture of the unselectable items in the subscreen, anyways

 



Take note that the Link->Item[] thing is automatic - regardless of whether an item is in your subscreen or not, checking Link->Item[] will tell you if you have the item or not.

But wouldn't the whole thing here be removing items from your inventory completely (setting Link->Item[] to false for the items in question), thereby requiring an alternate method of keeping track of inventory items, if you're switching inventories between characters?


Edited by Lineas, 07 January 2015 - 01:36 PM.


#27 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 07 January 2015 - 01:40 PM

Well, maybe it wouldn't be so hard...

 

How do you collect items? Does each character have to pick up their own set of swords? Or do you collect one sword that gives a variant to each character? If so, I could easily whip up a script that swaps your inventory of swords (or whatever else you've got) for you. That depends on how many items are unique to the character, of course.



#28 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 07 January 2015 - 01:55 PM

No, that'd be too easy and make too much sense, lol. No, they're all separate weapons. 5 "songs" and an item per character, then 5 songs and an item (the character switcher item) that are shared between the two. I mean, writing the script to switch the sword the character is carrying on switching even I can do. And honestly, I THINK I can at least MOSTLY do everything else, now that I know it can be done. I already have the subscreen almost completely set up, at this point, anyways, adding the dummy items won't take very long. And it's not like keeping the items on screen will hurt, I only have 18 weapons total (8 of which are also standing in for triforce pieces, so I don't need a frame), and only a handful of passive equipment items, so there's plenty of room on the subscreen. Honestly, it's the damn subscreen dungeon map that is taking most of the screen.



#29 justin

justin

    Adept

  • Members

Posted 07 January 2015 - 02:08 PM

i think you could just have the background of your subscreen to have all the greyed out items shown in their proper places.  each character would only have their items saved to Link->Item[] by Lineas's method, so those items would then show overtop of the background grey item image.  the issue with that is the player would know what items they are getting before they get them.


Edited by justin, 07 January 2015 - 02:09 PM.


#30 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 07 January 2015 - 05:57 PM

which is, of course, why I'm using dummy items




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users