• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] X Marks the spot and another relative skill

Level 2
Joined
Dec 8, 2023
Messages
9
Hello!

I was meaning to ask this a long time ago but kept forgetting and remembered just now, so here I am. I think I understand how Kunkka's, from Dota 1, X Marks the spot ability works. It takes a target unit, currently location upon casting, and time delay to make the skill work. But what i do not understand was the skill of one sentinel hero, I forgot his name, and the skill name, but his skills are related to lightning. I think one of his skills, probably the third skill, was a skill where upon casting on a target the target moves back to a point/position from x seconds ago. Can anyone enlighten me about this, please? I kept thinking about and got really curious how exactly the skill works. thanks!
 
Level 40
Joined
Feb 27, 2007
Messages
5,092
Pick an update period. Divide the warp duration by that update period and convert to an integer. Store that many points per unit constantly rotating out the oldest one adding in the most recent one.

You could store these locations in an array or hashtable but this specific application benefits significantly from a linked list.
 
Top