How to make crates spawn items?
Moderator: Moderators
-
Krane
- Lieutenant General
- Posts: 782
- Joined: Sat May 31, 2003 4:18 pm
- Location: California, USA
- Contact:
How to make crates spawn items?
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. 
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
Krane
- Lieutenant General
- Posts: 782
- Joined: Sat May 31, 2003 4:18 pm
- Location: California, USA
- Contact:
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...
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...
spawnitems
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!
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!

