SphereCommunity
Help - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Requests (/Forum-Script-Requests)
+--- Thread: Help (/Thread-Help--5184)

Pages: 1 2 3


Help - redblack - 02-21-2017 08:31 PM

I need an explanation on how to make a script for npc who use a gun or a rifle, can you help me?
Thank you all


RE: Help - redblack - 02-22-2017 05:04 PM

no one can help me?


RE: Help - Leonidas - 02-23-2017 11:25 AM

Try to explain a little better, are you wanting to know how to make a custom npc? Are you wanting to make a gun?


RE: Help - redblack - 02-23-2017 04:41 PM

I would like to create a system for a gun to six shots, also an NPC opponent (like an archer) who uses a gun or a rifle as a weapon, so he can shoot from a distance.
Geazie


RE: Help - zottolo - 02-24-2017 01:01 AM

(02-23-2017 04:41 PM)redblack Wrote:  I would like to create a system for a gun to six shots, also an NPC opponent (like an archer) who uses a gun or a rifle as a weapon, so he can shoot from a distance.
Geazie

ciao!
have you tought about using EFFECT already? if you're not planning on to make a new class with custom skills, using EFFECT you need just to provide a bullet animation (if you need it, otherwise just use a default animation to simulate the shoot like magic arrow)

Lo0k H3re

btw things are changing if you also graphically want a npc equipping a gun or a proper item gun that can be equipped by any npc/player. In both cases you have to provide new animations.


RE: Help - redblack - 02-24-2017 02:17 AM

I created a npc type archer, only instead arc has a gun, I would need one without effect script where instead of the arrow there is a bullet (which is not seen) but feels just the sound of the gunshot


RE: Help - zottolo - 02-25-2017 03:43 AM

[ITEMDEF i_gun]
NAME=Gunny Gun
ID=i_bow
DAM=20
TYPE=t_weapon_bow
SKILL=Archery
SPEED=3.0
RANGE=2,12
TWOHANDS=N //requires two hands? No is set
WEIGHT=0.5
VALUE=100
RESOURCES= 10 i_ingot_iron //???
SKILLMAKE= 100.0 TINKERING

TDATA3= // bullet id
TDATA4= //effect id

CATEGORY=Weapons
SUBSECTION=Guns
DESCRIPTION=Gun

ON=@Create
HITPOINTS={100 200}
COLOR=00


didn't test this but it's a simple way to achieve what you need

about the sound, i think you can just add it on @hit trigger but i don't know if the bow sound will be overridden we must wait for someone better than me ^_^

ok i've found these too

AMMOANIM RW Overrides TDATA4 for bow/crossbow type weapons.
AMMOANIMHUE RW Sets the color of the effect when firing bow/crossbow type weapons.
AMMOANIMRENDER RW Sets the render mode of the effect when firing bow/crossbow type weapons.
AMMOCONT RW Sets the container UID or ID where to search for ammos for bow/crossbow type weapons.
AMMOSOUNDHIT RW Overrides the hit sound on weapons.
AMMOSOUNDMISS RW Overrides the miss sound on weapons.
AMMOTYPE RW Overrides TDATA3 for bow/crossbow type weapons.

now you can totally shoot that man down ^_^


RE: Help - Leonidas - 02-25-2017 09:51 AM

you can change the sound with either @hit or @damage I believe, just use return 1 and it will override the bow sound.


RE: Help - redblack - 02-25-2017 06:08 PM

Kindly you can give an example of how to use these parameters?

- AMMOANIM RW Overrides TDATA4 for bow/crossbow type weapons.
- AMMOANIMHUE RW Sets the color of the effect when firing bow/crossbow type weapons.
- AMMOANIMRENDER RW Sets the render mode of the effect when firing bow/crossbow type weapons.
- AMMOCONT RW Sets the container UID or ID where to search for ammos for bow/crossbow type weapons.
- AMMOSOUNDHIT RW Overrides the hit sound on weapons.
- AMMOSOUNDMISS RW Overrides the miss sound on weapons.
- AMMOTYPE RW Overrides TDATA3 for bow/crossbow type weapons.

thank you


RE: Help - zottolo - 02-25-2017 11:34 PM

You have to insert them in the definition of the item...add them replacing tdata3 and 4 in the example i gave u before

(02-25-2017 09:51 AM)Leonidas Wrote:  you can change the sound with either @hit or @damage I believe, just use return 1 and it will override the bow sound.

if you return 1 those triggers ure going to override the normal combat behaviours am i wrong?