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

[General] Remove/Disable Select

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,602
Hey,

What's the best way not to allow player control a unit?

I'm using this method right now but player has a little time to select the unit and even move it. You might have a better idea?

  • Untitled Trigger 001 Copy
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Archmage 0000 <gen>
    • Actions
      • Selection - Remove (Triggering unit) from selection
Also I'm searching for a better way to make a system where players selects a dummy hero, the selection is instantly moved to a dummy unit.

The game's a single-player game if that helps.


More information:

  • There will be only 1 this type of item in the whole game.
  • The unit that can use this is actually a hero.
  • Player can control at this point of game 3 heroes and some units.
  • Single-player campaign. No vJASS. I prefer GUI.
  • Please don't change the ownership of the unit. It will mess up things.
  • Waits are allowed.
  • I simply want you to create a way that disables player to use a unit that is using this item for a while.

Item description:


Monster Mask

|c00FEBA0E+12 Armor
+1000 Health
|cff6495edWhen used, the Hero becomes a monster for 10 seconds. While a monster, it cannot be controlled but has increased Attack and Movement Speed. Has 60 second cooldown.
|c00FEBA0EQuality: |c00FF8000Epic


Test map attached. Rep for the helpers.
 

Attachments

  • REMOVE SELECT.w3m
    16.5 KB · Views: 69
Last edited:
Level 4
Joined
Jul 15, 2012
Messages
89
if you wanna make it completely unselectable you can add Locust(unit ability) to your unit (cannot be added via triggers)
 
Register immediate/point/target orders, then in actions:
  • Trigger - Disable <this trigger>
  • Unit - Order <unit> to Stop
  • Trigger - Enable <this trigger>
If you want it to only prevent actions for a certain player, then just check if the triggering player is equal to whatever and if it is then order the stop. If you want to order the unit by triggers, then just disable the trigger before issueing the order and then reenable it afterward. It should work.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Maybe you can be more specific how does the Event occur.
I mean, if the Player can't select any unit and order it, what else can they do ?
If you don't want that, simply change the ownership of that unit to Player 2 or something ?
You can still click-select the unit, but you won't be able to order it, well, that is if you make them Allied (and not share units).
 
you may do like this;
  • Unpick
  • Events
  • Conditions
    • ((Triggering unit) is in GROUP) Equal to True
  • Actions
    • Selection - Remove (Triggering unit) from selection for (Triggering player)
set it up like this first;
  • For each (Integer A) from 1 to 12, do (Actions)
    • Loop - Actions
      • Trigger - Add to Unpick <gen> the event (Player - (Player((Integer A))) Selects a unit)
 
Level 37
Joined
Aug 14, 2006
Messages
7,602
I'm creating a special item ability: when player clicks the item player is unable to move the unit for a while, but gives the unit increased attack and movement speed. Any ideas for this? The ownership of the unit must not be changed.

Also I've a system that is a bit stupid because when you click a dummy hero it automatically selects a dummy building that has some abilities. However, it stays with the dummy hero like 0,5 second and that doesn't look good. Any ideas for this?
 
Level 15
Joined
Jul 6, 2009
Messages
889
This addresses your problem of an uncontrollable unit:

At first I thought you could add the Ward classification by triggers, but I don't think it is possible to do so. That would have removed the command card. Next would be to just make the unit do whatever order it was doing previously whenever it is ordered and has a buff. Check the testmap, I use Rising_Dusk's LastOrder to do so. When you cast Frenzy, you can't control your unit until it ends. Try attacking the other unit then use Frenzy, you can't stop the attack.

There are bugs though. If one unit died and it still had Frenzy, it'd just be ordered to attack the x/y of the dead unit. That's one way of doing it. I can't really think of any others that are feasible.
 

Attachments

  • NOCONTROL.w3x
    30.9 KB · Views: 67
Level 37
Joined
Aug 14, 2006
Messages
7,602
First I would like to thank everyone here for helping me out. I didn't know this was such a hard thing to do.

(or did I just presented the problem so poorly? Oh well)

Can you control any other unit in that map for that particular map/time ?

Of course. And the unit that is using the item is actually a hero. Player can control up to three heroes plus some other units at this point of game.

This addresses your problem of an uncontrollable unit:

At first I thought you could add the Ward classification by triggers, but I don't think it is possible to do so. That would have removed the command card. Next would be to just make the unit do whatever order it was doing previously whenever it is ordered and has a buff. Check the testmap, I use Rising_Dusk's LastOrder to do so. When you cast Frenzy, you can't control your unit until it ends. Try attacking the other unit then use Frenzy, you can't stop the attack.

There are bugs though. If one unit died and it still had Frenzy, it'd just be ordered to attack the x/y of the dead unit. That's one way of doing it. I can't really think of any others that are feasible.

Stopped working after I edited the map trying to see does your idea actually work. Is this vJASS perhaps? Because the campaign I'm working on doesn't function with vJASS.

And I've my doubts of this because you can actually control the unit. I couldn't test the map properly but I fear that if the unit has some spells can player cast them?

My way would be something like player simple can't take the control of the unit. But I guess there are other ways, I'm impressed.

Also I'm not familiar with JASS so you will have to make this really simple for me if I'm going to use this. I've always used GUI.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I have edited your test map, take a look.
In that map, you activate the Item Ability and you can't control that unit for 3 seconds.

It's a cheap trick, but I think it will work since your map is SRPG (you can modify which Player Slot does nothing at all in that game, and temporarily use it).
 

Attachments

  • REMOVE SELECT.w3x
    16.6 KB · Views: 58
Level 37
Joined
Aug 14, 2006
Messages
7,602
So you change the ownership... Hmm. It could work but hmm.

Actually, the game is only build in a way that it's player 1 vs neutral hostile. All the damages are checked and done only to these two factions. So if there comes third faction I would have to rebuild the damages so ehh. This cheap trick won't help me. :[

(this was one of my first ideas before I came here)
 
Level 15
Joined
Jul 6, 2009
Messages
889
Aeroblyctos said:
Stopped working after I edited the map trying to see does your idea actually work. Is this vJASS perhaps? Because the campaign I'm working on doesn't function with vJASS.

And I've my doubts of this because you can actually control the unit. I couldn't test the map properly but I fear that if the unit has some spells can player cast them?

Actually, it screws up with spells. So I guess this method doesn't work. I suppose it was worth a shot.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
How about periodic of 0.01 ?
I made an experiment and the Guinea Pig was me, I can only move the unit like 50 ~ 100 range away, that should not be a problem for eager Player tries to cheat the system won't they ?

Also, the main reason you want to do this is to make the unit somehow uncontrollable when using that item, right ?

That's why you got 2 bonuses but the catch is, you can't control your unit.

To remove the imbalance, you prevent Player from ordering the unit to do anything, well I can assure you the Player won't be able to do anything except he can move his unit for about 50 ~ 100 range.
 

Attachments

  • REMOVE SELECT.w3x
    16.8 KB · Views: 52
Level 9
Joined
Apr 26, 2011
Messages
403
"Ward" in World Editor unit classification setting, when you tick this "ward" classification, player can still select, but can't send any order(move/stop/attack etc).

so is it possible to create a dummy hero with "ward" classification.

then either change current hero to new "ward" form (Metamorphosis or similar ability) or just replace current hero to new "ward" version for x seconds?
 
Status
Not open for further replies.
Top