• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Other users hero icons on your screen?

Status
Not open for further replies.
Level 8
Joined
Dec 9, 2009
Messages
397
I'm working on an ORPG map and I've always hated how hard it was to heal in most ORPGs, but then I played TKoK and they have all the hero icons on your screen and you can target the unit using the icon for spells so you don't have to try and click on people while they are all runnin around.

I want a system that the user can choose to add/remove hero icons by typing
-add red / -remove red
and so on.

I don't even know where to begin to look.

Thanks for any info.
 
Level 8
Joined
Dec 9, 2009
Messages
397
I asked this in World Edit help a while ago and didn't get a reply, I think it belongs here more anyway because it probably involves some advanced triggers, lets give this another shot.

I'm working on an ORPG map and I've always hated how hard it was to heal in most ORPGs, but then I played TKoK and they have all the hero icons on your screen and you can target the unit using the icon for spells so you don't have to try and click on people while they are all runnin around.

I want a system that the user can choose to add/remove hero icons by typing
-add red / -remove red
and so on.

I don't even know where to begin to look.

Thanks for any info.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
You could create dummy heroes with same icons (one for each hero type), which would have no model and create them for each player (so then each player has one real hero and one fake hero for each of his allies)
Then just check whenever real hero is ordered targeting one of these "dummy" units and redirect the order to the real hero.
Also, check whenever the dummy unit is selected, then deselect it and select the real hero.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
Thunder_eye: Are you sure you can display the icons without giving control to the player? Besides, for example Diablo III uses the dummy-hero system, because heroes of allied players are displayed with a gap between them and your heroes, which there is not.
Also I tried it a while ago, I was only able to display the icons when I gave the other player full shared units, which also allowed him to control it. (deselecting doesn't work, you have a little time, which is enough to order the unit, even in singleplayer, where the deselection should in theory be instant. Also you can't detect which player gave the order, so you can't prevent the control anyway)


EDIT: I was wrong, it is indeed possible, by doing this:
1. start with alliance without shared anything
2. turn "full shared units" on
3. turn "shared units" off
4. remove "team resources" multiboard (by showing another, it may be empty)

This will display the icon, but not allow player to control units. (also try merging steps one and two, i.e. starting with full shared units and then turning it off)
 
Level 12
Joined
May 21, 2009
Messages
994
do this with the unit to move it to their position: (hope u know jass)
JASS:
function MoveDummy takes unit dummy, unit hero returns nothing
//The "dummy" is the dummy unit
//The "hero" is the hero they are being moved to
local real x = GetUnitX(hero)
local real y = GetUnitY(hero)
call SetUnitX(dummy, x)
call SetUnitY(dummy, y)
endfunction

example would be

JASS:
call MoveDummy( mydummyunit, myhero )
 
Status
Not open for further replies.
Top