Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flag archercanmove
Author Message
Indiaret
Apprentice
*

Posts: 33
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Apr 2016
Reputation: 0



Post: #1
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
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 847
Likes Given: 4
Likes Received: 197 in 163 posts
Joined: Jul 2012
Reputation: 6

Dimension Shard

Post: #2
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
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
Indiaret
Apprentice
*

Posts: 33
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Apr 2016
Reputation: 0



Post: #3
RE: Flag archercanmove
Right, thank you man, here was problem.

I have another question ... Can I disable the animation of weapon with bow ? It makes little 'spikes' while running, so it could makes in PvP problem. You knbw, I have attack and every @hitTry it makes little lag backward due to animation of weapon.
03-10-2019 08:56 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 847
Likes Given: 4
Likes Received: 197 in 163 posts
Joined: Jul 2012
Reputation: 6

Dimension Shard

Post: #4
RE: Flag archercanmove
animations are not played when anim value is < 0, so I don't know if this will break something, but you can try set LOCAL.Anim=-1 on char @HitTry trigger
03-11-2019 08:05 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

This forum uses Lukasz Tkacz MyBB addons.