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

Hide/Unhide, Set Rally point Trigger doesn't work

Status
Not open for further replies.
Level 4
Joined
May 31, 2011
Messages
85
The Triggers

When the unit is selected, its instantly moved to "buffer region", and its hidden.
  • Soldier Sell
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Selling unit)) Equal to (Unit-type of Barracks 0000 <gen>)
    • Actions
      • Visibility - Enable fog of war
      • Unit - Remove Hero Picker 0001 <gen> from the game
      • Unit - Remove Barracks 0000 <gen> from the game
      • Unit - Remove (Buying unit) from the game
      • Unit - Move (Sold unit) instantly to (Center of Teleport Buffer <gen>)
      • Unit - Hide (Sold unit)
And the teleport
  • Soldiers Spawn
    • Events
      • Time - Elapsed game time is 50.00 seconds
    • Conditions
      • (Number of units in (Units in Teleport Buffer <gen>)) Equal to (Number of players)
    • Actions
      • Unit Group - Pick every unit in (Units in Teleport Buffer <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Unhide (Picked unit)
          • Unit - Set Rally-Point for (Picked unit) to Way Gate 0022 <gen>
Can i also somehow make the teleport trigger only to activate after every player has picked his unit??
Map attached.

Edit: Anyone please?
Edit2: I added a condition so this activate only when every player in game is standing in that teleport buffer but doesnt work..
but i dont think its the right condition, does that tells the number of players that re playing or simply the number of players that is 12..

I know i am not allowed to double post, but this is the most important part of my map because its going to happen over and over as each boss is killed.
 

Attachments

  • Taff.w3x
    18.4 KB · Views: 67
Last edited by a moderator:
Level 4
Joined
May 31, 2011
Messages
85
Should you use variables?
Set variables to the Sold Unit,and unhide (Variable Unit)?

this is what i got and still doesnt work
for the variable name unit i used unit
  • Soldiers Spawn
    • Events
      • Time - Elapsed game time is 40.00 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in Teleport Buffer <gen>) and do (Actions)
        • Loop - Actions
          • Set Unit = (Sold unit)
          • Unit - Set Rally-Point for Unit to Way Gate 0022 <gen>
          • Unit - Unhide Unit
Edit: w8 to try without the group unit.

  • Soldiers Spawn
    • Events
      • Time - Elapsed game time is 40.00 seconds
    • Conditions
    • Actions
      • Set Unit = (Sold unit)
      • Unit - Unhide Unit
      • Unit - Set Rally-Point for Unit to Way Gate 0022 <gen>
still nothing
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Firstly, you'll need to check which players are actually playing (as the "Number of Players" will return the amount of slots).

  • Map Initilization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
              • ((Picked player) controller) Equal to User
            • Then - Actions
              • Player Group - Add (Picked player) to playingForce
            • Else - Actions
Then the trigger would look somewhat like this:

  • Soldier Sell
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Selling unit)) Equal to Barracks
    • Actions
      • Set unitsChosen = (unitsChosen + 1)
      • Set tempLoc = (Center of Teleport Buffer <gen>)
      • Unit - Remove Hero Picker 0001 <gen> from the game
      • Unit - Remove Barracks 0000 <gen> from the game
      • Unit - Remove (Buying unit) from the game
      • Unit - Move (Sold unit) instantly to tempLoc
      • Set Ammo = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • unitsChosen Equal to (Number of players in playingForce)
        • Then - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units in Teleport Buffer <gen>) and do (Actions)
            • Loop - Actions
              • Unit - Unhide (Picked unit)
              • Unit - Set Rally-Point for (Picked unit) to Way Gate 0022 <gen>
        • Else - Actions
          • Unit - Hide (Sold unit)
      • Custom script: call RemoveLocation(udg_tempLoc)
I've changed the condition slightly, introduced a point variable to remove the leaks, combined the triggers (just because it's possible), removed the unit group leak.
I have tested it, it should work now.
 
