Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Weapon Specific Attack Sounds

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
donnelly517
Member
Member
Posts: 44
Joined: April 11th, 2012, 10:14 pm
Name: Evan Donnelly

Weapon Specific Attack Sounds

Post by donnelly517 »

I understand how to give monsters (and the player) attack sounds. Does anybody know a way to give a weapon it's own sound so that the game will play it's sound when used. Just like a spell being fired or a sword swing.
Helping to map Broken Shield and Revelade Revolution.
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Weapon Specific Attack Sounds

Post by Hirato »

the attacksound signal is sent to the wielder, the item in question and the quiver, so just assign it to the item/quiver's script
This is not a url, clicking it is pointless
donnelly517
Member
Member
Posts: 44
Joined: April 11th, 2012, 10:14 pm
Name: Evan Donnelly

Re: Weapon Specific Attack Sounds

Post by donnelly517 »

I'm not sure how quivers work. If I knew a quiver works and how to make one it would help.
Helping to map Broken Shield and Revelade Revolution.
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Weapon Specific Attack Sounds

Post by Hirato »

the quiver's just the third available option for ammo.

First of all, you have your personal resources; health, mana, that kind of thing
then you have the item itself, ie, throwing knives
and then you have quivers ie arrows

in the latter case, the "attacksound" signal is only sent to it IF it is used in the attack
This is not a url, clicking it is pointless
donnelly517
Member
Member
Posts: 44
Joined: April 11th, 2012, 10:14 pm
Name: Evan Donnelly

Re: Weapon Specific Attack Sounds

Post by donnelly517 »

How do I make a quiver (I wanted to learn anyway) and how do I input the sound. Is it just r_script_signal_attacksound [ like giving enemies attack sounds?
Helping to map Broken Shield and Revelade Revolution.
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Weapon Specific Attack Sounds

Post by Hirato »

first make an item for this, say an arrow, give it a use that allows it to be equipped in the quiver slot (SLOT_QUIVER) and assign projectile properties status effects and other things.
Keep in mind that the properties of the ammo in this mode will complement the properties of the weapon.

Next up, make an ammotype group and add the arrow's index to this group. If you wish to make additional arrows to other properties add it here.

As for the weapon itself, just specify the above ammo type for its ammo field, the game will take care of the rest.


You've pretty much figured out how to assign an attack sound for it anyway, but do note as I previously said, the signal is only sent to the quiver IF it was used in the attack.
This is not a url, clicking it is pointless
donnelly517
Member
Member
Posts: 44
Joined: April 11th, 2012, 10:14 pm
Name: Evan Donnelly

Re: Weapon Specific Attack Sounds

Post by donnelly517 »

Code: Select all

r_item_name "Quiver"
r_item_icon "spells/peacemaker"
r_item_description "Holds arrows."
r_item_mdl "tentus/moneybag"
r_item_use_new_weapon // 0 - it's good practice to number these entries

//these slots are available in consume and armour use cases as well
r_item_use_name "Quiver"
r_item_use_description "Holds arrows."
r_item_use_cooldown 2000
//increases the strength of the spell with player skill or charging
r_item_use_chargeflags $CHARGE_MAG
// adds our status effect at 30% efficiency - with the above charge flag that means 30 damge 
r_item_use_new_status 1 $ATTACK_PIERCE 1

//these slots are available with armour use cases as well
r_item_use_slots $SLOT_QUIVER
r_item_use_skill $SKILL_MARKSMAN

//these slots are exclusive to weapons
r_item_use_projeffect 0 //substitute with your arrow's effect
r_item_use_traileffect -1 //substitute with your trail's effect
r_item_use_deatheffect -1 //replace with a suitable EoL effect
My quiver's code.

Code: Select all

r_ammo_name "Arrows"
r_ammo_additem 58
Ammo code.

Code: Select all

r_item_name "Spruce Bow"
r_item_icon "items/iolarbow"
r_item_description "Congratulations! You have a bow made from the most common wood in all of Donn!"
r_item_mdl "tentus/moneybag
r_item_use_new_weapon // 0 - it's good practice to number these entries

//these slots are available in consume and armour use cases as well
r_item_use_name "Spruce Bow"
r_item_use_description "Basic bow. Everybody has one somewhere."
r_item_use_cooldown 2000
//increases the strength of the spell with player skill or charging
r_item_use_chargeflags $CHARGE_MAG
// adds our status effect at 30% efficiency - with the above charge flag that means 30 damge 
r_item_use_new_status 1 $ATTACK_PIERCE 1

//these slots are available with armour use cases as well
r_item_use_slots $SLOT_LHAND $SLOT_RHAND
r_item_use_skill $SKILL_MARKSMAN

//these slots are exclusive to weapons
r_item_use_pflags $P_TIME
r_item_use_angle 0
r_item_use_lifetime 5000
r_item_use_gravity 15
r_item_use_projeffect 0 //substitute with your arrow's effect
r_item_use_traileffect -1 //substitute with your trail's effect
r_item_use_deatheffect -1 //replace with a suitable EoL effect
r_item_use_ammo 1 //use mana
r_item_use_cost 1 //uses 15 units of mana
r_item_use_kickback 10
r_item_use_recoil 5
r_item_use_target $T_SINGLE
r_item_use_speed 2 // in 100's of cubes a second
And weapon's code
What am I doing wrong? It says I don't have the valid ammo equipped even though I equipped the quiver.
Helping to map Broken Shield and Revelade Revolution.
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Weapon Specific Attack Sounds

Post by Hirato »

donnelly517 wrote:

Code: Select all

r_ammo_name "Arrows"
r_ammo_additem 58
Ammo code.
That should be r_ammo_add_item (kind of inconsistent, I know).
Otherwise everything looks good, though I would give your "arrows" a name other than "quiver"

EDIT: do check the log in the future (F11, navigate with numpad +/-), it would've printed "no such command: r_ammo_additem" :)
This is not a url, clicking it is pointless
donnelly517
Member
Member
Posts: 44
Joined: April 11th, 2012, 10:14 pm
Name: Evan Donnelly

Re: Weapon Specific Attack Sounds

Post by donnelly517 »

Thanks! I've got working ammo now. So now I just add r_script_signal_attacksound to the items?
Helping to map Broken Shield and Revelade Revolution.
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: Weapon Specific Attack Sounds

Post by Hirato »

if you want attacksounds, yeah.
Keep in mind I very much consider that to be a hack.


Also, might I suggest that you use the SVN?
You've already helped me find and fix 2 bugs, and I definitely could use more people testing things :)

Barring as few minor alterations, you shouldn't need to make any major changes and you'll get access to some neat new features including a journal, trading and looting.
This is not a url, clicking it is pointless
Locked