Map Database  •  FAQ  •  RSS  •  Register  •  Login

How to destroy all houses of defeated player

<<

petrmenzel

Serf

Posts: 7

Joined: 22 Apr 2017, 18:31

KaM Skill Level: Veteran

Post 22 Apr 2017, 23:34

How to destroy all houses of defeated player

Hi, I am looking for how to make script to destroy all houses of defeated player. Any idea? Thx you for help.

I am starting with this so I do not understand how to specific that I want to destroy building of the player.

U have found this and this. But I cannot get it to the work.
  Code:
OnPlayerDefeated
Actions.HouseDestroy

Thx you very much
<<

Krom

User avatar

KaM Remake Developer

Posts: 3156

Joined: 09 May 2006, 22:00

Location: Russia

KaM Skill Level: Fair

Post 23 Apr 2017, 06:52

Re: How to destroy all houses of defeated player

Show us your current code
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 284

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 23 Apr 2017, 09:40

Re: How to destroy all houses of defeated player

pseudocode:
procedure OnPlayerDefeat(player) begin
_________ array:= States.PlayerAllHouses(player)
_________ for i:= 0 to array.Length do begin
____________ Actions.HouseDestroy(array[i])
_________ end;
end;

thats should work :>
<<

petrmenzel

Serf

Posts: 7

Joined: 22 Apr 2017, 18:31

KaM Skill Level: Veteran

Post 03 Sep 2017, 18:34

Re: How to destroy all houses of defeated player

I have done it my way :-) but thx

Return to Dynamic Scripting

Who is online

Users browsing this forum: No registered users and 1 guest