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

Any way to pick up on Mouse Clicks?

Status
Not open for further replies.
Level 12
Joined
May 20, 2009
Messages
822
I'll use a mod if I have to, there's a handful of things I've always wanted to make for WC3 that I have the skill to do now. I remember this not being possible without a mod though, so that's why I'm asking.

I can't just do it in SC2 because there's no point in doing this for SC2, it has all the stuff I want to make in WC3 already and the main point I'm making this is because I want to show that WC3 can do more then what it seems... Except for mouse-clicks, which is the only thing holding this back.
 
Trackables (as Maker pointed out) allow you to create a model at a particular point and register when a player hovers over it or clicks on it. But the API is rather incomplete since we can't destroy trackables (so they'll remain forever in memory).

Even trackables that aren't rendered (e.g. invisible planes) will chew up some frame rate, so creating trackables throughout the entire map isn't super practical unless the map is small. And even then, you can't get the particular coordinate where the mouse is, so it is pretty restrictive.

SharpCraft has mouse natives, but you can't detect which player is moving their mouse (so it is good for single player, but not for multiplayer unless someone extends the natives).
 
Level 12
Joined
May 20, 2009
Messages
822
SharpCraft seems to be my best bet. At the moment it doesn't matter that it won't work for multiple players. If it can be done eventually that's all that matters. In the mean time I could use it as-is to make my system.

So basically what I need this for is I'm trying to make a completely custom basic orders system. So you see I need right-clicking to make a custom attack and custom move order function work like normal WC3, with Smart Orders. Something I can't actually do because I have to have movement and attacking completely disabled in the first place so I can break their limits.

There would be a few disadvantages to this, like you wouldn't see attacks or the unit's movement speed in the UI. But there are so many advantages that I think it's worth it, such as:

1. Infinite move and attack speed.
2. Infinite number of attacks.
3. Completely custom targeting (As in errors showing up saying "You can't target this unit because X reason")
4. Easily expandable to add additional features.

It would all be possible. Technically I can still make this system as-is without right-clicking, but it would be extremely clunky for the players.
 
Why not just catch smart orders with the issue order event? You can still recreate the entire order and behavior system without having to use a complete mod.

You can just order the unit to stop whenever he is issued the smart order and run your own system. It should work just fine.

Still, I'd like to point out that having a UI display is pretty important to a player. And a lot of what you pointed out is already possible with morphing and bonuses. Feel free to give it a shot and see how it works out, but it may be frustrating when it comes down to things like path-finding (A* would be pretty slow in JASS vs. using wc3's default system) and animations.
 
Level 12
Joined
May 20, 2009
Messages
822
I thought only the basic commands issued a smart order. Also I have not seen a system that allows for infinite attack or movement speed. AFAIK the only hard-limit you can break is movement speed, by having it increase percentage-wise instead of solid bonus you can extend far past the 522 limit (In fact in standard WC3, if you have Endurance Aura and Wind Walk level 3 on a Blademaster he is significantly faster then 522), but only with percentage-based things. I have also never seen a system that can make attack speed faster than a quarter of the unit's original attack speed.

So, I can think of two ways to make custom UI show:

1. Just simple command card passive buttons. Though this will take having a passive that has a level for every single unit and every single upgrade you have in your map.

2. A custom "drawing" system. A single model that contains several alternate animations of UI borders, backgrounds, buttons states (normal, highlighted, clicked, disabled), and characters from A-Z, 0-9, special characters, and icons for resources, and use in-game textures. This model would then be used across a multitude of things, showing objects in the traditional UI.
 
You can intercept any order that you want. Smart order is specifically when you right-click--and you said that is all you needed to detect. Perhaps I misinterpreted you.

You're correct, movement speed and attack speed has its limits. But why would you want infinite movement speed or infinite attack speed? To me, the attack speed limit is fine as it is and any movement speed beyond 800 or so is just way too fast for practical value. I have a system in my signature that demonstrates one route to take to extend the limit.

As for attack speed, I think it is more practical (for animation speed purposes) to do things like double-attacks or triple-attacks, which are easily implemented through DDS's and such.

For #2, where would it be placed? I suppose you could use something like DGUI. But multiboards work great too.
 
Level 12
Joined
May 20, 2009
Messages
822
But what abilities issue a smart order, as in when you right-click?

It would be placed where normal UI elements are placed right now. The icon in the console underneath the unit's name, and the box that appears when you hover over that icon.

EDIT: Also, how many units is a single cell? (The smallest, gray grid in the Editor)
 
No abilities issue a smart order. "Smart" is just included as an option for any unit with a non-zero movement speed.

When you select a unit and right-click an area, the order will be considered the "smart" order (Blizz probably named it smart since it will issue "move" behavior if targeting an area or friendly unit, and "attack" behavior if targeting an enemy unit).

Also, the units in a single cell are 32x32 iirc.
 
Status
Not open for further replies.
Top