How to make crates spawn items?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

How to make crates spawn items?

Post 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
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

models

Post by tltrude »

Try this:

Key: spawnitems
Value: models/items/blabla.tik
Tom Trude,

Image
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post 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.
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post 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
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

spawnitems

Post 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!
Tom Trude,

Image
Post Reply