SphereCommunity
@hitcheck - Printable Version

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

Pages: 1 2


@hitcheck - Rizz - 09-19-2014 07:37 AM

I need some help to understand this new trigger.
I have my own combat system done with usual trigger such as @hittry @hit etc.

I would like to make some changes and @hitcheck should be the right way to do but i cannot undertand how it works: everytime i set an argn1 with return 0 the other triggers (hittry etc) are ignored...

PHP Code:
ON=@HitCheck
IF (<action>==skill_archery)
    
        IF (!<
ctag0.scocca>)
    
            IF (!<
findid.i_mem_archery>)
                
addarcherytimer
                argn1
=SWING_EQUIPPING
            
ENDIF
            
            return 
1
    
        
ELSE

            
argn1=SWING_READY
            argn1
=SWING_SWINGING
        
ENDIF
    
ENDIF
return 


Seems is working as i want in this way but i don't have the animation on my char....


UPDATE: ok, still not trigger @hittry -.-

Nope, it bypass so many things... unfortunally i cannot set a time between two swings using @hittry; i tried using a memory and a return 1 (the code is really similar to the previous one) but in this way i get no difference between 100 and 140 dex also if i set the speedscalefactor to 1.

The speedscalefactor controls the argn1 in @hittry but not the time between two consecutive swings.
Is possible to add an argn2 in order to do that?


RE: @hitcheck - XuN - 09-19-2014 08:08 PM

Did you take a look at sphere_combat.scp? There you have the current default system fully scripted and working.


RE: @hitcheck - Rizz - 09-19-2014 09:47 PM

(09-19-2014 08:08 PM)XuN Wrote:  Did you take a look at sphere_combat.scp? There you have the current default system fully scripted and working.

Yes, i tried many times but i cannot make it works: tons of errors.
Anyway i think is not safe at all play with sphere_combat, if you change something you could ruin everything.


RE: @hitcheck - Coruja - 09-20-2014 12:10 PM

I think if you use @HitCheck, the entire combat engine (@HitTry, @Hit, @GetHit, etc) will be disabled to allow you totally customize everything on this trigger, it starts on @HitCheck then you need to call all the others triggers manually using FULLTRIGGER @GetHit, etc


RE: @hitcheck - Rizz - 09-20-2014 10:20 PM

(09-20-2014 12:10 PM)Coruja Wrote:  I think if you use @HitCheck, the entire combat engine (@HitTry, @Hit, @GetHit, etc) will be disabled to allow you totally customize everything on this trigger, it starts on @HitCheck then you need to call all the others triggers manually using FULLTRIGGER @GetHit, etc

Yes i think so, that's why i don't like so much.
There is not way to make some change with @hitcheck and go on with the normal behaviour; i only need to manage the delay between 2 consecutives swing.

With @hittry i can only manage the lenght in second that a single swing need from start to the end.


RE: @hitcheck - Extreme - 09-20-2014 11:54 PM

(09-20-2014 10:20 PM)Rizz Wrote:  
(09-20-2014 12:10 PM)Coruja Wrote:  I think if you use @HitCheck, the entire combat engine (@HitTry, @Hit, @GetHit, etc) will be disabled to allow you totally customize everything on this trigger, it starts on @HitCheck then you need to call all the others triggers manually using FULLTRIGGER @GetHit, etc

Yes i think so, that's why i don't like so much.
There is not way to make some change with @hitcheck and go on with the normal behaviour; i only need to manage the delay between 2 consecutives swing.

With @hittry i can only manage the lenght in second that a single swing need from start to the end.
For your information: if you are trying to change the delay between 2 swings of ranged weapons, you will have to change DELAY= on ARCHERY skill section.
For melee weapons, I don't know if they call the DELAY= from their skill (fencing, mace, swords) but I'm SURE that the delay is based on weapon speed and your dexterity.


RE: @hitcheck - Rizz - 09-22-2014 06:29 AM

PHP Code:
[SKILL 31]
DEFNAME=Skill_Archery
FLAGS
=SKF_FIGHT
KEY
=Archery
TITLE
=Archer
PROMPT_MSG
=
DELAY=0
STAT_STR
=0
STAT_INT
=0
STAT_DEX
=0
BONUS_STR
=0
BONUS_DEX
=95
BONUS_INT
=5
BONUS_STATS
=10
ADV_RATE
=3.0,15.0,80.0 

Nothing changes...
This is my script:

PHP Code:
ON=@HITTRY

    
IF (<action>==skill_archery)
    
        IF (!<
ctag0.scocca>)
    
            IF (!<
findid.i_mem_archery>)
                
addarcherytimer
            
ENDIF
        
            return 
1
        
        
ELSE

            
ARGN1=2
        
ENDIF
    
    ENDIF 

addarcherytimer wil add the "i_mem_archery" with the right delay for swing (is a timerd), when the memory decays it will add to the player the ctag.scocca to allow him to shoot.
In this way, i don't know why, i get no changes between 100 and 140 dex.
Also tried with speedscalefactor=1.

Maybe memories on players have no timerd but only timer?

YES!

PHP Code:
[function f_testa_archery]
serv.newitem i_mem_prova_arch
new.timerd=12
equip 
<new.uid>

serv.newitem i_mem_prova_arch
new.timerd=6
equip 
<new.uid>

[
ITEMDEF i_mem_prova_arch]
id=i_worldgem_lg
layer
=layer_special
type
=T_EQ_SCRIPT
name
=Timer Memory
weight
=0

on
=@create
attr
=attr_invis

on
=@equip
link
=<src.uid>




on=@timer
link
.say asdas
return 


THE SAME TIMING!!!


RE: @hitcheck - Extreme - 09-22-2014 08:46 AM

Test this:
ON=@HITTRY
ARGN1 10 // 1 second

Now change your DEX, you will see that you 'reattack' faster with higher dex but the swing delay is the same (1 second).
Now try using Archery and change the DELAY on Skill section.

I can't find a way to change the delay between @hit -> @hittry


RE: @hitcheck - Rizz - 09-22-2014 08:43 PM

I tried and yes, there is some difference between 100 and 120 but over 120 i have the same delay.
ARGN1 = 1 is too long time anyway.
Is possible to add some new features to do that?


RE: @hitcheck - Extreme - 09-22-2014 08:48 PM

The new combat system can do that @hitcheck