Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
@hitcheck
Author Message
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #1
@hitcheck
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?
(This post was last modified: 09-19-2014 08:27 AM by Rizz.)
09-19-2014 07:37 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Rizz's post
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: @hitcheck
Did you take a look at sphere_combat.scp? There you have the current default system fully scripted and working.
09-19-2014 08:08 PM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #3
RE: @hitcheck
(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.
09-19-2014 09:47 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: @hitcheck
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
09-20-2014 12:10 PM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #5
RE: @hitcheck
(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.
09-20-2014 10:20 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #6
RE: @hitcheck
(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.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-20-2014 11:54 PM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #7
RE: @hitcheck
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!!!
(This post was last modified: 09-22-2014 07:18 AM by Rizz.)
09-22-2014 06:29 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #8
RE: @hitcheck
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

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-22-2014 08:46 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #9
RE: @hitcheck
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?
09-22-2014 08:43 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #10
RE: @hitcheck
The new combat system can do that @hitcheck

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-22-2014 08:48 PM
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)