Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
weapon speed trouble
|
Author |
Message |
svf
Apprentice
Posts: 6
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Aug 2013
Reputation: 0
|
weapon speed trouble
I'm trying to change attack speed from different types of weapons. I change argn1 value on @HitTry and on melee weapons it works perfectly, but with any bows or crossbows, changes in argn1 value and nothing happens, ranged attack speed always the same.
I try use 0.56c release or latest 0.56d
In sphere.ini:
Code:
CombatDamageEra=0
CombatSpeedEra=0
SpeedScaleFactor=0
bow script:
Code:
[itemdef test_bow]
id=i_bow
name=test bow
tdata3=i_arrow
tdata4=i_arrow_x
type=t_weapon_bow
flip=1
skill=Archery
dam=10,20
value=50
weight=20.0
reqstr=30
speed=50
twohands=y
tevents=t_tooltips
resources=30 i_ingot_iron
skillmake=blacksmithing 30.0
category=Weapons
subsection=Professions - Blacksmith - Bows
description=Bow
On=@Create
hitpoints=25
If i try change
Code:
on=@hittry
if (<action> == skill_swordsmanship) || (<action> == skill_macefighting) || (<action> == skill_fencing)
argn1 = 4.0
sysmessage Speed: <fval(<argn1>)>
endif
All ok and changes in argn1 value work fine
But for ranged weapons:
Code:
if (<action> == skill_archery)
argn1 = 4.0
sysmessage <fval(<argn1>)>
endif
or
if (<findlayer(layer_hand2).type>==t_weapon_bow) ||(<findlayer(layer_hand2).type>==t_weapon_xbow)
sysmessage WEAPON: <argo.name>
argn1=4.0
sysmessage <fval(<argn1>)>
endif
nothing happen, ranged speed always same and too fast
Please help, what could be the problem?
(This post was last modified: 03-02-2017 04:40 AM by svf.)
|
|
03-02-2017 04:10 AM |
|
|
Russian
Journeyman
Posts: 75
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 0
|
RE: weapon speed trouble
Hello.
As example it work:
Code:
[EVENTS E_WAR]
ON=@HITTRY
ARGN1=70
Set this event on player.
It if works on all types of weapon try this:
Code:
ON=@HITTRY
IF (<FINDLAYER.1.ISWEAPON>)
LOCAL.ATTACK_SPEED_FACTOR=<EVAL <DEF.<FINDLAYER.1.DISPID>_SPEED>>
ELIF (<FINDLAYER.2.ISWEAPON>)
LOCAL.ATTACK_SPEED_FACTOR=<EVAL <DEF.<FINDLAYER.2.DISPID>_SPEED>>
LOCAL.ATTACK_SPEED_FACTOR=50
ELIF (<ACTION>==SKILL_Wrestling)
LOCAL.ATTACK_SPEED_FACTOR=30
ENDIF
ARGN1=<DLOCAL.ATTACK_SPEED_FACTOR>
[DEFNAME WEAPONS_SPEED]
I_BOW_SPEED=26
013b2_SPEED=26
I_BOW_COMPOSITE_SPEED=30
9932_SPEED=30
//For each weapon type write speed...
|
|
03-02-2017 05:54 AM |
|
|
svf
Apprentice
Posts: 6
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Aug 2013
Reputation: 0
|
RE: weapon speed trouble
(03-02-2017 05:54 AM)Russian Wrote: Hello.
As example it work:
Code:
[EVENTS E_WAR]
ON=@HITTRY
ARGN1=70
Set this event on player.
It if works on all types of weapon try this:
Code:
ON=@HITTRY
IF (<FINDLAYER.1.ISWEAPON>)
LOCAL.ATTACK_SPEED_FACTOR=<EVAL <DEF.<FINDLAYER.1.DISPID>_SPEED>>
ELIF (<FINDLAYER.2.ISWEAPON>)
LOCAL.ATTACK_SPEED_FACTOR=<EVAL <DEF.<FINDLAYER.2.DISPID>_SPEED>>
LOCAL.ATTACK_SPEED_FACTOR=50
ELIF (<ACTION>==SKILL_Wrestling)
LOCAL.ATTACK_SPEED_FACTOR=30
ENDIF
ARGN1=<DLOCAL.ATTACK_SPEED_FACTOR>
[DEFNAME WEAPONS_SPEED]
I_BOW_SPEED=26
013b2_SPEED=26
I_BOW_COMPOSITE_SPEED=30
9932_SPEED=30
//For each weapon type write speed...
argn1 not working with ranged weapon
(This post was last modified: 03-02-2017 06:44 AM by svf.)
|
|
03-02-2017 06:41 AM |
|
|
User(s) browsing this thread: 1 Guest(s)