HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Anti Selection triggers?

11-22-2003, 03:55 AM#1
l]arkOne
This is a problem several RPG project(like HeroRPG and TKoD) are having, the player select the enemy unit to see their HP and MP. We tryed several method to prevent/deselect but nothing has worked.

Does anyone know how to succesfully prevent a user from clicking on a unit?
I need to hide the stats of an enemy but the user can see hp and mana when he click on it.



Heres some trigger I tryed:
------------------------------------
-Player select x unit
-Deselect

The problem with this very basic trigger is warcraft take too much time to deselect(some kind of lag, like 0.5sec)

------------------------------------
-Disable control when I dont want the user to select

I need to lock the mouse but still be able to use the arrow, see multiboard and floating text.
While control locked, you can still see the multiboard, cant select, cant use arrow and I dont know about the floating text.

------------------------------------
I didnt tryed using this:
-Every 0.01sec
-Deselect

I dont know if this would cause major lag because of the very fast looping but if I decrease the looping rate I fear you will be able to see the unit stats during a fraction of second.

Does anyone know where I can find a jass function which remove only the mouse but let everything else show up? Or does anyone have a suggestion for a trigger?
11-22-2003, 05:13 AM#2
FerretDruid
Might want to check this thread made by Grater. He figured out a way to make a unit unselectable, but otherwise normal. And the "HP bar" doesn't even show over their heads when you hover your cursor over them.

http://wc3campaigns.com/forums/showt...threadid=35043
11-22-2003, 10:05 AM#3
BlackLotus
THat's very easy... just delete the Triggers and give the Unit the Ability
Unknown(Loc) ...that's not selectable and
no HPBar...

HF

MfG
B~L~
11-22-2003, 03:22 PM#4
l]arkOne
I need to toggle between can and cannot select. Can I use remove ability and add ability to do this?

EDIT: I cant find those ability. Can you tell me the path?
11-22-2003, 03:27 PM#5
FerretDruid
Aloc (Locust) cannot be removed. So no, that wouldn't work for what you are trying to do - unless there's a workaround. I woulnd't know anything about that myself :(
11-22-2003, 04:12 PM#6
l]arkOne
HAHA I found something new and working!

You need a copy of a unit but with the locust ability.

You use replace unit with copy using old unit relative to make it unselectable then you do the same to bring it back selectable.

The only bad part is you have to set your unit variable(if any)
11-22-2003, 11:22 PM#7
PitzerMike
maybe you'd rather do a morph using modified chaos conversion spells to carry over buffs and to retain the identity of the unit
11-23-2003, 03:43 AM#8
l]arkOne
I dont know how morph work. Can you give me a easy to understand tutorial?

BTW, dont you think rendering a unit unselectable/selectable would be a great function in the second WEU(if any)?
11-23-2003, 04:16 AM#9
Grater
Actually I believe that 'Aloc' is removed by hiding then unhiding the unit. This is deeply in the realm of undocumented&unexpected behaivour, but feel free to experiment with it.

Remember that a unit with 'Aloc' normally cannot be selected OR targetted OR hit by anything, it's basically etheral and invunerable.

However transforming the unit with a chaos ability (or to put it another way... a unit transformed by the chaos ability) with 'Aloc' cannot be selected, but can be targetted and hurt.

So the possible ways are:
Use replace unit, one with 'Aloc'... doesn't work on heroes, replaced unit is invunerable.

Use Chaos ability + 'Aloc' + hide/unhide. This is screwing around with undocumented side effects (meaning it's not guaranteed to work next patch, and may break in unexpected ways), you need to make a fair number of new abilities. But it works great for heroes and everything, including keeping (de)buffs on the unit (ie innerfire, cripple...)

Transfer to AI player + keep color. You can still select the unit, but cannot order it. This uses up player slots, thats the main downside. And the unit can still be selected.
11-23-2003, 08:26 AM#10
PitzerMike
For an example: Make a copy of one of the Orc chaos spell (eg. Chaos (grunt)) and then change the target unit code to the 4-letter-code of the second version of your hero/unit.

Then when you wanna morph the unit use the trigger action Add ability (your cahos ability) to <your unit> and it will be morphed.
Make another chaos ability to morph it back ...

But as Grater stated in combination with aloc there are side effects, which might/might not be removed by the patch.
11-23-2003, 11:11 PM#11
l]arkOne
Thank for the info on hide/unhide.

I noticed something:

I'll use this
Click: go on a unit and click on it(the hp bar appear)
Select: make a rectangle over one or several unit to select em.
Target: using trigger


-add Aloc ability unclickable, unselectable and untargetable
-remove Aloc ability unclickable, unselectable and targetable
-remove Aloc+hide+unhide unclickable, selectable and targetable

So Its possible to do all I want without using morph or using several unit. The only weak point is you cant see their hp bar and you cant click on em anymore.