Jump to content
  • 0

Trigger a custom function script when using Skill.


laonglaing

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  37
  • Reputation:   0
  • Joined:  06/12/16
  • Last Seen:  

is there a guide or is it posibble to run  custom script example "function    script    func_mTest {}" when using a skill example Bash of swordsman?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.01
  • Content Count:  24
  • Reputation:   4
  • Joined:  06/29/22
  • Last Seen:  

It's possible, but usually messy. You would need to get a reference to the NPC calling the script down to the C layer, and that can be messy, especially if instances are involved.

What functionality do you want? It's likely that a source mod is more straightforward. You can add a statement somewhere in skill.cpp's `skill_additional_effect` function if you want something to happen after Bash hits a target, or you can add it under the SM_BASH case label in skill.cpp's `skill_castend_damage_id` if you want to happen as soon as Bash is used.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  37
  • Reputation:   0
  • Joined:  06/12/16
  • Last Seen:  

8 hours ago, ckx_ said:

It's possible, but usually messy. You would need to get a reference to the NPC calling the script down to the C layer, and that can be messy, especially if instances are involved.

What functionality do you want? It's likely that a source mod is more straightforward. You can add a statement somewhere in skill.cpp's `skill_additional_effect` function if you want something to happen after Bash hits a target, or you can add it under the SM_BASH case label in skill.cpp's `skill_castend_damage_id` if you want to happen as soon as Bash is used.

i see, so as you mentioned that its messy... what are the methods in the source that i should check to do such? there are some skill mods that i wanted to implement and i think its more organize if i put every mods in a script outside the source. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.01
  • Content Count:  24
  • Reputation:   4
  • Joined:  06/29/22
  • Last Seen:  

What skill mods do you want to implement?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...