checking to see if player is defeated

Maps and the art of mapmaking.
JagoBC
Leprechaun
Leprechaun
Posts: 29
Joined: 29 May 2006

checking to see if player is defeated

Unread postby JagoBC » 30 May 2008, 20:43

OK.. So now that I know how to check for which players are human and which are AI, does anyone have some small loop or thread that I can run daily to see which players have been defeated? I thought my multiplayer map was finished, but on my last play i noticed toward the end of the game that I was getting errors saying something along the lines of "Player not active". I am certain this was at the part of my daily code where I reminded the AI of what it should be doing (SetAIAttractor) so I moved that part of the script to the very end, but it still stops the code for any still active AI players numbered higher than the AI players that have been defeated. If I could insert a loop to check each player number to see if it has been defeated, I could then change the attractors to if statements only to be executed if the AI player has NOT been defeated.

Thanks.

User avatar
Thelonious
Round Table Knight
Round Table Knight
Posts: 1336
Joined: 06 Jan 2006
Location: right behind the next one

Unread postby Thelonious » 04 Jun 2008, 15:45

Ok, first off, which version are you using? If it's not HoMM IV, I can't help.


I believe that in HoMM IV there is a way to check, if you make it a daily or continous event it'll work. Make a conditional action; and make the condition (under IF) 'PLAYER IS ELIMINATED' there you can choose the color of the various (AI) players.

I hope I've helped
Grah!


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: Ahrefs [Bot] and 4 guests