King Karolus Servant
Posts: 2154
Joined: 29 Aug 2007, 22:00
KaM Skill Level: Veteran
Location: In his dark thunderstormy castle
King Karolus Servant
Posts: 2154
Joined: 29 Aug 2007, 22:00
KaM Skill Level: Veteran
Location: In his dark thunderstormy castle
King Karolus Servant
Posts: 2154
Joined: 29 Aug 2007, 22:00
KaM Skill Level: Veteran
Location: In his dark thunderstormy castle
Castle Guard Swordsman
Posts: 1912
Joined: 03 Oct 2008, 22:00
KaM Skill Level: Skilled
Location: "Pawel95" on Youtube.com
I think it will end after a fixed amount of waves. But I'll make sure you're dead by then, so don't worry.
King Karolus Servant
Posts: 2154
Joined: 29 Aug 2007, 22:00
KaM Skill Level: Veteran
Location: In his dark thunderstormy castle
Haha, thanks for that. But where are you going to put all the troops you'll need for those waves? Do you think you'll have enough space? And will the player be able to see their opponents (so will the FoW be lifted there)?I think it will end after a fixed amount of waves. But I'll make sure you're dead by then, so don't worry.
Castle Guard Swordsman
Posts: 1912
Joined: 03 Oct 2008, 22:00
KaM Skill Level: Skilled
Location: "Pawel95" on Youtube.com
(...)
The units will be spawned at the start of each attack wave, so I don't actually need the huge area in the center. But when I made the map I didn't know this so it's still there.
The players will be able to see each other, but not the area in the center where the enemy spawns.
Ok but playing tower defence games on my smartphone i miss one big point in your TD game
After 5-10 levels they are normaly huge and strong "Endbosses". So you plan to add a super barbarian or sth like that?
Posts: 3822
Joined: 16 Sep 2007, 22:00
KaM Skill Level: Skilled
ICQ: 269127056
Website: http://lewin.hodgman.id.au
Yahoo Messenger: lewinlewinhodgman
Location: Australia
No, but you could also just play it with AI players and continue after they died I think.
Ok but playing tower defence games on my smartphone i miss one big point in your TD game
After 5-10 levels they are normaly huge and strong "Endbosses". So you plan to add a super barbarian or sth like that?
Can you spawn units now? I didn't know that. Was that already there?(...)
The units will be spawned at the start of each attack wave, so I don't actually need the huge area in the center. But when I made the map I didn't know this so it's still there.
The players will be able to see each other, but not the area in the center where the enemy spawns.
You can just start the game with no other players at all. The script could be written so when only one player is active the goal becomes not to stay alive longer than the other players (since with that condition you'd win immediately), but to defeat all of the waves.
(...)
(...)
That's kind of the whole point of this scripting thing, you write code which the game interprets that allows you to do stuff that was not possible before, such as spawn units, place resources in houses, etc.
King Karolus Servant
Posts: 2154
Joined: 29 Aug 2007, 22:00
KaM Skill Level: Veteran
Location: In his dark thunderstormy castle
Posts: 3822
Joined: 16 Sep 2007, 22:00
KaM Skill Level: Skilled
ICQ: 269127056
Website: http://lewin.hodgman.id.au
Yahoo Messenger: lewinlewinhodgman
Location: Australia
Well, he said he would make the waves strong enough to make survival impossible. Can't there be a command which removes goals completely, so you can just keep on playing, alone or in multiplayer?You can just start the game with no other players at all. The script could be written so when only one player is active the goal becomes not to stay alive longer than the other players (since with that condition you'd win immediately), but to defeat all of the waves.
(...)
function CheckPlayerVictories;
var
I, K: Integer;
Victory: Boolean;
begin
for I := 1 to 4 do
if not States.PlayerDefeated(I) then
begin
Victory := True; //Assume we've won, and check extra conditions below
//Check that every other player is defeated
for K := 1 to 4 do
if (I <> K) //don't check self
and States.PlayerEnabled(K) then //Only check players that are in use
Victory := Victory and States.PlayerDefeated(K);
if Victory then
Actions.Victory(I);
end;
end;
procedure OnPlayerDefeat(aIndex: Integer);
begin
//Somebody was defeated so we need to check if that caused a player to win
CheckPlayerVictories;
end;
Posts: 3822
Joined: 16 Sep 2007, 22:00
KaM Skill Level: Skilled
ICQ: 269127056
Website: http://lewin.hodgman.id.au
Yahoo Messenger: lewinlewinhodgman
Location: Australia
const
PLAYER_TOWER_X[0..3] = [1,2,3,4]; //X coordinates for each player's tower
PLAYER_TOWER_Y[0..3] = [5,6,7,8]; //Y coordinates for each player's tower
procedure OnHouseLost(aHouseID: Integer; aFullyBuilt: Boolean);
var PlayerTower: Integer;
begin
for I := 0 to 3 do
if States.PlayerEnabled(I) and not States.PlayerDefeated(I) then
begin
PlayerTower := States.HouseAt(PLAYER_TOWER_X[I], PLAYER_TOWER_Y[I]);
if (PlayerTower = aHouseID) or States.HouseDestroyed(PlayerTower) then
Actions.Defeat(I); //Player's tower was destroyed so they lose
end;
end;
!SET_AI_ATTACK TYPE 1 //Once Off
!SET_AI_ATTACK TOTAL_AMOUNT 20
!SET_AI_ATTACK COUNTER 0
!SET_AI_ATTACK TROUP_AMOUNT 0 20 //Melee
!SET_AI_ATTACK TROUP_AMOUNT 1 0 //Anti-horse
!SET_AI_ATTACK TROUP_AMOUNT 2 0 //Ranged
!SET_AI_ATTACK TROUP_AMOUNT 3 0 //Mounted
!SET_AI_ATTACK TARGET 3 //Custom X Y
!SET_AI_ATTACK POSITION 1 1
!COPY_AI_ATTACK 0
!SET_AI_ATTACK TYPE 1 //Once Off
!SET_AI_ATTACK TOTAL_AMOUNT 30
!SET_AI_ATTACK COUNTER 0
!SET_AI_ATTACK TROUP_AMOUNT 0 30 //Melee
!SET_AI_ATTACK TROUP_AMOUNT 1 0 //Anti-horse
!SET_AI_ATTACK TROUP_AMOUNT 2 0 //Ranged
!SET_AI_ATTACK TROUP_AMOUNT 3 0 //Mounted
!SET_AI_ATTACK TARGET 3 //Custom X Y
!SET_AI_ATTACK POSITION 1 1
!COPY_AI_ATTACK 0
!SET_AI_ATTACK TYPE 1 //Once Off
!SET_AI_ATTACK TOTAL_AMOUNT 40
!SET_AI_ATTACK COUNTER 0
!SET_AI_ATTACK TROUP_AMOUNT 0 40 //Melee
!SET_AI_ATTACK TROUP_AMOUNT 1 0 //Anti-horse
!SET_AI_ATTACK TROUP_AMOUNT 2 0 //Ranged
!SET_AI_ATTACK TROUP_AMOUNT 3 0 //Mounted
!SET_AI_ATTACK TARGET 3 //Custom X Y
!SET_AI_ATTACK POSITION 1 1
!COPY_AI_ATTACK 0
!SET_AI_ATTACK TYPE 1 //Once Off
!SET_AI_ATTACK TOTAL_AMOUNT 50
!SET_AI_ATTACK COUNTER 0
!SET_AI_ATTACK TROUP_AMOUNT 0 50 //Melee
!SET_AI_ATTACK TROUP_AMOUNT 1 0 //Anti-horse
!SET_AI_ATTACK TROUP_AMOUNT 2 0 //Ranged
!SET_AI_ATTACK TROUP_AMOUNT 3 0 //Mounted
!SET_AI_ATTACK TARGET 3 //Custom X Y
!SET_AI_ATTACK POSITION 1 1
!COPY_AI_ATTACK 0
!SET_AI_ATTACK TYPE 1 //Once Off
!SET_AI_ATTACK TOTAL_AMOUNT 60
!SET_AI_ATTACK COUNTER 0
!SET_AI_ATTACK TROUP_AMOUNT 0 0 //Melee
!SET_AI_ATTACK TROUP_AMOUNT 1 0 //Anti-horse
!SET_AI_ATTACK TROUP_AMOUNT 2 0 //Ranged
!SET_AI_ATTACK TROUP_AMOUNT 3 5 //Mounted
!SET_AI_ATTACK TARGET 3 //Custom X Y
!SET_AI_ATTACK POSITION 1 1
!COPY_AI_ATTACK 0
Users browsing this forum: No registered users and 2 guests
Powered by phpBB® Forum Software © phpBB Group Designed by ST Software |