"flashlighton" is a dummy item given to player's inventory when he switches the flashlight on (duh). So theoretically, the script should take cells with pauses of 7 seconds when the player both has the flashlighton item and at least one "ammocell" which is the brutal doom's counterpart of "cell". ELSE, the flashlight should stay off. Except nothing is working.
2) This is one of my first scripts, it takes a random selection of ammo and weapons when entering a map. I wanted it to do so only for a specific playerclass:
Spoiler
#library "WEAPONTAKERACS"
#include "zcommon.acs"
script "WEAPONTAKER" ENTER
{
str class = "WeaponTaker";
if (Checkclass("MiseryDoomer"))
{
delay(1);
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
spawn(class,x,y,z,0,0);
delay(1);
}
}
Instead, it works perfectly... but for every playerclass. Condition ignored. Why?
3) I'm trying to create a script activated by some monster's melee attacks. These should give a bleeding effect IF the player is not wearing adequate armor, with a damage absorb of at least 40%
Spoiler
Script "RUPTURE" (void) //Open wound inflicted by monsters
{
int armorsave = GetArmorInfo(ARMORINFO_SAVEPERCENT);
int i;
I created a custominventory item to give the status to me when used. And, you guessed it... The bleeding effect is given to me, no matter what kind of armor I'm wearing.
I cannot, for all that is sacred, understand why IF conditions and whatnot hate me so much.
1) This is a script I made to mod Brutal Doom's flashlight so it should drain energy cells while it's on:
#library "FLASHLIGHTDRAIN"
#include "zcommon.acs"
script "FLASHLIGHTBATTERY" ENTER
{
if (CheckInventory("FlashlightOn") && CheckInventory("Ammocell") >= 1)
{
Delay(35*7);
Takeinventory("Ammocell",1);
}
else
{
Takeinventory("FlashlightOn",1);
}
delay(1);
}
"flashlighton" is a dummy item given to player's inventory when he switches the flashlight on (duh). So theoretically, the script should take cells with pauses of 7 seconds when the player both has the flashlighton item and at least one "ammocell" which is the brutal doom's counterpart of "cell". ELSE, the flashlight should stay off. Except nothing is working.
2) This is one of my first scripts, it takes a random selection of ammo and weapons when entering a map. I wanted it to do so only for a specific playerclass:
#library "WEAPONTAKERACS"
#include "zcommon.acs"
script "WEAPONTAKER" ENTER
{
str class = "WeaponTaker";
if (Checkclass("MiseryDoomer"))
{
delay(1);
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
spawn(class,x,y,z,0,0);
delay(1);
}
}
Instead, it works perfectly... but for every playerclass. Condition ignored. Why?
3) I'm trying to create a script activated by some monster's melee attacks. These should give a bleeding effect IF the player is not wearing adequate armor, with a damage absorb of at least 40%
Script "RUPTURE" (void) //Open wound inflicted by monsters
{
int armorsave = GetArmorInfo(ARMORINFO_SAVEPERCENT);
int i;
If (armorsave < 39.0)
{
for (i=0;i<10;i++)
{
SetActivatorToTarget(0);
Thing_Damage2(0,1,"poisonDAMAGE");
SetHudSize(640, 480, true);
setfont("SCRATCH");
HudMessage(s:"A"; HUDMSG_FADEINOUT, 202, CR_UNTRANSLATED, 320.0, 240.0,10.0);
delay(35*3);
}
}
}
I created a custominventory item to give the status to me when used. And, you guessed it... The bleeding effect is given to me, no matter what kind of armor I'm wearing.
ACS, WHY WON'T YOU LOVE ME?
Share this post
Link to post