• 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.

What is possible with custom natives?

Status
Not open for further replies.
Level 2
Joined
Jun 18, 2012
Messages
7
Is it possible to write a proper mouse tracker?
How can one interact in general with run time variables such as mouse position etc?
Is it for example possible to get the current damage or armor of a unit through the usage of custom natives?
 
Level 21
Joined
Aug 3, 2004
Messages
710
All of this is possible and is being worked one. One thing to keep in mind is that natives like mouse stuff will cause desyncs, since the game isn't synchronizing these across clients. Armor, damage and similar will work just fine since they'll be the same. @therealattacka have been helping me out with mapping all these things so they can be used.
 
Level 10
Joined
Jan 13, 2017
Messages
88
Yes, it's fully possible to both Get/Set Armor Type and Armor Amount on a Unit to Unit basis. The same goes for a lot of other unit attributes and properties.

7267d19d3a9d5319daa26f628ef8aa14.png



And MindWorX was working on mouse tracking natives where he sent projectiles that always headed towards the mouse position (wont work online for obvious reasons).


Althou it would be nice if blizzard gave us these natives without the need to use SharpCraft...
 
Level 2
Joined
Jun 18, 2012
Messages
7
But how do i concretely read off these variables? Are there predefined functions like GetUnitDamage(...), SetUnitDamage(...) (or something similar) in the API?

How do i interact with the game in custom natives in general, i.e. is it possible to use existing natives inside custom natives?
Is it possible to use JASS functions inside custom natives?
Does the API has all the wc3 types like handle and all its derivatives implemented as ones to use in C#?

About the mouse tracking: Whenever i use something that targets a location which i specify by clicking with my mouse (a spell for example) the game has to know my mouse position and distribute it to all other players without much delay.
Why is this not possible for the mouse tracking via sharpcraft?
 
Status
Not open for further replies.
Top