Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
Flag archercanmove
|
Author |
Message |
Indiaret
Apprentice
Posts: 45
Likes Given: 3
Likes Received: 1 in 1 posts
Joined: Apr 2016
Reputation: 0
|
Flag archercanmove
Hi all,
need to help with shoot while running with bow. Not sure if flag statf_archercanmove is working.
Works only with combatflags COMBATF_ARCHERYCANMOVE, but I need it only for bow. Any solution about this ?
Code:
[events e_combat_system]
on=@SkillStart
if (<action> == id(skill_archery)) || (<action> == skill_archery)
if (<weapon.type>==t_weapon_bow)
flags <flags>&~statf_archercanmove
endif
endif
local.swingDelay=<getSwingDelay>
timerd=<local.swingDelay>
sphere_skills:
Code:
[SKILL 31]
DEFNAME=Skill_Archery
KEY=Archery
TITLE=Archer
FLAGS=skf_fight|skf_ranged
|
|
03-10-2019 05:39 AM |
|
|
Coruja
Sphere Developer
Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7
Dimension Shard
|
RE: Flag archercanmove
probably your code is removing the flag instead add it
to add flags you must use:
Code:
FLAGS |= statf_archercanmove //which is a shortcut for FLAGS=<FLAGS> | statf_archercanmove
and to remove it:
Code:
FLAGS &= ~statf_archercanmove //which is a shortcut for FLAGS=<FLAGS> & ~statf_archercanmove
EDIT: if you just want use these flags on bows you can also move this code directly to t_weapon_bow, this will just set/remove the flag 1x at item equip/unequip instead keep running the same code again at every @SkillStart
Code:
[TYPEDEF t_weapon_bow]
ON=@Equip
SRC.FLAGS |= statf_archercanmove
ON=@Unequip
SRC.FLAGS &= ~statf_archercanmove
(This post was last modified: 03-10-2019 07:08 AM by Coruja.)
|
|
03-10-2019 07:04 AM |
|
The following 1 user Likes Coruja's post:1 user Likes Coruja's post
Indiaret (08-12-2019)
|
User(s) browsing this thread: 1 Guest(s)