Jump to content
Sign in to follow this  
gainster81

Teleport skill

Recommended Posts

Hey,

 

I was trying to make a new skill in which you can teleport on the clicked area within a  short range. I used the Mytho teleportation skill (id 296) as a guide. I setted it up but the skill isn't working (the animation happens but my char isn't teleporting to the selected area. Am i missing something in the skilleffect function?

 

function Skill_tptp_End ( ATKER , DEFER , sklv ) 
	local map_name = GetChaMapName (ATKER)
	local x = math.floor (x/100)
	local y = math.floor (y/100)
	GoTo(ATKER, x,y, map_name)
 end

 

Share this post


Link to post
Share on other sites
3 hours ago, gainster81 said:

Hey,

 

I was trying to make a new skill in which you can teleport on the clicked area within a  short range. I used the Mytho teleportation skill (id 296) as a guide. I setted it up but the skill isn't working (the animation happens but my char isn't teleporting to the selected area. Am i missing something in the skilleffect function?

 

function Skill_tptp_End ( ATKER , DEFER , sklv ) 
	local map_name = GetChaMapName (ATKER)
	local x = math.floor (x/100)
	local y = math.floor (y/100)
	GoTo(ATKER, x,y, map_name)
 end

 

in your skill x, y not defined 
x/100 ? 
you have to use
 

local x, y = GetChaPos(ATKER)

 

Edited by mkhzaleh

Share this post


Link to post
Share on other sites
5 hours ago, mkhzaleh said:

in your skill x, y not defined 
x/100 ? 
you have to use
 

local x, y = GetChaPos(ATKER)

 

Added "local x, y = GetChaPos(ATKER)" but it still didn't work. Also tried removing the /100 lines but it also didn't work. Any other thing i may be missing?

Share this post


Link to post
Share on other sites
10 hours ago, mkhzaleh said:
	local x, y = GetChaPos(role)

	GoTo(role,x/100,y/100,GetChaMapName(role))

works fine

hmm it isn't working. Do you have the skillinfo line that you are using? Perhaps i need to edit that one.

Share this post


Link to post
Share on other sites
17 hours ago, gainster81 said:

hmm it isn't working. Do you have the skillinfo line that you are using? Perhaps i need to edit that one.

no, i just told you how to use the function,

Edited by mkhzaleh

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Sign in to follow this  

×
×
  • Create New...