give unit control if not there

D

Decapatater

Guest
Is there a trigger for if a unit has been placed in the game and the player isnt there, it gives control to player one and also if someone leaves or gets kicked out of the game it gives control to player one?

sry for posting so much lol, im new.
 
The action you need is "Player - Set Aspect of Alliance". From there, you can select "Full Shared Control".
 
I haven't tested it, but it would be something like this (Sorry, I'm at work, so no access to WE at this moment :p )
Code:
Event
    Player 2 leave the game
    Player 3 leave the game
    ...
Conditions
    None
Actions
    Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
        Unit - Change ownership of (Picked unit) to Player 1 (Red) and Change color
I don't know if Triggering player works on Leave the game events, but it's a try
 
Try the free trigger section Ryoko posted the whole trigger on first or second page
 
The triggers don't work that that person posted, they uploaded the map and its not working.
 
With the map you downloaded, did you make sure the team preferances (2v2v2v2v2, 6v6 etc.) and the colours of the players of the teams matched up...?
 
Would that fix this problem?
Code:
Player Leaves the Game
    Events
        Error
        Error
        Error
        Error
        Error
        Error
    Conditions
    Actions
        Wait 3.00 seconds
        Game - Display to (All players) for 5.00 seconds the text: ((Name of (Triggering player)) +  has left the game.)
        Game - Display to (All players) for 5.00 seconds the text: (|c00ff0000+ + ((String((((Triggering player) Current gold) / (Number of players in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))))))) + |r spoils of war.))
        Player Group - Pick every player in (All players) and do (If (((Picked player) slot status) Equal to Is playing) then do (Player - Add (((Triggering player) Current gold) / (Number of players in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to
        Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Unit - Change ownership of (Picked unit) to (Random player from (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)))) and Change color)

In the trigger editor, thats what it says. Its not suposed to be Error Error Error...
 
I just double clicked the 1st Error and a thing popped up and it says:

Trigger function does not exist in database: TriggerRegesterPlayerEventLeave
 
i think there should be an event or a condition that says somthing like this
Player slot status equal to not playing
i belive its in conditions
 
Decapatater said:
I just double clicked the 1st Error and a thing popped up and it says:

Trigger function does not exist in database: TriggerRegesterPlayerEventLeave
This is in a downloaded map? It probably uses WEU (World Editor Unlimited) or something.
 
Ok, this is the code I put for player 2:
Code:
p2 no play
    Events
    Conditions
        (Player 2 (Blue) slot status) Equal to Is unused
        (Player 2 (Blue) slot status) Equal to Has left the game
    Actions
        Game - Display to (All players) the text: Player 2 Is either ...
        Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Unit - Change ownership of (Picked unit) to Player 1 (Red) and Retain color)

Player 3:
Code:
p3 no play
    Events
    Conditions
        (Player 3 (Teal) slot status) Equal to Is unused
        (Player 3 (Teal) slot status) Equal to Has left the game
    Actions
        Game - Display to (All players) the text: Player 3 Is either ...
        Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Unit - Change ownership of (Picked unit) to Player 1 (Red) and Retain color)

And all the way to player 8, but its not working... Its a maze map and there units are placed but it doesn't switch the player control.
Oh and is there a way of making it less than 8 triggers?
 
That's because you have no event in those triggers. Without an event, nothing will happen.
 
Sargon said:
That's because you have no event in those triggers. Without an event, nothing will happen.
And also because your conditions can never both be true: the slot status can't be two different things at once.
 
Something in your Editor is &@%@%ed. Try reinstalling Warcraft.
 
Try this:
Code:
Give Control
    Events
        Player - Player 1 (Red) leaves the game
        Player - Player 2 (Blue) leaves the game
        Player - Player 3 (Teal) leaves the game
        Player - Player 4 (Purple) leaves the game
    Conditions
    Actions
        Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
            Loop - Actions
                Unit - Change ownership of (Picked unit) to (PLAYER) and Retain color
 
