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

When player left

Status
Not open for further replies.
Level 4
Joined
May 2, 2013
Messages
107
Hi everybody,


my english is sucky, so i'll try my best.

This is what I want to do:

I got a little concept of a game, but i need to fix the 'player leaves' issue. For example when player 6 leaves, i want to give player 5 his buildings and income. The income is made by some timers and triggers. I hope it isnt that difficult to achive this. Can someone explain me in babytalk, cause i dont speak editing language, how to fix that. What triggers, event, triggers are recommanded for this one. And if its not done with triggers, how then? ^^

Well I hope someone can help me find searching what I'm looking for. I do think so, cause every game runs to this issue, I guess.

Thank you!


Kind regards,

Maartehhh
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Do something like this...
  • Player 6 Drop
    • Events
      • Player - Player 6 leaves the game with Victory
    • Local Variables
    • Conditions
    • Actions
      • Variable - Modify Income[5]: + Income[6]
      • Unit Group - Pick each unit in (Any units in (Entire map) owned by player 6 matching (No Value), with at most Any Amount) and do (Actions)
        • Actions
          • Unit - Change ownership of (Picked unit) to player 5 and Change Color
Obviously I do not know how your income system works so I assume you are using an integer array to map players to their income.
 
Level 4
Joined
May 2, 2013
Messages
107
Hmm that is a nice overview. Thanks man!! The units are clear to me now.. I couldnt figure why the victory type is nessecary in this event.. But clearly its the right one.. The income works kinda complicated.. I made a screenshot of mine income triggers..



triggerscreenshotplayer.png


Pherpas this will be an solution??

incomechange.png
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
I couldnt figure why the victory type is nessecary in this event..
Ops, did not notice that Victory... Set it to something else maybe.

I do not know how to integrate that trigger into your resource system as you have a lot of procedural coupling. I advise giving shared resources between Player 6 and 5 so that he can spend the resources even if he does not earn them.

Pherpas this will be an solution??
You can try it and see.

Another alternative would be to periodically dump resources from dropped players into their allies.
 
Level 4
Joined
May 2, 2013
Messages
107
Ops, did not notice that Victory... Set it to something else maybe.

Yes, i know. And thats why I am posting it here on The Hive Workshop. Hahahah, cuz i cant find an other event what describes the sistuation.

You can try it and see.

I will, but how the f do I test. I need 6 players xD...



Thanks anyway for the effort.
 
Level 4
Joined
May 2, 2013
Messages
107
Ye, I already did that. I tested with a friend of mine, and it worked. I can assure the triggers for the other players should work too. Only have this problem with the spanwing of units, they spawn on the wrong location. But its not that big issue, perhaps for later after it went public.

Thanks for you fast replies.

Kind regards
 
Status
Not open for further replies.
Top