New to scripting

General help and assistance forum.
Post Reply
felgekarp
New User
Posts: 2
Joined: Mon Nov 16, 2020 10:07 pm

New to scripting

#1

Post by felgekarp » Mon Nov 16, 2020 10:18 pm

Apologies for posting what has probably been gone over multiple times but if anyone could point me in the right direction I’d be very gratefull, I’m trying to create a script that I can launch with Zandronum so when players start they have a bunch of weapons instead of starting with the basic pistol, at the moment I’m trying to do this for freedoom, I’ve gone here

https://zdoom.org/wiki/CheckActorInventory

and had a go at compiling this using the bcc compiler from here

https://zandronum.com/forum/viewtopic.php?t=4864

But now I’m stuck, assuming that what I’ve done would work how do I launch my game using the compiled file or am I barking up the wrong tree here?

Thanks.

User avatar
UnTrustable
Forum Regular
Posts: 250
Joined: Sun Jun 10, 2012 9:04 pm

Re: New to scripting

#2

Post by UnTrustable » Fri Dec 04, 2020 10:17 am

Spoiler: (Open)
#Include "zcommon.acs"

Int Wave = 0;

Script 1 RESPAWN
{
Acs_Execute (3, 0, 0, 0, 0);
Delay(1);
}

Script 2 ENTER
{
Acs_Execute (3, 0, 0, 0, 0);
Delay(1);
}

Script 3 (void) // Strips the player from its Doom weapons, and give them the weapons and ammo depending on de Wave number.
{

Wave = 3; // play around the 'Wave' variable


TakeInventory("Chainsaw", 1);
//TakeInventory("Fist", 1);
TakeInventory("Pistol", 1);
TakeInventory("Shotgun", 1);
TakeInventory("SuperShotgun", 1);
TakeInventory("Chaingun", 1);
TakeInventory("Minigun", 1);
TakeInventory("RocketLauncher", 1);
TakeInventory("GrenadeLauncher", 1);
TakeInventory("PlasmaRifle", 1);
TakeInventory("RailGun", 1);
TakeInventory("BFG9000", 1);
TakeInventory("BFG10K", 1);

If (GetActorProperty (0, APROP_HEALTH) <= 99)
{
SetActorProperty(0, APROP_Health, 100);
}

Delay(1);
If (Wave == 1)
{
GiveInventory("Chainsaw", 1);
GiveInventory("Pistol", 1);
GiveInventory("clip", 20);
}
If (Wave == 2)
{
GiveInventory("Shotgun", 1);
GiveInventory("chaingun", 1);
GiveInventory("Shell", 40);
GiveInventory("clip", 50);
}
If (Wave == 3)
{
GiveInventory("RocketLauncher", 1);
GiveInventory("PlasmaRifle", 1);
GiveInventory("BFG9000", 1);
GiveInventory("RocketAmmo", 50);
GiveInventory("Cell", 300);
}
If (Wave == 4)
{
GiveInventory("BackPack", 1);
GiveInventory("Shotgun", 1);
GiveInventory("chaingun", 1);
GiveInventory("Shell", 100);
GiveInventory("clip", 250);
GiveInventory("RocketLauncher", 1);
GiveInventory("PlasmaRifle", 1);
GiveInventory("BFG9000", 1);
GiveInventory("RocketAmmo", 50);
GiveInventory("Cell", 300);
}
GiveInventory("Fist", 1);
Delay(1);
}
I use DoomBuilder. It has a build in ACS complier, depending in what engine you code and map.
Zandronum in Hexen format?

felgekarp
New User
Posts: 2
Joined: Mon Nov 16, 2020 10:07 pm

Re: New to scripting

#3

Post by felgekarp » Wed Dec 23, 2020 6:46 pm

Thankyou, I'll have a look at DoomBuilder and that script. Apologies for the delay in replying as well.

Post Reply