Jump to content

Photo

Advanced Bow Script

request bow arrows item script

  • Please log in to reply
10 replies to this topic

#1 Spacepoet

Spacepoet

    Initiate

  • Members

Posted 15 May 2015 - 06:18 AM

Visual & Gameplay:

 

A bow that functions similar to LttP bow, where a visible sprite of the actual bow is drawn over Link when being used. Link can press the set button to fire an arrow at normal speed, or he can choose to hold down the button and charge an arrow for increased speed and damage, (can even penetrate enemies?) and he will strafe while charging so he is always aiming in the same direction until he releases the shot.

 

How it would work in theory:

Create a number of items, depending on how many arrow and bow types you want in your quest.

 

2 Bow Items for each bow in your quest. (A quest with 2 bows would need 4.) The first being the normal firing speed, and the obtainable Bow Item, and the 2nd being its charged speed (either invisible, or with the same sprite as the first bow item). Each Charged Bow item should be 1 level higher than the regular version for that bow.

 

example: bow(lvl 1), charged bow (lvl 2), longbow (lvl 3), charged longbow (lv 4), ect.

 

2 Arrow Items for each arrow in your quest. (A quest with 2 Arrows will need 4.) The first arrow would be the normal arrow damage, and the 2nd would be the charged arrow damage, and everything should be set up the same as above, with the charged version of each arrow being a level above the normal version.

 

Create an item script attached to your obtainable Arrow Items (the uncharged versions) that when pressed, draws a set sprite over Link (grabbed from the bow item script), depending on the direction he is facing, thus creating a more visually pleasing bow experience (no more throwing your arrows!), and when the button is released, it fires the arrow item as normal. If the button is held for a specific number of frames, it equips the next highest level bow and arrow items, and plays some sfx to indicate that its charged (like spin attack does), and when the button is released, you get your higher damage piercing arrow.

 

Another item script that is set on all Bow item types, declaring what sprite/tile/combo to draw over Link when used.

 

Atlernatively, you could set up which charged version of the bows/arrows to use in the Data section of their respective item scripts instead of relying on level. didnt think of that until after typing all that...

 

Let me know if anyone is interested in scripting this! It would make a nice addition to the database i think.


Edited by Spacepoet, 15 May 2015 - 06:24 AM.

  • HavoX likes this

#2 HavoX

HavoX

    Has more posts in Doomworld than in PureZC

  • Members
  • Real Name:Jon
  • Gender:Male
  • Location:Republic, Missouri

Posted 15 May 2015 - 06:30 AM

or he can choose to hold down the button and charge an arrow for increased speed and damage, (can even penetrate enemies?) and he will strafe while charging so he is always aiming in the same direction until he releases the shot.

You know... that reminds me of the mechanics of the Bow and Arrows in Four Swords/Four Swords Adventures, except Link could move in any direction while charging it (albeit very slowly).



#3 Spacepoet

Spacepoet

    Initiate

  • Members

Posted 15 May 2015 - 06:32 AM

that is the game i had in mind, i just thought i remembered LttP being similar. but yes moving slower is something i had forgotten, but is definitely a good addition



#4 justin

justin

    Adept

  • Members

Posted 15 May 2015 - 07:18 AM

Have you seen this? Basically what you are asking minus the hold for stronger feature, which shouldn't be that difficult to add.
http://www.purezc.ne...=66308&p=957031

#5 ZoriaRPG

ZoriaRPG

    ZC Wiki Editor

  • Members
  • Gender:Unspecified
  • Location:Prydon Academy

Posted 15 May 2015 - 05:07 PM

An item script alone, thisw isn't. To draw the bow around the player, you could either use a global function (preferred), or an FFC (hackish). To draw an arrow, for more than one frame, you will again need one of the above.

 

The item script would be little more than either calling the global functions, that create the projectile after either a set duration, or whatever mechanic you wish to use; or launch an FFC that does exactly the same thing. FFC methods are usually utilised because they are more modular, but it's far more optimal to do it with global functions. They give you more precise control over when the effects occur (as they can run before Waitdraw(), and they also never create FFC slot conflicts.

 

I'll probably put something in this vein into RPG_Weapons.zlib at some point. The basic problem there, is that I need to create code that can be useful for animation more than one object, so it'll be a while before I get around to making anything of this sort. If you can wait for it, and by wait, I mean a few months, then by all means, I'll be happy to send you something to use if the link above isn't what you want.



#6 Spacepoet

Spacepoet

    Initiate

  • Members

Posted 16 May 2015 - 06:45 AM

whatever way it works is fine with me. this is just an idea. im not sure if the above script is its own item class, or an addition to the arrows, but arrow triggers were something i had in mind when considering this


Edited by Spacepoet, 16 May 2015 - 06:48 AM.


#7 Lejes

Lejes

    Seeker of Runes

  • Members
  • Gender:Unspecified
  • Location:Flying High Above Monsteropolis

Posted 16 May 2015 - 03:28 PM

It should be its own item class. It handles creating the arrow itself, and shouldn't be attached to a default bow.



#8 Spacepoet

Spacepoet

    Initiate

  • Members

Posted 22 May 2015 - 05:51 PM

Alright ive gotten the bow script from that quest thread working in my quest, and it was super simple to set up. Just the charging, slow walk, and strafing, and I've got the bow i'm aiming for. 

 

The only problem with the bow right now, is that when you hold the button, you get an auto bow.

 

EDIT: Actually, I would be honestly happy with a stationary charge to reduce the amount of work required to finish this. Link has to stop in place to aim his bow, and cant move till he shoots. plus that offers a more meaningful tradeoff for gameplay


Edited by Spacepoet, 22 May 2015 - 06:01 PM.


#9 Lejes

Lejes

    Seeker of Runes

  • Members
  • Gender:Unspecified
  • Location:Flying High Above Monsteropolis

Posted 22 May 2015 - 07:02 PM

The version submitted to the database fixes the auto bow issue. I've also just written a charging variant (demo quest link here).

 

 

Yes, that global active script is actually necessary. Link's animation freaks out if you don't have it. You'll have to start a new save file for this since two global variables are declared. I'll wait to update the database entry for this and see if anyone has a better suggestion for how to handle Link's animation while charging.



#10 justin

justin

    Adept

  • Members

Posted 22 May 2015 - 07:08 PM

I'm pretty sure that global is needed. Setting Link->Dir seems to only work after the Waitdraw.

#11 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 27 December 2016 - 03:32 PM

@Spacepoet

is it possible to include tiles and animation support to make it look nicer?

I really like this. I just don't like how link's shield shows underneath and how his hands don't look like their holding on to the bow

 

Edit: also there seems to be a bug where if you run out of arrows and you reset the game in doesn't allow your to fire anymore

hmm maybe not I guess this is slightly more outdated then the one in the scripts database


Edited by Shadowblitz16, 28 December 2016 - 09:00 PM.




Also tagged with one or more of these keywords: request, bow, arrows, item, script

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users