The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
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



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: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

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: 45
Likes Given: 3
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: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

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)