It will probably work on Bnet when someone leaves but it doesn't work when no one is in the game... I want it so if there is an open slot player 1 can still control that person's unit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    It's an unnecessarily long and just not that good of a cord. Falls out of the little clip I put it in.
  • Varine Varine:
    And yeah I was working. It was a suprisingly good weekend, I didn't run out of anything until today and had most of resolved. I think the only thing I didn't have some solution for was halibut, but in my defense I got 45 pounds or something last Thursday. It took me like an hour and a half at the end of the night.
  • Varine Varine:
    Today I had to scramble, I didn't work most of dinner service and no one told me shit. They had a rough few hours lol
  • Varine Varine:
    I have two salmon, Sockeye and Atlantic. Atlantic is used for the kids salmon and the salmon and beet salad, and can also be added onto any dish or just as a side. Atlantic salmon will almost exclusively ever be FARMED, as it is endangered in the wild, and we ALWAYS cut them to 4 ounces.
  • Varine Varine:
    SOCKEYE salmon, very different and this IS wild caught. We have an ENTREE version, and an add on version. The entree is 7 ounces, the add on is 4. Why? Because that is how someone that wasn't me set up the computer.
  • Varine Varine:
    I had to have this conversation like ten fucking times tonight
  • Varine Varine:
    The issue being, I came into work and had none of this whatsoever
  • Varine Varine:
    No one told me shit
  • Varine Varine:
    So, taking into consideration that what I typed out up there is kind of some fucking nonsense that under normal circumstances no one really needs to fucking be able to explain in any rational way
  • Varine Varine:
    Let alone trying to figure it out from a wildly stressed out me that is also on a phone call trying to get something to show up from Seattle tomorrow while trying to explain this salmon situation, that also is barely solved in maybe a few hours and and but I am bulking it with a few steelhead filets I have and that is a WHOLE fucking different thing to the 19 year old server that got put on day shift C crew that doesn't know who I am.
  • Varine Varine:
    I did however really want days. I like getting off at 4 half the time, and that makes it worth it!
  • Varine Varine:
    Also I hate my job right now but I think that was the hard part. Now it's just work
  • Varine Varine:
    @jonas I'm sorry? I don't know what you're referring to.
  • Varine Varine:
    Once we hit winter I feel like I get to back to having a pretty cool job. Like I bitch about it all the time, but it's work. I'm still gonna bitch
  • Varine Varine:
    All in all though I think this summer is going really well. Some complicated things, but at the end of the day it isn't THAT big of a deal. Not all of our servers have quite realized they are technically sales
  • Varine Varine:
    Like yeah it is a substitute, but FOMO. Chef isn't getting this again this year, he has to figure it out, so it's slightly off on the menu, but that is more or less the LOWEST quality and price. Right now, steelhead is a real stealhear, right?
  • Varine Varine:
    Like fuck off even I can do it
  • Varine Varine:
    I am going to get one of my servers to do that in her server voice and you'll see my point
  • Varine Varine:
    Maybe the bartender. Idk, it's one of my favorite things to hear them go from calm to customer service voice. They will translate it to like "The chef is trying to change that a bit right now so he does have a Alaskan river steelhead. Yeah like the one you might fish probably!" And then the girls can bat their eyes and do pretty girl server shit
  • Varine Varine:
    At least that's how imagine some of them. Did you know mayonnaise is dairy free? A suprisingly amount of people don't\
  • The Helper The Helper:
    mayo is eggs right?
  • The Helper The Helper:
    Seems I never watched the Witcher - looks like i have a lot of content
  • The Helper The Helper:
    Season 1 Episode 8 the marathon continues...
  • jonas jonas:
    mayo is eggs & oil
    +1
  • The Helper The Helper:
    I got halfway season 2 on The Witcher and it lost me. I am going to have to pick this one up again later.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top