Bowstring will prevail

but not without arrows

Hi everyone.

I have another question for you people. Actually, I have two, but I'll start with my first one.

I am quite sure someone has done this, but I don't know how to. Is it possible to make ranged weapons only work if the character has ammution equipped in the off-hand? Sure, I can make them a shield, but how would I keep the char from using them if he/she doesn't have a ranged weapon equipped? And how could I keep them from using a bow without having arrows? Also, would it be possible to make it delete one arrow each time they shoot?

And my second question: would it be legal for me to use classical music in my game? The music I make myself is not so great :blink:

Thanks!

Okay, I think there are a couple ways to do this. To make it so that the player can't use the bow, make a global (gb_arrows) that is set at 0. Then, when an arrow is equiped (as a shield), let it add a 1 to gb_arrows. Then, make it so the bow can't be equiped unless gb_arrows = 1. Every time you shoot an arrow, make it so the player drops it and equips another arrow. Once you're out of arrows, you can't shoot.

This might cause the bow to be unequiped every time the player shoots. This can be fixed by having the bow reequiped after the next arrow equips.

As for making it so that the arrows can't be used, I see no code barrier. You could make the arrows have -2 armor or something so that the player wouldn't want to use it when not using it with the bow.

As for the music bit, I think that if the game is free, it is still legal. But I'm not sure.

Another way to do the arrow bit would be to use just globals. I.E., the item "arrows" would just add X amount to the global gb_arrows. Then, when the bow is equiped, have it check for any arrows (if not, it wouldn't be equiped) and then, every time the bow fires, deleat 1 from gb_arrows. The hole in this is that a shield could still be used, which doesn't make sense.

Ugh. How very complicated it is to do such a simple thing. I will experiement with your ideas for a while, and then I shall post here again. Thanks.

More help would be appreciated, of course.

Yes, I do this quite a lot. I have different arrows for different bows, as well. I have different types of range weapons that also need to be paired.

In the item window for your bow, there's a conditional for it to work at all. Make the conditional that the Player must possess a particular arrow.

Under "hit" AND "miss" in the item window for your bow, you can drop an arrow.

It's been a long time ago that I set this up and can't remember everything right now. But this track should get you started. If you need me to, though, I can take a look at what I did more in detail. But I think this should do you as you progress.

As for classical music. It's illegal, not because of the music itself but because of the orchestra who played it, as they would have the rights. You, however, can play any music that's in the public domain, use it in your game, and it's legal. This is true whether or not the game is free.

Aye, I suppose that will work. I shall try it out as soon as I am done with the bow animation. Alas, there is one problem remaining. Buying arrows. The player can only buy one arrow at a time, and so they would have to click the "buy" button hundreds of times just to get the arrows they need. Not only would that be incredibly boring, but it would also be incredibly expensive.

Any ideas?

Debra, on May 1 2005, 12:35 AM, said:

As for classical music. It's illegal, not because of the music itself but because of the orchestra who played it, as they would have the rights. You, however, can play any music that's in the public domain, use it in your game, and it's legal. This is true whether or not the game is free.
View Post

Great! I can put them into Melody Assistant. How do I know if it's public domain, though?

Thanks.

Ledorax, on May 1 2005, 06:03 AM, said:

The player can only buy one arrow at a time, and so .......
View Post

Player buys one "Arrowpak." When used (opened,) 100 arrows are placed in inventory.

Oh, such a simple solution!

Thanks :laugh:

Quote

Great! I can put them into Melody Assistant. How do I know if it's public domain, though?

Well... technically, all classical music is now in the public domain - simply because copyrights on things don't last longer than a hundred odd years (plus or minus depending on where you are) and I think the only composer you could call classical in the past hundred years would be Debussy - and I'm not positive as to when he died 🙂

As long as you create the actual music yourself it's legal - just don't use anyone else's versions 🙂

-Andiayr