'Sprint' ability, drain mana but only when unit is moving

MP®

Member
Reaction score
11
I would like to make a 'sprint' ability, which can be activated and will drain mana, but only when you are walking with the hero.

I think I know a way how to check wether the unit is moving or not, but that is a pretty extensive way to do.. Is there any easy and good working way how to do this?

It is a map where everybody controls only 1 hero btw (thought it's called MPU or something)
 

keychup

Active Member
Reaction score
34
Off the top of my head: Periodic event, check unit's position, If distance between position of unit and PointX is greater than 1 remove mana then set the new PointX.

You are remaking Elder Scrolls 5 aren't ya?
 

Smitty

Member
Reaction score
20
Holy shit that'd be awesome. Use Malukah's cover of the dragonborn song as the music if you are!!
 

keychup

Active Member
Reaction score
34
i started modifying a map of mine yesterday to be first person for that reason :p
i got the cameras and movement with arrow keys already set up :)
 

MP®

Member
Reaction score
11
Off the top of my head: Periodic event, check unit's position, If distance between position of unit and PointX is greater than 1 remove mana then set the new PointX.

You are remaking Elder Scrolls 5 aren't ya?

Yeah I was also thinking about something like that. And I was thinking about checking 'current order' of the unit every sec or something, I don't know if that will work though..

I'm not remaking Elder Scrolls (don't even know that game), but I'm making a stealthy Thieves vs Town Guards map :) with lots of cool features I've never seen in any other map before, like: vision is only in front of unit; unique melee fighting system -> block/evade/critical strike/manual defend & powerstrike, damage from behind is significantly more, and thieves can even kill instantly from behind (backstab); unique ranged fighting system -> aim manually, arrow/knife stops when it hits a wall, tree, unit etc. need to buy/pickup arrows/knifes, special arrows available like poison, water (to put off fire) etc. hold arrow near fire source to make a flaming arrow, guards (archers) can fire multiple arrows at once, guards (footmen) block arrows/throwing knifes with your shield (actively and only coming from the front); shadow meld and stealth-walk can only in dark places (= during the night & no light source (torch/lantern etc) is shining on you); disguise as town guard (need clothes); feign dead to confuse guards; pickpocket guards; set up dummy unit to distract guards; lockpick gates & doors; etc etc etc :D
 

MP®

Member
Reaction score
11
cool!

I was thinking about another game mode, which would be like footman & archers vs footman & archers and then kinda capture the flag or something. also with the same melee and ranged fighting system :)

Is your combat system similar to mine? Also with % blocking attacks from the front, extra damage from behind, defending arrows coming from front with shield and stuff? :) maybe we could learn from eachother
 

vypur85

Hibernate
Reaction score
803
Based it off Bloodseeker's Rupture (if you play DotA).

I did this before in fact. Too bad the map is lost. Otherwise I'd pass it to you.

What you need to do is check the distance of your unit between points at 2 intervals. Add up this distance and save it to a Real variable. Once the variable reaches, say, 100.00, then minus off the unit's mana appropriately.

Doing this requires you to run a periodic trigger at all time. I suggest a periodic of 0.08 seconds.

Example of trigger:
Trigger 1
Code:
Event
 Game Init
Condition
Actions
 Set Point A = Position of YourUnit
Trigger 2
Code:
Event
 Every 0.08 seconds
Condition
Actions
 Set Point B = Position of YourUnit
 Set Real = Real + Distance between Point A and Point B
 If (Real Greater or equal than 100.00)
   Then
     Set Real = 0.00
     Reduce YourUnit mana
   Else 
 Custom script: Remove(Point B)
 Custom script: Remove(Point A)
 Set Point A = Position of YourUnit
 

keychup

Active Member
Reaction score
34
My combat system implements spells and regular attacks, the difference is that attack targets are not acquired automatically. This means you will have to right click on an attack target before you can start fighting with it. Also im using arrow keys to move the hero. you can either have the mouse on abilities and your left hand on the arrow keys or your left hand on the WASD keys and the mouse on clicking where to move. %blocking, critical damage, evasion, etc. are all abilities.
 

MP®

Member
Reaction score
11
Sounds cool, but very different from mine. But I like to play it when it's finished :)

In my map you have to right click a target too btw, except when it's very closed (just close acquisition range). And magic/spells are not in my map, I'd like to make it as realistic as possible :) Arrow keys won't work in my type of map neither, but I have option to make the cam follow like 3rd person, so you can have your left hand on the hotkeys (also ASDFG + WERT) and use the mouse to click where to walk and where to attack/use ability/item etc :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top