Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Redfive11

help a beginner out here man!

Recommended Posts

So im making this mod that just uses the doom 2 assets, but im doing some ACS scripting for it and im using slade.

 

im trying to make this wad run the script on any map you give it, but if i run the mod on doom2 the script doesnt do anything.

 

Any ideas? heres the code:

Spoiler

#include "zcommon.acs"


script 1 enter // Giving random items script
{

    int loop = True;
    int itemdelay = 600;

    int item = random(1,8);
    giveinventory("Shotgun",1);
    
    while (loop == true)
    {
        item = random(1,7);
        
        if (item == 1)
        {
            giveinventory("Chainsaw",1);
        }
        
        if (item == 2)
        {
            giveinventory("Fist",1);
            giveinventory("Pistol",1);
            giveinventory("clip",25);
        }
        
        if (item == 3)
        {
            giveinventory("Fist",1);
            giveinventory("Shotgun",1);
            giveinventory("Shell",5);
        }
        
        if (item == 4)
        {
            giveinventory("Fist",1);
            giveinventory("SuperShotgun",1);
            giveinventory("Shell",10);
        }
        
        if (item == 5)
        {
            giveinventory("Fist",1);
            giveinventory("Chaingun",1);
            giveinventory("clip",50);
        }
        
        if (item == 6)
        {
            giveinventory("Fist",1);
            giveinventory("RocketLauncher",1);
            giveinventory("RocketAmmo",10);
        }
        if (item == 7)
        {
            giveinventory("Fist",1);
            giveinventory("Plasmarifle",1);
            giveinventory("Cell",50);
        }
        if (item == 8)
        {
            giveinventory("Fist",1);
            giveinventory("BFG9000",1);
            giveinventory("Cell",120);
        }
        
        delay(itemdelay);
        clearinventory();
    }
}

 

Share this post


Link to post
2 minutes ago, Redfive11 said:

So im making this mod that just uses the doom 2 assets, but im doing some ACS scripting for it and im using slade.

 

im trying to make this wad run the script on any map you give it, but if i run the mod on doom2 the script doesnt do anything.

 

Any ideas? heres the code:

  Reveal hidden contents

#include "zcommon.acs"


script 1 enter // Giving random items script
{

    int loop = True;
    int itemdelay = 600;

    int item = random(1,8);
    giveinventory("Shotgun",1);
    
    while (loop == true)
    {
        item = random(1,7);
        
        if (item == 1)
        {
            giveinventory("Chainsaw",1);
        }
        
        if (item == 2)
        {
            giveinventory("Fist",1);
            giveinventory("Pistol",1);
            giveinventory("clip",25);
        }
        
        if (item == 3)
        {
            giveinventory("Fist",1);
            giveinventory("Shotgun",1);
            giveinventory("Shell",5);
        }
        
        if (item == 4)
        {
            giveinventory("Fist",1);
            giveinventory("SuperShotgun",1);
            giveinventory("Shell",10);
        }
        
        if (item == 5)
        {
            giveinventory("Fist",1);
            giveinventory("Chaingun",1);
            giveinventory("clip",50);
        }
        
        if (item == 6)
        {
            giveinventory("Fist",1);
            giveinventory("RocketLauncher",1);
            giveinventory("RocketAmmo",10);
        }
        if (item == 7)
        {
            giveinventory("Fist",1);
            giveinventory("Plasmarifle",1);
            giveinventory("Cell",50);
        }
        if (item == 8)
        {
            giveinventory("Fist",1);
            giveinventory("BFG9000",1);
            giveinventory("Cell",120);
        }
        
        delay(itemdelay);
        clearinventory();
    }
}

 

 

As far as I know you can't script in Doom 2. Not sure if this can be got around. I use DB2 and when selecting Doom 2 as the game type, the ACS scripting button is removed from the menu.

Share this post


Link to post
7 minutes ago, alowe said:

 

As far as I know you can't script in Doom 2. Not sure if this can be got around. I use DB2 and when selecting Doom 2 as the game type, the ACS scripting button is removed from the menu.

i meant running doom2 via gzdoom

Share this post


Link to post
Just now, alowe said:

 

As far as I know you can't script in Doom 2. Not sure if this can be got around. I use DB2 and when selecting Doom 2 as the game type, the ACS scripting button is removed from the menu.

Depends on format. Zdoom family oriented mapping formats allows you use scripts - like hexen or udmf. And if op uses udmf or zdoom in hexen, he can freely use scripts without relying on outside lumps. Oh and I wouldn't use DB2, because it didn't have updates for like 6-7 years.  Gzdoom builder bugfix or Doom builder x is all the way now. 

Share this post


Link to post
2 minutes ago, Misty said:

Depends on format. Zdoom family oriented mapping formats allows you use scripts - like hexen or udmf. And if op uses udmf or zdoom in hexen, he can freely use scripts without relying on outside lumps. Oh and I wouldn't use DB2, because it didn't have updates for like 6-7 years.  Gzdoom builder bugfix or Doom builder x is all the way now. 

Lol, I know, people been telling me not to use DB2 for years, but it is my adopted lovechild :D

 

So, if I wanted to script in Doom 2, do I select a different game configuration, like Hexen, then select Doom2.WAD as the resource?

Share this post


Link to post
2 minutes ago, alowe said:

Lol, I know, people been telling me not to use DB2 for years, but it is my adopted lovechild :D

 

So, if I wanted to script in Doom 2, do I select a different game configuration, like Hexen, then select Doom2.WAD as the resource?

I mean you choose zdoom - doom in hexen or udmf. 

Most db2 stuff is ported in dbx, with same interface. 

Share this post


Link to post
2 minutes ago, LocalDuck said:

Maybe I'm not looking correctly, but could it also be you're not defining when the loop should end?

the loop isnt supposed to end, but even if i made it so on death loop was false it wouldnt matter anyway

 

4 minutes ago, alowe said:

Lol, I know, people been telling me not to use DB2 for years, but it is my adopted lovechild :D

 

So, if I wanted to script in Doom 2, do I select a different game configuration, like Hexen, then select Doom2.WAD as the resource?

this is a good idea , but if you make it a resource it doesnt put the maps in the game, only assets

Share this post


Link to post
1 minute ago, Misty said:

I mean you choose zdoom - doom in hexen or udmf. 

Most db2 stuff is ported in dbx, with same interface. 

Sigh, I suppose I should give it a try. There really is no excuse...

Share this post


Link to post

Did you remember to add the library to LOADACS? Without it, the script will never run, on any map, unless called to run manually.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×