• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Just a Math Problem

Status
Not open for further replies.
Level 9
Joined
May 21, 2014
Messages
580
I have no friends yet in this place, so I had no one to ask to, so I decided to make a thread about it. I got a Meat Hook Spell by calex3, but I don't know how to set the distance of how far the hook can get. I wanted to change it, but my math failed horribly.

This is the equation he used:
8YV2H.png


And this is where the iteration begins:
8YV6c.png

(I'll only post the segment of the code since i thought this is the only things that matter regarding the distance.)

The distance at level 1 of the ability is 600.
The distance at level 2 is 750.
Level 3 distance is 900. It seems to have an incremental constant at 150, but I don't still know how to set the distance.

Any help is appreciated.

EDIT: I think I may have solved it already. Since I suddenly realized that since this is a distance, the parameters that I have considered are insufficient (or are just wrong), so I have looked deeper in the code, and saw this:

8YVVm.png


This is the set constant when the hook moves forward.
Since the formula is this: 15 + ( 5 (Level))
Let's set the hook at level 1 -> supposedly 600 distance travelled.
15 + ( 5 ( 1 ) ) = 20
20 ( 30 ) = 600

Sorry for the trouble. :< I hope this also helps someone.
 
Last edited:
Status
Not open for further replies.
Top