Posted: Sun Mar 22, 2009 4:20 pm Post subject: Invasion library/map and example.
Having had this lying around in my wad folder for sometime now,
I thought I could aswell release it
Invasion library/map and example.
NOTE: This is not totally ACS-newbie friendly, You may need some more experience on ACS, before you can understand how to use this.
so this is a ACS library that consists of various functions and scripts, that require a part of the map to work. (so just copying the scripts wount give you a working invasion script/library).
This Library allows spawning up to 64 monters at once. (I could raise the limit.. but 64 should keep you busy enough at once)
Monsters are spawned in a way that its guaranteed that the monster will spawn in the arena sooner or later. (as opposed to using Thing_Spawn to spawn something to the arena directly, were it may fail)
There's a bunch of different new functions for you to use in your scripts:
Spawn Functions:
Summon (type, dest) <- spawns a monster of <type> at <dest> (a teleport destination)
SummonNoFog (type, dest) <- same as above but without fog
SummonDelayed (type, dest, wait) <- spawns a monster of <type> at <dest>, after waiting <wait> amount of seconds. (again dest must be teleport destination)
SummonDelayedNoFog (type, dest, wait) <- same as above but without fog
MonsterSpawner (type, dest, interval, amount) <- spawns <amount> monsters of <type> at <dest>, with a delay of <wait> seconds beetween each. (again dest must be teleport destination)
MonsterSpawnerNoFog (type, dest, interval, amount) <- same as above but without fog
ThingSpawner (type, tag, interval) <- spawns things of <type> at mapspots of <tag>, every <interval> seconds, but only if none are left. Use this for pickups
SummonRandomSpot(int type, int dest, int dest2, int dest3, int dest4) <- spawns a monster of <type> at one random dest (dest are teleport destinations)
SummonRandomType(int type, int type2, int type3, int type4, int dest) <- spawns a monster at <dest> of one random type (again dest must be a teleport destination)
SummonRandomBoth(int type, int type2, int type3, int type4, int dest, int dest2, int dest3, int dest4) <- combination of the two above, with a whole 8 arguments!
Wave functions:
WaveInProgress() <- Returns the amount of monsters left in the current wave.
SetWave(number) <- Sets the wave, and displays a message "Prepare for wave <number>, 3, 2, 1, Fight!". (This message takes about 6 seconds, so you might want to delay the script untill it has finished.)
Important:
ClearMonsterInfo() <- This must be run at the beginning of the invasion, before any monsters are summoned/spawned.
note: you must not use any brainstems in your map! (Thing editor number: 81)
Also Thing tags you cant use:
500-600, 650, 1000-2000, 2100, 2101, 3000-3500
And Script numbers that you cant use:
500-506, 600
here's a example invasion script:
Code:
Script 5 (void)
{
ClearMonsterInfo(); //The Invasion Script is started with this, you only need to use it once
SetWave(1); //This is used to show the first wave message
Delay(35*6); //After that a six second delay (to let the message finish)
//Now here goes the script of the wave
//.
//.
Summon(T_DEMON,4);
Summon(T_CACODEMON,5);
MonsterSpawner(T_IMP,7,5,20);
//.
//.
Do Delay(35); While (WaveInProgress()); //And at the end of the wave we have this line
SetWave(2); //And to start the second wave
Delay(35*6); //After that a six second delay (to let the message finish)
//And here would go the script of the second wave, etc.
//.
//.
}
At the beginning of the invasion library scripts, there's a line like this:
Code:
#Define WAVES 4 //Adjust this to how many waves your invasion has.
you can change the 4 to another number, to adjust how many waves the invasion will have
No thing tags between 3000 and 3500? Ah damn hell, I am always using those tags
really?
then just edit these two lines in the library :p
Code:
#Define TS_FTAG 3000
#Define TS_LTAG 3500
they make a range for the thing spawner, so TS_FTAG should be smaller than TS_LTAG.. and the range should not go over any of the already used thing tags / thing tag ranges.
Joined: 09 Mar 2007 Location: http://destiny-server.ath.cx/forums/
Posted: Tue Apr 07, 2009 2:35 pm Post subject:
BestOfTheWorst wrote:
Quote:
No thing tags between 3000 and 3500? Ah damn hell, I am always using those tags
really?
then just edit these two lines in the library :p
Code:
#Define TS_FTAG 3000
#Define TS_LTAG 3500
they make a range for the thing spawner, so TS_FTAG should be smaller than TS_LTAG.. and the range should not go over any of the already used thing tags / thing tag ranges.
In fact I wanted to say I hardly ever use those tags BTW, nice work on this!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum