Page 1 of 1

How to make crates spawn items?

Posted: Thu Dec 11, 2003 7:11 pm
by Krane
How? There's a key "spawnitems" in the func_crate window but what to put in there? I've tryed like items/blabla.tik but didn't work. :x

models

Posted: Fri Dec 12, 2003 1:41 am
by tltrude
Try this:

Key: spawnitems
Value: models/items/blabla.tik

Posted: Fri Dec 12, 2003 4:00 am
by omniscient
what would that be good for, a crate spawning things, hehe u could make one side a function window, and hve ppl hide in it, and when an enemy comes by they shoot it open and attack.................or not, it sounded cooler in my head.

Posted: Fri Dec 12, 2003 3:07 pm
by Krane
Still nothing...

I was taking a look at the crate.scr and there some good info there, I'm just not seeing w/ my noob eyes. It says something about "item_crate"...

Anyway, I've tryed run this script and place some items w/ targetname item_crate, still nothing...

I think the solution is there. I'll dig it up a little and post here what I've found.

I just toth it would be easy... :o

spawnitems

Posted: Fri Dec 12, 2003 6:05 pm
by tltrude
After looking at the script, I think these are the items you can use:

ammo_pistol
ammo_rifle
ammo_smg
ammo_mg
ammo_heavy
ammo_grenade
health_100
health_50
health_25

And, this is how a list would look:

Key: spawnitems
Value: ammo_grenade ammo_smg health_50

You have to use this targetname for every func_crate that you want to spawns stuff.

Key: targetname
Value: item_crate

The script will have to be loaded at the top of your script too.

Level waittill prespawn
thread global/crate.scr::item_crate
or just:
exec global/crate.scr

If you want, you can make your own version of the crate script and add more items that can be spawned. (exec global/krane_crate.scr).

Hope that works!