Health?

Post your scripting questions / solutions here

Moderator: Moderators

Devil_Dog
Warrant Officer
Posts: 140
Joined: Fri Feb 17, 2006 2:59 pm

Health?

Post by Devil_Dog »

Not sure if this was scripting or mapping.

I make a brush and want it to be destroyed when shot. What do I do?
I tried to 'script/object' and give it a health of 1, but this didn't work.
Computers hate me!!!!!
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

make it a func_crate
Image
Devil_Dog
Warrant Officer
Posts: 140
Joined: Fri Feb 17, 2006 2:59 pm

Post by Devil_Dog »

:) Thanks :!:
Computers hate me!!!!!
neillomax
Lieutenant General
Posts: 880
Joined: Thu Jun 23, 2005 6:57 am

Post by neillomax »

Try making it a.................. function/crate.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

neillomax wrote:Try making it a.................. function/crate.
lol.. bit eager to get your 500th post quick? :P ... congrats anyway :wink:
Image
neillomax
Lieutenant General
Posts: 880
Joined: Thu Jun 23, 2005 6:57 am

Post by neillomax »

Actually I wasn't even aware of # 500. What do I win ?

Must have been a time zone overlap on that one. No replies were here when I posted.
Devil_Dog
Warrant Officer
Posts: 140
Joined: Fri Feb 17, 2006 2:59 pm

Post by Devil_Dog »

The func_crate works. But I had to make 650 of them :roll:
I am makeing a target and I want the paper part to have holes where the bullet goes thru. It works, I'm just wondering if it will be too many entities. 650 for each target, 5 targets, and the rest of the map ofcourse.

BTW: congrats on that 500 neillomax
Computers hate me!!!!!
Devil_Dog
Warrant Officer
Posts: 140
Joined: Fri Feb 17, 2006 2:59 pm

Post by Devil_Dog »

I did somethig wrong. I made a test map for this. When I loaded it and selected a weapon, my veiw was from under the arm. When I fired the game froze. I had to re-start my computer. I loaded the map again, opened the consol and got these errors:
ERROR PlaySound: snd_step_metal needs an alias in ubersound.scr or uberdialog.scr - Please fix.

ERROR PlaySound: snd_step_equipment needs...same

AddRefEntityToScene: MAX_ENTITIES - 2 exceeded
(This on is displayed over 50 times)

ERROR playSound: snd_landing_metal needs...same
I can fix the sound errors in world spawn correct?
Does the "max entities" mean I can only have 2 entities on a map?

Somehow it also changed my desktop icon for sh to the MBuilder icon???
Computers hate me!!!!!
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

OMG!!! 650 is WAY too many, 1024 is the absolute limit for ALL entities! You've got to reduce the number!
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Devil_Dog
Warrant Officer
Posts: 140
Joined: Fri Feb 17, 2006 2:59 pm

Post by Devil_Dog »

I guess I'll have to make just the center of the target from func_crate. If the players are missing that bad they don't need to see it any way...lol.

Anything in blue is an entity, correct? Static items (like furniture) wouldn't be considered entities would they?

BTW: Sorry to be such a burden again. Just when I thought I ws getting the hang of mapping too...lol :lol:
Computers hate me!!!!!
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

explodingdoor

Post by tltrude »

Have a look at my "explodingdoor" tutorial map -- click on my signature logo to find the download. The zip contains the .map file, so you can copy/study whatever you need from it.

Image

There is a target gallery with both func_crate and func_window entities.
Tom Trude,

Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Lol, you're not a burden, Dog, everyone who's making the effort to actually learn something is most welcome here. :) And the truth is, there is a lot of information that the more experienced modders assume to be known by everyone, when in fact it isn't, and it's not documented in a systematic way anywhere (which is a shame). So, sorry for my harshness, I pointlessly made you feel stupid. ;)

All static models are entities. Almost everything in the game is, including the world, the players, the weapons, the grenades, the doors, the windows, the lights. The first 64 entities (numbered from 0 to 63) are reserved for players, the remaining 960 can be used for all the rest.

You know, I've always wondered why the hell doesn't the light compile remove the light entities from the map. Tthey're only used to generate lightmaps, and after that stage of the compile they're completely useless, they could've been removed to save up on the entity count. :?
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

to be even more specific: anything that isnt a brush is an entity. Additionally, anything made of brushes you use the right-click menu on, becomes an entity. such as func_crate, script_object, etc.

oh rook...

*spank*
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Rookie One.pl wrote:You know, I've always wondered why the hell doesn't the light compile remove the light entities from the map. Tthey're only used to generate lightmaps, and after that stage of the compile they're completely useless, they could've been removed to save up on the entity count. :?
They're used for spherical lighting (rgbGen lightingSpherical) and to calculate shadows of players/AI.
Image
Devil_Dog
Warrant Officer
Posts: 140
Joined: Fri Feb 17, 2006 2:59 pm

Post by Devil_Dog »

No worries rookie, it is my stupidity that makes me feel stupid, your comments just enhance the feeling :( Just kidding :lol:
The exploding door tut helped. Thanks tltrude.

Ok now the map works, minus the sound errors, no problem there. My next challenge is tho try to make these bullet holes round, square holes look funny. Here's what I'm gonna try:
When the func_crate is destroyed it spawns a new brush, I'll make a texture for a round hole. Hmm, what if they hit the same spot again? Uh oh, now my entity count just doubled again :roll: Think I'll make this a 2 map prodject...lol

Again thanks for the help guys.
Oh and I might have a tip for the "tip 'o the day", if it isn't there already.
Don't try to compile a map with MBuilder when you have SDK open, it can't find your map for some reason.
Computers hate me!!!!!
Post Reply