Spider Mastermind
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Script Help
 
Author
All times are GMT. The time now is 19:42. Post New Thread    Post A Reply
Phendrena
Junior Member


Posts: 181
Registered: 09-12


Hi,

I was wondering if I could pick some brains?
I have setup the following script that is activated when the player enters a sector;

code:
//Monster Spawner script 13 (Void) { while (norepeat < 1) { Floor_MoveToValue (70, 32, 0, 0); int repeat = 1; while (repeat < 10) { Thing_Spawn (73, 4, 250); Thing_Spawn (74, 4, 135); Delay (3*35); ++repeat; norepeat = 1; } } }


I would like to expand upon this script so that it spawns different monsters as the loop gets higher, say up to 50 iterations. It would start by spawning basic zombies then shotgunners and then chaingunners.

What would be the best way for me to expand the above script?

Thanks,

Dave

NOTE: The 'norepeat' variable is there to stop the script from triggering each time the sector is entered and has been declared as a global variable.

Old Post 11-20-12 14:57 #
Phendrena is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Phendrena
Junior Member


Posts: 181
Registered: 09-12


I've decided to scrap doing this with ACS and use a teleporting setup instead.

Dave

Old Post 11-22-12 21:22 #
Phendrena is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Cacowad
Member


Posts: 320
Registered: 07-12


hope i am not too late, if you are going to make it zdoom compatible you can use the spawnspot action: http://zdoom.org/wiki/SpawnSpot

code:
SpawnSpot (str classname, int spottid [, int tid [, int angle]])


instead of "classname" you can set a string array (http://zdoom.org/wiki/Arrays) that contains the various names of the monsters you want to spawn, also you can recall a specific slot of the array with a simple counter.

a script like this could fit (using your acs as base):

code:
int monster1 = 1; int monster2 = 1; int monster3 = 1; //repeat up to how many monsters class you want to spawn at once int norepeat = 1; int repeat = 1; str monsters[ N ] = {"ZombieMan", "ShotgunGuy", "ChaingunGuy", "..." , "MonsterYouWantHereNumberN" }; // N means the number of the slots that the array will have. //Monster Spawner script 13 (Void) { while (norepeat < 1) { Floor_MoveToValue (70, 32, 0, 0); //don't know why you have putted that inside the while, you can move it ouside. repeat = 1; //pretty useless imo. norepeat removed for great justice. while (repeat < 10) { SpawnSpot (monsters[ monster1 ], 73 , 0, 250); SpawnSpot (monsters[ monster2 ], 74 , 0, 135); //insert how many spawnspot you want here... Delay (3*35); ++repeat; if (repeat = 2) { monster1++; monster2++; //etc. } else if (repeat = 3) { monster1++; monster2++; //etc. } else; //etc. etc. etc. modify it as you wish. } if([condition to stop the waves met]) norepeat = 1; else { repeat = 1; monster1 = 1; monster2 = 1; //etc. } } }


i think (hope) i have forgot anything...
hope it helped.

Old Post 11-23-12 17:49 #
Cacowad is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Phendrena
Junior Member


Posts: 181
Registered: 09-12


Wow that's great! I'll have a play with that and see what results I get. A few months ago I would've avoided scripting and just used conveyors and teleporters but I much prefer to use ACS when I can now :D

Thanks,

Dave

Old Post 11-24-12 10:08 #
Phendrena is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
The Monitor
Mini-Member


Posts: 55
Registered: 11-12


Maybe you could refer to Demon Defense, since it uses a script like that, I'm sure. There's a link to it on the "If Doom Was Made Today" thread.

Old Post 11-24-12 21:04 #
The Monitor is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 19:42. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Script Help

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.