Jump to content
  • 0
Rotciv

Keep an object Coordinates

Question

Hey Everyone!

Is there some way that I can creat, through a skill, an object on the ground (such as a trap or safetywall) and keep its X and Y values?

Let's say I used a skill that puts a Safety Wall at bl->x, bl->y. Now I want to use ANOTHER skill that upgrades the Safety Wall that I placed, without targeting. That's possible if I keep the previous coordinates of the first skill, but how?


Thank you for the support :)

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

in the second skill, lookup for nearby BL_SKILL units (with map->foreachinarea) and then you will get a struct block_list so cast it to a struct skill_unit (with BL_UCAST) and check that su->group->skill_id matches the id of the first skill and then you can get the location with su->bl.x and su->bl.y

Share this post


Link to post
Share on other sites
  • 0
9 hours ago, meko said:

in the second skill, lookup for nearby BL_SKILL units (with map->foreachinarea) and then you will get a struct block_list so cast it to a struct skill_unit (with BL_UCAST) and check that su->group->skill_id matches the id of the first skill and then you can get the location with su->bl.x and su->bl.y

oh! I dunno very well how BL_SKILL units works but I can look into it. 
thank you very much!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.