ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Invasion library/map and example.

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Wad Editing
View previous topic :: View next topic  
Author Message
BestOfTheWorst
Spamming!


Joined: 02 Jun 2006

PostPosted: Sun Mar 22, 2009 4:20 pm    Post subject: Invasion library/map and example. Reply with quote

Having had this lying around in my wad folder for sometime now,
I thought I could aswell release it Razz

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. Exclamation


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 Exclamation

  • 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! Razz

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


->Download<- (1.08.07 compatible)

note: this is not a real acs library, eg. its not a extra lump, but one that you use inside the map scripts.

hope someone finds it usefull Wink

also a little credits would be appreciated if you use it :P


Plas Razz


Last edited by BestOfTheWorst on Tue Mar 24, 2009 9:25 am; edited 1 time in total
Back to top
View user's profile Send private message
EarthQuake
Spamming!


Joined: 02 Apr 2004
Location: Athens, Ohio. Dieblieber gonna getcha!

PostPosted: Sun Mar 22, 2009 5:27 pm    Post subject: Reply with quote

I love you.
Back to top
View user's profile Send private message Send e-mail
DoomerMrT
Spamming!


Joined: 09 Mar 2007
Location: http://destiny-server.ath.cx/forums/

PostPosted: Mon Mar 23, 2009 2:37 pm    Post subject: Reply with quote

No thing tags between 3000 and 3500? Ah damn hell, I am always using those tags Razz
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
BestOfTheWorst
Spamming!


Joined: 02 Jun 2006

PostPosted: Tue Mar 24, 2009 9:29 am    Post subject: Reply with quote

Quote:
No thing tags between 3000 and 3500? Ah damn hell, I am always using those tags Razz


really? Razz

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.
Back to top
View user's profile Send private message
Maldito [ABC]
Posting Spree!


Joined: 21 Apr 2004
Location: Hell

PostPosted: Tue Apr 07, 2009 9:08 am    Post subject: Reply with quote

when the script finished i offer to cooperate in build cool maps to ZDaemon Invasion Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
DoomerMrT
Spamming!


Joined: 09 Mar 2007
Location: http://destiny-server.ath.cx/forums/

PostPosted: Tue Apr 07, 2009 2:35 pm    Post subject: Reply with quote

BestOfTheWorst wrote:
Quote:
No thing tags between 3000 and 3500? Ah damn hell, I am always using those tags Razz


really? Razz

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 Razz BTW, nice work on this!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Wad Editing All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group