UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - BluntStuffy

I already had a tutorial for this on ZM for about 2 weeks, and some people might have seen it in the "Christmas with the Joker" map by WhippyTrout ( wich was also on NGT btw! and is a very cool and very custom map!). In that version the site's remained empty after searched. I updated that tutorial and added random respawning, so i decided i'd post it here as well.. Anyways, cut the BS. here's the tut:

Link to Don Goony's Hacker function (great script that can be used for all sort's of stuff!)
http://www.zombiemodding.com/index.php?topic=11047.msg120511#msg120511

http://www.youtube.com/watch?v=FNNDTGUlv58#ws]http://www.youtube.com/watch?v=FNNDTGUlv58#ws]http://www.youtube.com/watch?v=FNNDTGUlv58#ws

Download the files at the end of this post
(contains the script, the dollar sign model & materials and the files for the walther-pistol + upgraded one) offcourse, you dont have to use the walther if you dont want to...


1-First download the files and extract them.
Copy the contents of the "copy to raw folder" into your \game_root\raw\ folder,
and copy the contents of the
"copy to mods mapname folder" into the \game_root\mods\name-of-the-map-to-install-to\ (example: nazi_zombie_factory ).
These files also contain the files for the walther pistol, and an upgraded version. It doesn't contain any fx or sounds since this tut is using stock fx and sounds so you should be fine if you havent messed with those.


NOTE: the weapons i included in the crates are stock WaW weapons, if you're using UGX-MOD open up _dig_site.gsc AFTER completing this tutorial, search for the gun_reward() function and change the weapons to UGX weapons!!!!!

2-Open your mapname.gsc file (you can find it in \raw\maps\), copy it into your mods\mapname\maps\ folder.
--->if your using UGX-MOD it's already in your mods/mapname folder<----
Open it and find the line:


Code Snippet
Plaintext
maps\_zombiemode::main();

         
above this line you add:

Code Snippet
Plaintext
maps\_dig_site::PreCache_dig_site();
         
 and below this line you add:

Code Snippet
Plaintext
thread maps\_dig_site::main();

