kengz/SLM-Lab

View on GitHub
slm_lab/env/vizdoom/cfgs/basic.wad

Summary

Maintainability
Test Coverage
PWAD 
namespace = "zdoom";
thing
{
x = -384.000;
y = 32.000;
type = 1;
id = 1;
skill1 = true;
skill2 = true;
skill3 = true;
skill4 = true;
skill5 = true;
single = true;
dm = true;
coop = true;
skill6 = true;
skill7 = true;
skill8 = true;
class1 = true;
class2 = true;
class3 = true;
class4 = true;
class5 = true;
class6 = true;
class7 = true;
class8 = true;
}

vertex
{
x = -448.000;
y = 256.000;
}

vertex
{
x = 64.000;
y = 256.000;
}

vertex
{
x = 64.000;
y = -192.000;
}

vertex
{
x = -448.000;
y = -192.000;
}

linedef
{
v1 = 0;
v2 = 1;
sidefront = 0;
blocking = true;
}

linedef
{
v1 = 1;
v2 = 2;
sidefront = 1;
blocking = true;
}

linedef
{
v1 = 2;
v2 = 3;
sidefront = 2;
blocking = true;
}

linedef
{
v1 = 3;
v2 = 0;
sidefront = 3;
blocking = true;
}

sidedef
{
sector = 0;
texturemiddle = "BRICK9";
}

sidedef
{
sector = 0;
texturemiddle = "BRICK9";
}

sidedef
{
sector = 0;
texturemiddle = "BRICK9";
}

sidedef
{
sector = 0;
texturemiddle = "BRICK9";
}

sector
{
texturefloor = "FLOOR0_1";
textureceiling = "FLAT4";
heightceiling = 104;
lightlevel = 210;
}

XGLN����������������ACSL������P���OM��OA���74!�j����N�9�����6�����d�����SPTR NFUNC]FNAMspawntargetSTRL,"FistClipCacodemonMINI
�ACSe����#include "zcommon.acs"

int target_id = 10;

global int 0:reward;


script 1 OPEN
{
    SpawnTarget();
    reward = 0;
}
int c =0;
script 2 ENTER
{
    TakeInventory("Fist",1);
    ACS_Execute(3, 1, 0, 0, 0);

}

script 3 (void)
{
    int bullets = CheckInventory("Clip");
    while(true)
    {        
        int t_bullets = CheckInventory("Clip");
        if(t_bullets < bullets)
        {
            reward = reward - 5.0;
        }
        bullets = t_bullets;
    
        delay(1);
    }
}

script 4 (void)
{
    reward = reward + 106.0;
    Exit_Normal(0);

}

function void SpawnTarget(void)
{

    int y = Random(-161.0,224.0);
    Spawn("Cacodemon", 0.0, y,0.0,target_id,128);
    //disables movement
    SetActorProperty(target_id, APROP_Speed, 0);
    //makes it die on one hit
    SetActorProperty(target_id, APROP_Health, 1);
    //makes it ignore the player and attack actor with tid 100
    Thing_Hate (target_id, 100, 6);
    SetThingSpecial(target_id, ACS_ExecuteAlways, 4);
   
}





MAP01%TEXTMAP1HZNODESy�BEHAVIOR�!SCRIPTS
DIALOGUE 
ENDMAP