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

How to make a unit hard to select, but not impossible.

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
I have a 3rd person boat mini-game in the works. I put the players camera behind the boat, so that wherever they click, the boat turns in that direction. They actually don't have the boat selected (they're selecting an invisible unit elsewhere on the map), so they will never have to manually select the boat.

Problem: when the players right-click, they will sometimes hit the boat itself, which means nothing happens and the boat doesn't steer.

Solution: I want to make the boat very hard to click on. I can't give it a locust ability because enemy units (not players) need to be able to attack it.

Is there some way to modify the ease with which a unit can be selected? I can do some modelling (e.g. adding attachments, sound effects), but I don't have any experience moving nodes around or anything.
 
Level 6
Joined
Feb 16, 2014
Messages
193
I dont think thats possible as those kind of things are hardcoded to the game,but then again i might be wrong.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
How about
  • Game - Disable selection and deselection functionality (Enable selection circles)
You can still select units with triggers.

Or
  • Remove Locust Partially
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set u = (Random unit from (Units currently selected by Player 1 (Red)))
      • Custom script: call UnitAddAbility(udg_u, 'Aloc')
      • Custom script: call UnitRemoveAbility(udg_u, 'Aloc')
      • Unit - Turn collision for u On // You might not need this
      • Unit - Add Bear Form to u
      • Unit - Order u to Night Elf Druid Of The Claw - Bear Form
      • Unit - Remove Bear Form from u

Now you can not select the particular unit with your mouse, but you can target it with abilities. Hide/unihide it to restore it to normal.
 
Level 14
Joined
Aug 30, 2004
Messages
909
Some great ideas, guys thanks.

Faith, I should point out that locust abilities cannot be attacked, so I'm afraid that won't work.

Chaosy, I do actually force them to deselect, but it cancels out the order; meaning you right click ahead to turn but instead select the ship...and hence do not turn.

Maker, good to hear from you again! I suppose I could remove selection ability... I really don't need it because I use triggers to force the player to select the controlling unit. I'll try that as it seems the most simple. The bear form trick I've never heard of before, but I'll keep it in mind if the deselection doesn't work.

Rulerofiron99, I think I could do that. One question, if I killed the unit would the boat model that is attached to the transparent cube play its death animation? Would it tilt to the side when ordered and so forth?

Thanks all; +rep all around.
 
Status
Not open for further replies.
Top