An example of how it should look (your mapname.gsc might look diffent, so don't copy this code!)

example BEFORE:
   

Code Snippet
Plaintext
/*--------------------
     ZOMBIE MODE
    ----------------------*/
    [[level.DLC3.weapons]]();
    [[level.DLC3.powerUps]]();
    maps\_zombiemode::main();
   
    /*--------------------
     FUNCTION CALLS - POST _Load
    ----------------------*/
    level.zone_manager_init_func = ::dlc3_zone_init;
    level thread DLC3_threadCalls2();
   
example AFTER EDITING:
   

Code Snippet
Plaintext
/*--------------------
     ZOMBIE MODE
    ----------------------*/
    [[level.DLC3.weapons]]();
    [[level.DLC3.powerUps]]();
    maps\_dig_site::PreCache_dig_site();  ---line you added
    maps\_zombiemode::main();

    thread maps\_dig_site::main();  --- line you added
   
    /*--------------------
     FUNCTION CALLS - POST _Load
    ----------------------*/
    level.zone_manager_init_func = ::dlc3_zone_init;
    level thread DLC3_threadCalls2();

NOTE: I included the walther pistol and an upgraded version in this download because i felt there had to be more crappy pistol's inside the crate's.. You obviously don't need to use it if you don't want to, in that case you can continue with step 7. Keep in mind when   you skip step 3-6 entirely the script is NOT ready for use and you need to go inside _dig_site.gsc after completing this tut, and change the rewards that spawn for the gun-crate's so the walther doesn't show up anymore... I left note's in the _dig_site.gsc file on where to make any changes so that shouldn't be to hard at all.


3a- ONLY FOR NON UGX-MOD USERS (if you're using ugx-mod follow step 3b and ignore this one) :
next open up dlc3_code.gsc (copy from raw\maps\ to your mods\mapname\maps folder ) and find the part that says
'include_weapon( "zombie_colt" );' etc. etc. right below all these include_weapon lines add these:

Code Snippet
Plaintext
include_weapon( "blst_walther",false );	// remove the ',false' in this line if you want the walther to appear in the box
include_weapon( "blst_walther_upgraded",false ); // leave this

3b- FOR UGX-MOD USERS: open up ugx_mod.iwd (with winRAR) open the maps folder, and edit _zombiemode_weapons.gsc in there (make a backup!!!). 


find all the line's that say:
 
Code Snippet
Plaintext
 include_zombie_weapon_ugx

and below these line's add these two:
Change the first "false" entry IN THE FIRST LINE ONLY to "true" if you want the walther to appear in the random-box
Code Snippet
Plaintext
	include_zombie_weapon_ugx("blst_walther", 					"Walther", 					800, 	false, 	undefined, 			400,  		undefined, 		undefined, 	false);
include_zombie_weapon_ugx("blst_walther_upgraded", "Walther 2.0", 800, false, undefined, 4500,  undefined, undefined, false);


Save and close. When closing the file you'll be asked if you want to update the archive, CLICK YES!



4-FOR NON UGX-MOD users (if you're using ugx-mod skip this step and go to step 6 ):
   open up _zombiemode_weapons (copy from raw\maps\ to your mods\mapname\maps folder)
   
-next find the part that says 'add_zombie_weapon( "zombie_colt" .....' and where it add's all the weapons. Now pay attention here!

-if you DON'T want to add the wather as a BUYABLE WALL weapon follow option AAA (save's you a hintstring, because the limit for those seems kind of low..)

-if you DO want to make the Walther a buyable wall weapon follow option BBB.

---I intended the walther NOT to be a buyable weapon, so only way to get the gun/ammo is by power_ups or dig_site's that why i made it a bit more powerfull than for example the colt. It would be a 'rare' weapon and you would be pretty insane to PaP it. That's also why it does have a little kick to it.---

OPTION AAA - Add these lines somewhere in between the other weapon lines
   
Code Snippet
Plaintext
add_zombie_weapon( "blst_walther", 						&"ZOMBIE_WEAPON_RAYGUN_10000", 	10000,	"vox_raygun",	6 );
    add_zombie_weapon( "blst_walther_upgraded", &"ZOMBIE_WEAPON_RAYGUN_10000", 10000, "vox_raygun", 6 );

--PROCEED TO STEP 6!--

OPTION BBB- Add these lines somewhere in between the other weapon lines

Code Snippet
Plaintext
add_zombie_weapon( "blst_walther", 						&"ZOMBIE_WEAPON_WALTHER_800", 	800,	"vox_raygun",	6 );
    add_zombie_weapon( "blst_walther_upgraded", &"ZOMBIE_WEAPON_WALTHER_800", 800, "vox_raygun", 6 );

--PROCEED TO STEP 5!-- (note: the walther will cost 800, you can change this by changing EVERY 800 entry in this step AND IN STEP 5 as wel!!


5-go to "game_root\raw\english\localizedstrings\" and find the file "zombie.str". For this to work you can't copy the file to your mods\ folder (as far as i know) so edit it right where it is, but make a backup first! Open the "zombie.str" file and go to the bottom and add these line's:


Code Snippet
Plaintext
REFERENCE           WEAPON_WALTHER_800
LANG_ENGLISH        "Press & hold &&1 to buy Walther pistol [Cost: 800]"

6-The upgraded walther is the Walther P382.0 (i suck at making up names, i'm sorry) and it has "double tap 2.0". Meaning in this case:
when you fire the gun you see the impact of 2 rounds, while it's a single shot. Also when you shoot a zombie once you get 2x 10 points.
To make these changes

FOR NON UGX-MOD users:  first open up _zombiemode_spawner.gsc
               (copy from raw\maps\ to your mods\mapname\maps folder before editing!)


FOR UGX-MOD users: open up ugx_mod.iwd and go to the maps folders, open _zombiemode_spawner.gsc from there,
When done and closing the file you'll be asked if you want to update the archive, CLICK YES!



--find the function 'zombie_damage()' and scroll down a bit in this function till you see



Code Snippet
Plaintext
if( !IsDefined( player ) )
{
    return;
}

right under that, add these lines:
   

Code Snippet
Plaintext
weapon = player getcurrentweapon();
if( isdefined("blst_walther_upgraded") && weapon == "blst_walther_upgraded" )
{
player maps\_zombiemode_score::player_add_points( "damage_walther", mod, hit_location, self enemy_is_dog() );
}

next, scroll down some more till you see the function 'zombie_damage_ads()' and again right under



Code Snippet
Plaintext
if( !IsDefined( player ) )
{
    return;
}


add these lines:
 
Code Snippet
Plaintext
weapon = player getcurrentweapon();
if( isdefined("blst_walther_upgraded") && weapon == "blst_walther_upgraded" )
{
player maps\_zombiemode_score::player_add_points( "damage_ads_walther", mod, hit_location, self enemy_is_dog() );
}

Save and close.


FOR NON UGX-MOD users..
Find _zombiemode_score (copy from raw\maps\ to your mods\mapname\maps folder )


FOR UGX-MOD users: open ugx_mod.iwd (with winRAR, make a backup!!) and edit _zombiemode_score in there,
When done and closing the file you'll be asked if you want to update the archive, CLICK YES!


Next open up and you should be looking at the first function 'player_add_points' (if not, find this function) scroll down a bit till you
see the 'switch( event )' and, some lines below that, the case declarations ( "case_death" , "case_damage" etc).
Now add these 2 set's of lines right above the line that says 'default:' So to make sure:
add both of these in between the lines 'break;' and 'default:'   
     
Code Snippet
Plaintext
case "damage_walther":
            points = level.zombie_vars["zombie_score_damage"];
            points = level.zombie_vars["zombie_score_damage"];
            break;
     

Code Snippet
Plaintext
case "damage_ads_walther":
            points = level.zombie_vars["zombie_score_damage"];
            points = level.zombie_vars["zombie_score_damage"];
            break;

save and close. That's it for the Walther!

7-go to your \game_root\zone_source\ folder and find yourmapname.csv Leave it where it is, so make a backup before editing.
Open it and at the end add the following:

If you included the walther take the code from option A,
if you decided NOT to include the walther follow option B.

   --OPTION A--

Code Snippet
Plaintext
// BluntStuffy's Dig Site's
rawfile,maps/_dig_site.gsc
material,blst_hud_icon_saw
xmodel,blst_mdl_ammo_refill
xmodel,blst_mdl_blood_money
xmodel,blst_mdl_blood_money_minus
xmodel,viewmodel_bbetty_mine
xmodel,clutter_berlin_crate_01
xmodel,global_flammable_crate_piece01_d
xmodel,static_seelow_saw
weapon,sp/blst_walther
weapon,sp/blst_walther_upgraded
xmodel,viewmodel_ger_walther_pistol
xmodel,weapon_ger_walther_pistol
xmodel,viewmodel_blst_walther_upgraded
xmodel,weapon_blst_walther_upgraded

fx,weapon/bouncing_betty/fx_explosion_betty_generic
fx,weapon/bouncing_betty/fx_b_betty_glint
fx,weapon/bouncing_betty/fx_betty_trail


   --OPTION B--
Code Snippet
Plaintext
// BluntStuffy's Dig Site's
rawfile,maps/_dig_site.gsc
material,blst_hud_icon_saw
xmodel,blst_mdl_ammo_refill
xmodel,blst_mdl_blood_money
xmodel,blst_mdl_blood_money_minus
xmodel,viewmodel_bbetty_mine
xmodel,clutter_berlin_crate_01
xmodel,global_flammable_crate_piece01_d
xmodel,static_seelow_saw

fx,weapon/bouncing_betty/fx_explosion_betty_generic
fx,weapon/bouncing_betty/fx_b_betty_glint
fx,weapon/bouncing_betty/fx_betty_trail


NOTE: i put in the FX files for the bouncing_betty because i had previously deleted those from my dl3c.csv to avoid FX-limit error's. If you havent messed with any of the stock FX you could probably delete those last three line's saying: 'fx,weapon/bouncing_betty/...'
NOTE2: If you're using UGX-mod you might need to add the FX for the der_riese style powerup-drop to appear correct!!!

That should be the scripting part, if you go to your \mods\mapname\maps\ folder and open up _dig_site.gsc you can edit pretty much anything. From point amounts that drop, to drop rates. change the weapons that drop etc. I left side note's in the script on what to edit where.

The Radiant part:

There are 4 different triggers working in this script, for all 4 goes the same: make the trigger a square box of 40x40x40 units and place it on the ground otherwise the models won't spawn in correct.
All models (crate's and saw's use a randomized angle and wil just appear flat on the ground (or table or whatever).
You don't need to place actual models, they spawn in through script. For all triggers make a 'trigger_use'.


-first one:
Where the player can pick up a saw.
A player can only carry 1 saw so no need to add more than 4, there is no limit however.
assign these KVP's :


Code Snippet
Plaintext
"targetname" - "saw_trigger"


-second one:
a normal crate that spawns random points, or an ammo refill for the player that finds it for the weapon he's holding, or a armed bouncing betty. There is no limit on how many you place..
assign these KVP's:


Code Snippet
Plaintext
 "targetname" - "dig_site"

-third one:
a special crate that spawn's a random powerup or a armed bouncing betty. Again no limit on how many you use.
assign these KVP's:   


Code Snippet
Plaintext
"targetname" - "dig_site"
"script_noteworthy" - "special"

-last one: a weapon crate that spawn's a 'random' weapon (see vid). Again no limit on how many you use.
assign these KVP's:   

Code Snippet
Plaintext
"targetname" - "dig_site"
"script_noteworthy" - "weapon"

At the beginning of a new round an empty crate has about 15% chance of respawning. If it does, it'll ignore the original
script-noteworthy you gave it and spawns in random as either a special crate (10%) - weapon crate (5%) or a points crate (85%). At round 1 all crate's you placed will spawn in, and they will 'obey' the script-noteworthy you gave them.

That's all, remember to select all new files in the MOD-Builder when compiling!

CREDITS: Don Goony (hacker function implemented in this script), YaPhil (providing a fix for doing damage to the players) and BluntStuffy (that's me ;) :CREDITS

If you implement this in your map, please give credit. Thanks! And if you'd send me a link or message when your map is released that would be great to!



I think i got pretty much everything covered, if you feel like i forgot something, or if you're having troubles with the files or the script. Let me know below
10 years ago
@BluntStuffy
There is no difference in semantics and performance should be equal too.
It kinda comes down to personal preference, although the explicit comparison of boolean variables with a boolean literal is considered unneccessary often. For example, the checkstyle tool, which does automated coding convention checks on Java code has an option to issue a warning if such explicit comparisons are used.

- Phil.

Thanks for taking the time to explain, appreciate it!
and sorry for going a bit offtopic here, deadra!
10 years ago
i'm really NOT trying to be a smartass here, and i hope you don't mind i'm replying again. I'm just REALLY curious,
Doesn't this:

Code Snippet
Plaintext
if( !players[i] HasWeapon( "zombie_colt" ) )

have the exact same outcome as this:

Code Snippet
Plaintext
if( players[i] HasWeapon( "zombie_colt" ) == false)

why would you want to use the first over the last, is there any practical difference at all? (it's less typing i guess)
I know that line isn't the issue anymore, like i said i'm just really curious
10 years ago
Dude, you didn't waste my time! NP.
Not like i know all the correct terms and shit..

And i think it could certainly work, like i said use a 'fake weapon' file to make the animation happen.
perhaps there are other ways, i dunno..

10 years ago
 :( ooops, srry daedra. Always best to wait for YaPhil i guess. my bad...
10 years ago
Try this:

Code Snippet
Plaintext
if( players[i] HasWeapon( "zombie_colt" ) == false)



Code Snippet
Plaintext
if( !players[i] HasWeapon( "zombie_colt" ) )
this one doesn't look right to me... Think the ! is in the wrong position.. not sure..
10 years ago
As far as i know the only way to make the hands do an animation is through the weapons files. So you'll probably need to create a weaponfile that uses your animation as an idle or raise animation. Then you can create a trigger in radiant and make that give the "weapon" to the player trough the script (so it plays the hands animation) and when the animation is done you take the "weapon" and give his orginal gun back.
You can forget about my first post then, that's to call animations on models (like a forklift moving and lifting stuff or something like that)..

Either way it might be usefull just to look for those tut's on youtube and have a look, i'm sure it'll clear up a lot of questions.

this may sound like a cheap way of making the animation appear, but they actually did the perk drinking animations the same way. If you look in the sp/weapons folder you'll find the 'zombie_perk_bottle_jugg' file. and one for every other perk. You're looking for something similar, so you might be able to use that as a reference..
10 years ago
but I just relized that the viewhands actually is a model

Uh, ok. so you want the hands to do something after a trigger. Then i think you need to make a "weapon" animation
without actually holding a weapon. and then have the trigger give that weapon to the player and it plays the raise animation. like they did with the drinking of the perks i believe.
If i'm still not on the right page.. Just tell WHAT you want to happen, like:

"i want the hands to clap"

I'm starting to feel stupid here, lol  :o

sorry okey it is a viewhand animation,
----------------------------------------------------------------------
I want the viewmodel animation I have to be played after you have activated a trigger in my map.

So do you want the actual viewhands, or the viewmodel (wich is a gun model) to be animated? I'm confused  :o :o
10 years ago
Not sure what you mean with animation, but an animation in CoD only tells the game wich bones to move where. So the animation you have must be a model with bones that is animated. If you have that, then you can export the model, animated model, and the animation from the same file. If you maya that is.. might be other ways, this is the one i know. But again, not sure what you mean with animation. Do you have like a movie you want to play ingame, or a moving model or something else? Not sure if we're on the same page  :-\
10 years ago
You need to call an animation on a model. And yes you need to convert them using AssetManager.

First you need an .xanim-export file and convert that with AssMan.
if you use a custom model also convert that + its animated model
make sure the model has a correct animtree (else create one)
you call the animation through a script:

You'll need to call the animtree and _anim at the top of the script

Code Snippet
Plaintext
#include maps\_anim;
#using_animtree( "animtree" );

then define the animation:

Code Snippet
Plaintext
	level.scr_anim[ "anim-name" ][ "name of the converted animation" ] = %reference you make up;

example

level.scr_anim[ "blst_chest_anim" ][ "blst_soul_chest_open" ] = %blst_soul_chest_open;


next you set the anim-name for the model

Code Snippet
Plaintext
blabla = getent( "animated_spoon" , "targetname" );
blabla.animname = anim-name (blst_chest_anim in my example)


then define the animtree it uses:


Code Snippet
Plaintext
blabla UseAnimTree(#animtree);

after that u can use

Code Snippet
Plaintext
blabla SetAnim( %reference you made up in step 1 )

blabla SetAnimRestart( %reference you made up in step 1 )

blabla ClearAnim( %reference you made up in step 1 )


to call the animation('s).

Quite some work, i don't really know what you mean by 'i've got an animation' but it needs to be in .XANIM-EXPORT format, or already converted for use in CoD (then it has no file extension). And you'll obviously also need a model that goes with the animation and preforms it, and an animated model of that same model. You could look on youtube and search for gun-animation tutorials. That works the same way (creating and converting the anim's etc), only with a model you need to make it work with a script...
10 years ago
I'd be willing to modify the soul chest script so you could use that. if you're interested send me a pm with what exactly your looking for and i'll take a look tomorrow..
10 years ago
Sweet! The first map i've seen with my "dig-sites" in it. Looking pretty awesome with all the custom models and texture's and stuff! Also watched the first episode on NGT, looked like they were pretty impressed! Awesome map! Merry Christmas   :)!
10 years ago
http://www.youtube.com/watch?v=mKPBYWpEIzk#ws

1-First download the file from the end of this post and extract it.
Copy the contents of the "copy to raw folder" into your \game_root\raw\ folder,
and copy the contents of the "copy to mods mapname folder" into the \game_root\mods\name-of-the-map-to-install-to\
(example: nazi_zombie_factory ).
The download contains the models, animations and animtree for the chest, soundalias files. The FX files and the script ofcourse. Choose one:

2-Open your mapname.gsc file (you can find it in \raw\maps\), copy it into your mods\mapname\maps\ folder.
--->if your using UGX-MOD it's already in your mods/mapname folder<-----
Open it and find the line:

Code Snippet
Plaintext
maps\_zombiemode::main();

above this line you add:

Code Snippet
Plaintext
maps\_soul_chest::PreCache_soul_chest();

and below this line you add:

Code Snippet
Plaintext
thread maps\_soul_chest::main();

An example of how it should look (your mapname.gsc might look diffent, so don't copy this code!)

example before:

Code Snippet
Plaintext
    /*--------------------
     ZOMBIE MODE
    ----------------------*/
    [[level.DLC3.weapons]]();
    [[level.DLC3.powerUps]]();
    maps\_zombiemode::main();
   
    /*--------------------
     FUNCTION CALLS - POST _Load
    ----------------------*/
    level.zone_manager_init_func = ::dlc3_zone_init;
    level thread DLC3_threadCalls2();


example after:

Code Snippet
Plaintext
    /*--------------------
     ZOMBIE MODE
    ----------------------*/
    [[level.DLC3.weapons]]();
    [[level.DLC3.powerUps]]();
    maps\_soul_chest::PreCache_soul_chest();
    maps\_zombiemode::main();

    thread maps\_soul_chest::main();
   
    /*--------------------
     FUNCTION CALLS - POST _Load
    ----------------------*/
    level.zone_manager_init_func = ::dlc3_zone_init;
    level thread DLC3_threadCalls2();



3a. FOR NON UGX-MOD users: if you're using UGX-mod got to step 3b and ignore this one!!
Open (first copy to mods folder from raw/maps and/or make a backup!) your _zombiemode_spawner and find the line:

Code Snippet
Plaintext
self.flame_damage_time = 0;

right below that line, add these:

Code Snippet
Plaintext
if( level.chest_active == true )
    {
    self thread death_watch();
    }

   

next go all the way to the end of the file and add this:

Code Snippet
Plaintext
death_watch()
{
    self waittill( "death" );
    last_origin = self.origin;
    area_radius = undefined;
    soul_chest_area = getentarray( "soul_chest_area" , "targetname") ;
   
    for(i=0;i<soul_chest_area.size;i++)
    {
    area_radius = soul_chest_area[i].radius;

        if( self IsTouching( soul_chest_area[i] ) )
        {
         soul_chest_area[i] thread maps\_soul_chest::chest_death_count( last_origin, area_radius );
         break;
         }

        else
        {
        }
    wait 0.05;
    }
}


save and close the file.


3B. FOR UGX-MOD users!!:
Open ugx_mod.iwd (with winRAR) go into the maps folder and find your _zombiemode_spawner.gsc (make a backup!!!)
Open it, and find the line:

Code Snippet
Plaintext
self maps\ugxm_powerups::decide_powerup();

right below that line, add these:
Code Snippet
Plaintext

if( level.chest_active == true )
    {
    self thread death_watch();
    }

next go all the way to the end of the file and add this:

Code Snippet
Plaintext
death_watch()
{
    self waittill( "death" );
    last_origin = self.origin;
    area_radius = undefined;
    soul_chest_area = getentarray( "soul_chest_area" , "targetname") ;
   
    for(i=0;i<soul_chest_area.size;i++)
    {
    area_radius = soul_chest_area[i].radius;

        if( self IsTouching( soul_chest_area[i] ) )
        {
         soul_chest_area[i] thread maps\_soul_chest::chest_death_count( last_origin, area_radius );
         break;
         }

        else
        {
        }
    wait 0.05;
    }
}


save and close the file. winRAR will ask you iff you want to update the archive, click yes for your changes to have effect!


4.-go to your \game_root\zone_source\ folder and find yourmapname.csv Leave it where it is, so make a backup before editing. Open it and at the end add the following:


Code Snippet
Plaintext
//BluntStuffy's Soul Chest's
rawfile,maps/_soul_chest.gsc
rawfile,animtrees/blst_soul_chest.atr
sound,blst_soul_chest_1,,all_sp
sound,blst_soul_chest_2,,all_sp
fx,blst_custom/blst_fx_chest_soul
fx,blst_custom/blst_fx_chest_idle
xmodel,blst_soul_chest
xmodel,blst_soul_chest_active
xanim,blst_soul_chest_open
xanim,blst_soul_chest_close_notfull
xanim,blst_soul_chest_close_full
xanim,blst_soul_chest_idle01
xanim,blst_soul_chest_idle02
xanim,blst_soul_chest_idle03
xanim,blst_soul_chest_idle04
xanim,blst_soul_chest_idle05
xanim,blst_soul_chest_idle06

That should be the scripting part. In radiant open your map. First we'll make the chest locations:

-create a trigger_radius and give that the KVP's:

Code Snippet
Plaintext
targetname - soul_chest_area

Click the spawnflags "AI_AXIS" and "NOTPLAYER",
Make sure it's flat on the floor. The chest will appear with it's center on the center of the trigger_radius.
The arrow (when rotating the trigger) points to the front side of the chest. Adjust the radius and height for
that trigger to suit your needs. Every zombie that dies touching that trigger will feed the chest.

-Next create a script-brushmodel and give it the "clip" texture. you want to make it about 104 units wide (x-axis) and 90 units 'long' (in the y-axis) make sure it's high enough so players can't get on top off it and MORE IMPORTANT: make it so the square box representing the trigger_radius you created in the previous step is COMPLETELY INSIDE the clip-brush. Once you did all that give the clip-brush the KVP's:

Code Snippet
Plaintext
targetname - soul_chest_clip

You can simply copy these two entities for all the chest's you want to make. The kvp's for all chests are the same. (the stock script supports up to 6 chest locations without any editing, although you might want to set the amount of kills yourself. You can do this in the _soul_chest.gsc file (i've marked where to edit stuff). Every chest can have it's own radius and height.

-Next create 4 triggers (don't make more, that may cause issue's) where the players can pick up their reward when done filling up all the chest's (the ray-guns in the stock script).
Make those trigger_use and give the KVP's:

Code Snippet
Plaintext
targetname - soul_chest_reward

The center of the trigger is where the ray-gun appears. The amount of players in the game is equal to the amount of ray-guns that will spawn. A player can only pick up a free ray-gun once, if they already have a raygun if refills the ammo for it, once.

Things you want to know:
-The standard time-out timer for a chest is set to 50 seconds, you can change this in _soul_chest.gsc
-this is what the stock kill-requirements are, look for these lines to change them. You can change the kills required for each chest in _soul_chest.gsc.


Code Snippet
Plaintext
//////////////////////////  EDIT AMOUNT OF KILLS NEEDED HERE 
    chest_1_kills = 12;
    chest_2_kills = 25;
    chest_3_kills = 45;
    chest_4_kills = 65;
    chest_5_kills = 90;
    chest_6_kills = 140;
///////////////////////  EDIT AMOUNT OF KILLS NEEDED HERE ////////////////////////////

-Dog's do not fill up chest's (so a dog round probably times out a chest, like the robots closed a chest in origins when
standing on it)
-When 2 or more chest's are activated at the same time, and one of them time's out and closes while other chest's are completed the amount of kills needed when reactivating the timed-out chest could have increased one level. I'll explain:
Say: you got 4 chest's
first one activated require's 4 kills
second one require's 8 kills
third require's 12 kills
fourth require's 16 kills

*when you activated chest 1 and 2 at the same time, and finished both of them without time-out's. it took you 12 kills, right!

*now when you activate chest 1 and 2 at the same time and let ONE of them time out:
-In the case the first chest you activated times out, and you completed the second one, that one took you 8 kills.
now when you reactivate chest 1 (or another remaining chest) that one will also require 8 kills to fill instead of 4.

-When the second chest you activated timed out, nothing changes

That should be the worst case scenario, i decided to keep it that way. It could add some difficulty for players that are trying to fill multiple chest's at the same time and fail..

That's all, remember to select all new files in the MOD-Builder when compiling!

Also note, i have no scripting background whatsoever. I'm doing this for a few months now, and if i did things that are 'not done' or if you find any bugs please let me know. Happy mapping/modding!

If you use this tutorial for your map credit is appreciated, and it would maybe even be more appreciated if you would send me a link or message if your level is released. Would love to check out other map's with my script's in it!! ;)
10 years ago
Thanks guys!
10 years ago
sorry man, you never know. have had corrupted files myself. i wouldn't really know then. except what daedra descent said...
10 years ago
Loading ...