Level 4
Joined
May 31, 2011
Messages
85
Firstly, you'll need to check which players are actually playing (as the "Number of Players" will return the amount of slots).

  • Map Initilization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
              • ((Picked player) controller) Equal to User
            • Then - Actions
              • Player Group - Add (Picked player) to playingForce
            • Else - Actions
Then the trigger would look somewhat like this:

  • Soldier Sell
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Selling unit)) Equal to Barracks
    • Actions
      • Set unitsChosen = (unitsChosen + 1)
      • Set tempLoc = (Center of Teleport Buffer <gen>)
      • Unit - Remove Hero Picker 0001 <gen> from the game
      • Unit - Remove Barracks 0000 <gen> from the game
      • Unit - Remove (Buying unit) from the game
      • Unit - Move (Sold unit) instantly to tempLoc
      • Set Ammo = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • unitsChosen Equal to (Number of players in playingForce)
        • Then - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units in Teleport Buffer <gen>) and do (Actions)
            • Loop - Actions
              • Unit - Unhide (Picked unit)
              • Unit - Set Rally-Point for (Picked unit) to Way Gate 0022 <gen>
        • Else - Actions
          • Unit - Hide (Sold unit)
      • Custom script: call RemoveLocation(udg_tempLoc)
I've changed the condition slightly, introduced a point variable to remove the leaks, combined the triggers (just because it's possible), removed the unit group leak.
I have tested it, it should work now.
  • Player Group - Add (Picked player) to playingForce
playing force is variable? tell me what type of it is pls
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
  • Player Group - Add (Picked player) to playingForce
playing force is variable? tell me what type of it is pls
I'll let you guess... pretty sure you're going to find it.


Look at the action in which it is used



What do I do with it? Look closely, I store multiple players in it...



The action says "Player Group - add player to [variable]" - the first part of the action, "Player Group", always indicates the main type it uses (like "Unit - create unit", or "Special Effect - add effect"


It wasn't that hard, was it?
 
Level 4
Joined
May 31, 2011
Messages
85
I'll let you guess... pretty sure you're going to find it.


Look at the action in which it is used



What do I do with it? Look closely, I store multiple players in it...



The action says "Player Group - add player to [variable]" - the first part of the action, "Player Group", always indicates the main type it uses (like "Unit - create unit", or "Special Effect - add effect"


It wasn't that hard, was it?

yes i did find out, moments after i posted abit egar to finish this faster.
i m stuck at the if condition but im sure i will make it work
 
Level 4
Joined
May 31, 2011
Messages
85
so i've done the new variables like this:
units chosen:
name: unitschosen
variable type: integer
temploc is done np

now i cant make the IF condition work.
the variables are not shown unable to chose from, this can be only to wrong condition type or the variable unitchosen is wrong, but if the unitchosen is else then integer i wont be able to do that (unitchosen + 1) so i assume the variable is correct
and for the if condition im using unit comparison
this is giving me a headake :D


yea using wrong condition i found it :D

so everything works but the set rally point to unit..
the unit is picked, and unhiden but it stays in that place..
 
Level 7
Joined
Apr 1, 2010
Messages
289
so i've done the new variables like this:
so everything works but the set rally point to unit..
the unit is picked, and unhiden but it stays in that place..
you want the unit to do a move to the waygate and use it right?
so use this its
  • Unit - Order (Picked unit) to Right-Click Way Gate 0022 <gen>
, its an issue order targeting a point.
 
Level 4
Joined
May 31, 2011
Messages
85
you want the unit to do a move to the waygate and use it right?
so use this its
  • Unit - Order (Picked unit) to Right-Click Way Gate 0022 <gen>
, its an issue order targeting a point.

this way the unit goes to the waygate but rightclicks a point not the waygate as unit, and if i go issue order targeting a unit it does nothing just stands still
 
Status
Not open for further replies.
Top