Show/Hide Unit Problem

Severon

New Member
I've got a couple of trigger design to hide a particular building and spawn a unit for that building, then after a condition is met the building is to reappear and the unit is to be removed. The triggers I have work fine when they first run, but on the second time around they don't hide the structure, but they still spawn the unit and I'm a little confused to why it won't hide them again.

Here is a look at a sample trigger:
Trigger:
  • Spawn
    • Events
    • Conditions
    • Actions
      • pick every unit in Entire map owned by any plater Required: Structure Exclude dead missile Hidden.
      • Actions
        • If
          • picked unit == marine (structure)
        • then
          • hide picked unit
          • create 1 marine (unit) for owner of picked unit at position of picked unit
        • else
    • create 10 larva for player 5 at center of region Spawn
    • variable - set flag == 1


Trigger:
  • Check Spawn
    • Events
      • every 5.0 sec Game Time
    • Conditions
      • and
        • player 5 supply == 0
        • player 10 supply == 0
    • Actions
      • if
        • flag == 1
      • then
        • pick every unit in Entire map owned by any player Exclude: dead missile, hidden, invulnerable, structure
          • actions
            • remove picked unit
        • pick every unit in Entire Map owned by any player Required: hidden Exclude: missile dead
          • actions
            • show picked unit
      • variable - set flag = 0
      • else
    • if
      • counter == 12
      • then
        • run trigger Spawn Don't Wait
      • else
        • Variable - Set counter = (counter+1)
 

Monsterous

In the Shadows, Lurking.
It looks fine to me, so heres some suggestions

One suggestion is that when the building is being shown on the second trigger, the first trigger doesnt have time to hide it as its being shown. Put a wait after the building is being shown, or before the building is being hidden, see if that works.


Another suggestion, is that you could make the structure into a variable and change all the "marine (structure)" into the variable you just made. The triggers do seem to recognise the building still though by spawning the unit, so this is unlikely to work.
 

Severon

New Member
Hmm One suggestion one I'm not sure if thats the problem as the check spawn will not happen after the spawn has gone through, until the 10 larva that were created are killed.

Also the flag variable is to keep from calling on the show unit unless the spawn trigger has ran. Once spawn runs flag is set to one every 5 seconds that player 5 or 10 doesn't have a unit it will check to see if flag is 1. If it is then it will show the units and set flag to 0 so it doesn't keep trying to show the units. if Flag is 0 it should just skip over show units.

Never the less I will try your suggest and I hope it works, but I won't understand why it works if it doesXD
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    I really do not want to move to California otherwise I might consider it.
  • The Helper The Helper:
    yeah California is not anywhere you really want to live
  • The Helper The Helper:
    That is why I did not take the job Blizzard offered me back in the day, there is no way I could have moved my family there on what they were offering, not even close and that was like 20 years ago
  • The Helper The Helper:
    yeah they wanted me on the tech support team when they did not get me they got one of the next MVPs in Dinobot
  • The Helper The Helper:
    Dinobot was one of the youngest of the MVPs tkron probably could have worked for Blizzard but he had a good job in Chicago doing business programming already
  • The Helper The Helper:
    Dinobot probably still works for Blizzard would love to reconnect with that guy
  • The Helper The Helper:
    I wonder what ever happened to Wargasm?
  • The Helper The Helper:
    This new version of Xenforo really is awesome
  • Ghan Ghan:
    Wargasm is still around. He works for the domain registrar where thehelper.net is kept.
  • Varine Varine:
    Is sqrage still around?
  • The Helper The Helper:
    I have not seen him on lately the forum says he was last on 2 years ago
  • The Helper The Helper:
    How are you doing Varine have not seen you around in a minute
  • thewrongvine thewrongvine:
    lol I live in CA
  • thewrongvine thewrongvine:
    I've got some friends in animation department who have been applying for Blizzard, doing interviews and such. They said the workplace seems nice, though now it'd be all remote work I suppose
  • The Helper The Helper:
    good for them I live close to Austin and am trying to get my kids interested in getting into Games but not having much luck. I would never let them move to Cali.
  • The Helper The Helper:
    unless it was huge money
  • The Helper The Helper:
    and even then with the taxes I really could never let them move there
  • thewrongvine thewrongvine:
    Haha fair enough, I have no interest in CA at all as a living place either. Really only here just for the work in LA, but hopefully once I get settled enough in my work, I can move out
    +1
  • Ghan Ghan:
    +1
  • jonas jonas:
    " a traditionally-sized California family of one person ":cool:
    +1

    Members online

    No members online now.

    Affiliates

    Hive Workshop
    Top