• 🏆 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!

create a buff spell arrow

Status
Not open for further replies.
Level 5
Joined
Jan 26, 2015
Messages
94
Its possible make in jass a effect like a arrow indicate the distance or limit of my spell like a range. You have the spell and indicate the direction and the max distance for use the spell. And can change the colour of effect of arrow or in the other spell like a circle with symbol.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
Is is also possible in GUI.

Direction: Create a dummy unit and turn it in correct direction.
Range: Create dummy unit circular around the caster with offset of wanted distance.

Update all dummy positions periodicly.

This is a possible solution. However, how can you detect if the target spell is pressed so that you can trigger the arrow indicating the distance?
Or if it is a no target spell, how can you detect if the mouse cursor is hovered in the spell button.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
First of all, you have to know where the mouse is.
With sharpcraft you can get the mouse on screen or on location (dunno which)
on location would be perfect as it is exactly the location you want.
on screen might be a bit inaccurate because of terrain height but you can calculate it with camera angle, height, field of fiew, distance, rotation and position

You can also try to do it with trackables but I dont recommend that.

So now that we have stated that that is impossible (in normal WC3), we can safely say that it is impossible.

When having a hacked WC3 (everyone in the game) aka SharpCraft, you can create a dummy and let it follow the unit and face the mouse.

Now there is problem no.2:
How do you know when a unit is targeting something?
There is none... unless you use placeholde abilities that are instant cast and when you are ordered to cast it, you re-order the caster to continue his last action and then you replace that ability and force UI to select it.
After that, you have that state... but how do you check when the player leaves that state?

1. by activating spell.
2. by pressing esc.
3. by right clicking on the map.
all can be done but you have to be carefull and make a big mess of triggers.

Now if you managed to do that properly, you also have to make it dynamic to make all spell types go into your system:
Point target spells.
Direction target spells.
Object target spells.
Direction target spells with dynamic maximum distance.
etc etc etc

I think we can safely say that it is a big hell of work that has to be done to make it.
 
Status
Not open for further replies.
Top