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

Help with -Repick trigger

Status
Not open for further replies.
Level 6
Joined
Mar 6, 2006
Messages
169
Yet again I must request aid in solving an issue with a trigger.
I realize I must come off as quite lazy considering I ask for help so much, but I've done exactly what the "tutorial" told me to do with this trigger, and it still doesn't bloody work!

This is what it do.
Game starts, I pick a hero, the hero spawns, I type -repick, the hero is removed, I'm taken back to the tavern where I'm allowed to pick a new hero.
But when I pick a new hero, the hero is immediately removed from the game...

Why is that? And how could I go about solving it.
 

Attachments

  • RepickProblem.JPG
    RepickProblem.JPG
    72.7 KB · Views: 60
Level 37
Joined
Mar 6, 2006
Messages
9,240
You don't have to use "AND" in the conditions. Conditions are under "AND" by default. That's like saying AND AND, which is redundant.

Anyway, that's not the problem. What is that "owner of(solf unit)"? I don't think the trigger can catch it, since the event would have to be "unit is sold" or something.
 
Level 6
Joined
Mar 6, 2006
Messages
169
Hmm...

Is it possible that the original hero choice trigger screws up things?

Edit: The hero is no longer removed, instead it's just spawned in front of the tavern and is stood there without being moved to the starting location of your respective team.
 

Attachments

  • RepickProblem2.JPG
    RepickProblem2.JPG
    51.4 KB · Views: 24
Level 6
Joined
Mar 6, 2006
Messages
169
Bump.

Sorry 'bout that, but I really need a solution to this issue to finally make the map fully playable in beta stage.

Anyone who can help me?
 
Level 8
Joined
Aug 3, 2008
Messages
257
  • Repick Copy
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
      • Player - Player 2 (Blue) types a chat message containing -repick as An exact match
      • Player - Player 3 (Teal) types a chat message containing -repick as An exact match
      • Player - Player 4 (Purple) types a chat message containing -repick as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
      • Player - Player 6 (Orange) types a chat message containing -repick as An exact match
      • Player - Player 7 (Green) types a chat message containing -repick as An exact match
      • Player - Player 8 (Pink) types a chat message containing -repick as An exact match
      • Player - Player 9 (Gray) types a chat message containing -repick as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -repick as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Unit - Remove (Picked unit) from the game)
      • Unit - Create 1 X for (Triggering player) at (Center of MoveLegionHero <gen>) facing (Position of (Triggering unit))
      • Camera - Pan camera for (Matching player) to (Center of MoveLegionHero <gen>) over 1.00 seconds
      • Player - Set (Matching player) Current lumber to 1
try this...
 
Level 6
Joined
Mar 6, 2006
Messages
169
No. It needs to prevent the player from repicking his hero more than once.
Aswell as disabling/enabling the chosen hero.

I need to get my current trigger to work since it's part of the original hero choice trigger.
 
Level 4
Joined
Mar 23, 2008
Messages
87
You don't have to use "AND" in the conditions. Conditions are under "AND" by default. That's like saying AND AND, which is redundant.

Anyway, that's not the problem. What is that "owner of(solf unit)"? I don't think the trigger can catch it, since the event would have to be "unit is sold" or something.
Excactly..
Change:
  • Set HeroChosenByPlayer[(Player number of (Owner of (Sold unit)))] = False
To:
  • Set HeroChosenByPlayer[(Player number of (Triggering player))] = False
 
Level 9
Joined
Jun 25, 2009
Messages
427
  • Repick Copy
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
      • Player - Player 2 (Blue) types a chat message containing -repick as An exact match
      • Player - Player 3 (Teal) types a chat message containing -repick as An exact match
      • Player - Player 4 (Purple) types a chat message containing -repick as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
      • Player - Player 6 (Orange) types a chat message containing -repick as An exact match
      • Player - Player 7 (Green) types a chat message containing -repick as An exact match
      • Player - Player 8 (Pink) types a chat message containing -repick as An exact match
      • Player - Player 9 (Gray) types a chat message containing -repick as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -repick as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Unit - Remove (Picked unit) from the game)
      • Unit - Create 1 X for (Triggering player) at (Center of MoveLegionHero <gen>) facing (Position of (Triggering unit))
      • Camera - Pan camera for (Matching player) to (Center of MoveLegionHero <gen>) over 1.00 seconds
      • Player - Set (Matching player) Current lumber to 1
try this...

i think you can use something like this but.. i think if you want it easy made, you should create like 12triggers.... for each player with the end like this (if he writes -repick) the last action (after making the lumber or w/e 1). turn trigger off :)))) and then only other players could do this and if they wrote -repick turn off that trigger with action (think this should work, but it's kinda stupid creating 12triggers for one command..) :) (hope this works for ya ;)).

Tiche3
 
Level 6
Joined
Mar 6, 2006
Messages
169
Thank you Bomi. It works perfectly now.

Sorry I didn't get it the first time. I've been working 2 weeks straight with this map now and I'm getting somewhat lazy and dumb now, so I need straight forward answers, haha.

And as for your solution Tiche3, it doesn't fit the original hero selection system and the hero selection unit is permanent, so it's never removed or added. :)


I do have one problem right now though, which is somewhat related to the hero selection system.

I managed to create a trigger that changes the player's name to 'Carrigage (Name of hero)', both written in the colour of the player's original colour.

And it works great, except for one thing.. Repicks. If he repick, he suddenly get 'Carrigage (Name of first hero) (Name of repicked hero)', and I wonder if there's any way to change back the player's name to his original name without the '(Name of hero)', so when he repicks he gets the new hero behidn hsi name
 
Status
Not open for further replies.
Top