HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Player Left... Share gold problem

03-15-2004, 05:37 AM#1
GosuSheep
"brownleft"
Events
Player - Player 12 (Brown) leaves the game
Conditions
Actions
Set DeathGold[(Player number of (Triggering player))] = ((Triggering player) Current gold)
Player Group - Pick every player in (All allies of (Triggering player)) and do (Player - Add DeathGold[(Player number of (Triggering player))] to (Picked player) Current gold)
For each (Integer A) from 1 to 6, do (Set Wolfbrown[(Integer A)] = (Item-type of (Item carried by (Triggering unit) in slot (Integer A))))
Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (For each (Integer A) from 1 to 6, do (Item - Create Wolfbrown[(Integer A)] at (Position of (Picked unit))))

well, thats the code... but for some reason, when the player leaves, nothing happens... the ally does not get the gold and items do not drop
03-15-2004, 05:59 AM#2
Shvegait
As far as the item situation is concerned, there is no "Triggering Unit", so you will need some other way of accessing the unit you want to access, either store it in an array or do a Pick Every Unit owned by Player of Type/matching Condition.
03-15-2004, 02:30 PM#3
Vexorian
Besides of the use of triggering unit and that it will only work for Player 12

It looks right, how are you testing that? Did you give gold to Player 12 before he leaves, and how do you make player 12 to leave?
03-15-2004, 04:17 PM#4
GosuSheep
dang, didnt see that... thanks guys

but for the leaving thing

this is in Sheep tag v7.1

a lot of people get bored with being the wolf and just decide to leave... but i want to make it so the wolf wasnt a total waste so his items and his gold are spread to his allies... so far ive done some pretty logical things and they have still not worked

example:
Events
-for every 1 second

Conditions
-Player slot equal to HAS LEFT THE GAME

Actions
-Pick every player in (allies of triggering player), ADD - (trigger player gold / number of players in allies of [trigger player]) to picked players current gold




that thing didnt work either... how strange^^
03-15-2004, 10:46 PM#5
Arohk
Quote:
Originally Posted by GosuSheep
dang, didnt see that... thanks guys
example:
Events
-for every 1 second

Conditions
-Player slot equal to HAS LEFT THE GAME

Actions
-Pick every player in (allies of triggering player), ADD - (trigger player gold / number of players in allies of [trigger player]) to picked players current gold




that thing didnt work either... how strange^^

how could it?
you use trigging player but there is no triggering player if you use every 1 seconds of game time, use player 1 leaves the game ect.for action
03-16-2004, 03:50 AM#6
ThyFlame
I don't have my WE up... but I know you're going to need an event response to make this work.

You could just take it off another, pre-existing, system.