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

dummy selection

Status
Not open for further replies.
Level 7
Joined
Jun 15, 2010
Messages
218
Can i make a players camera move to his hero if he would dubbel click my special dummy (or click the dummys portrait) ?
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Can i make a players camera move to his hero if he would dubbel click my special dummy (or click the dummys portrait) ?

could you give an example? I don't know what dummy you have nor where you use it for..
Your saying he, do you mean that whenever an enemy player selects a unit it has to pan his camera on to your hero?


EDIT:
Hm I think I understand what you need:
  • Example
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (teal) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to YourDummy
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Picked unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set Temp_loc = (Position of (Picked unit))
          • Camera - Pan camera for (Triggering player) to Temp_loc over 0.00 seconds
          • Custom script: call RemoveLocation(udg_Temp_loc)
so whenever player 1-3 clicks your dummy his camera will be moved to his hero.
the custom script is to remove some leaks.
 
Last edited:
Level 7
Joined
Jun 15, 2010
Messages
218
My hero has more then 5 abilities, so if he wants to learn a new ability it will go like: click [skills] (a dummy ability) - (then the player selects the dummy that has a few dummy abilities) - When clicked on a dummy ability then the hero will gain/upgrade that skill. Its just not cool that when a player clicks on the portrait then his camera will move to dummy.
[And if let the dummy stick to the hero, then he wont move his camera when clicked the portrait, but then he can select the dummy with his hero at the same time. and thats also not cool


and i also got another question: how can i let a trigger[1] run trigger[2] without trigger[2] having any events?
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
My hero has more then 5 abilities, so if he wants to learn a new ability it will go like: click [skills] (a dummy ability) - (then the player selects the dummy that has a few dummy abilities) - When clicked on a dummy ability then the hero will gain/upgrade that skill. Its just not cool that when a player clicks on the portrait then his camera will move to dummy.
[And if let the dummy stick to the hero, then he wont move his camera when clicked the portrait, but then he can select the dummy with his hero at the same time. and thats also not cool


and i also got another question: how can i let a trigger[1] run trigger[2] without trigger[2] having any events?

Trigger - Run trigger2 <gen> (checking conditions)

It's found under actions -> Trigger - Run (checking conditions)

EDIT: is the dummy supposed to be selectable anyway? You could also make the dummy unselected whenever he selects the dummy... (stupid question yes)
I have no idea how to check if a player clicks a unit's portrait. Don't know if it is even possible (Maybe with trackables you can? :S) Or maybe it interacts with selecting a unit...

Have you tryed my trigger? It might work, not sure though...

EDIT 2:
you could also make the dummy unit unselectable and use triggers to select the dummy so that you can not select the dummy but only through triggers...
Then move the dummy on the position of the hero, whenever your player clicks on the portrait the camera will be on the location of your hero.
And the player is not abled to select the dummy and your hero at the same time... ;)

I'm still at work right now so I'll create a test map when I get home ok? ;)
 
Level 7
Joined
Jun 15, 2010
Messages
218
i thought about that, just dident knew how to make the player not be abled to select the dummy and hero at the same time:p

il wait till u get back home. Thanks man!
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
i thought about that, just dident knew how to make the player not be abled to select the dummy and hero at the same time:p

il wait till u get back home. Thanks man!

add the ability locust swarm to your dummy unit and he'll be unselectable in-game.
He'll only be selectable through triggers.
And thats when you can put the dummy underneath the hero so you can click the portrait to move to the dummy since it's already underneath u, making no difference = problem solved ;)

You can figure it out by yourself from here or you'll have to wait till I come home to make you an example map
 
Level 7
Joined
Jun 15, 2010
Messages
218
Its works until i make dummy selectable with triggers and i select him and my hero at the same time:(

Spells in a spelbook that is in a spellbook could cause bugs wont they?
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
could you upload your map so i can see it with my own eyes ;)?
I might be abled to fix this.

I'm at home right now.
 
Status
Not open for further replies.
Top