PDA

View Full Version : sprites or models


peter
06-03-2009, 04:17 PM
when you want to add plants in a map what is the difference from models and sprites? What would you use? and what is the code to add. minus the location.


Any help would be perfect!

diamond-optic
06-03-2009, 06:00 PM
well i use env_model entities for models (*.mdl) and for sprites (*.spr) i usually use env_glow but sometimes env_sprite

not sure if these 'plants' you want to add are models or if theyre sprites..
but for models heres an example sort of thing:


{
"origin" "### ### ###"
"spawnflags" "2"
"model" "models/whatever.mdl"
"rendercolor" "0 0 0"
"angles" "0 ### 0"
"targetname" "whatever_u_want"
"classname" "env_model"
}


-origin is self explanatory
-spawnflags set to 2 means it drops to the ground (that way you dont have to place it perfectly in the map, depending on if its bone (or main bone if more then one) is positioned correctly
-model is also self explanatory
-rendercolor might not be needed as id assume the default is prob 0 0 0
-angles is only needed if youre going to rotate it, and its pitch yaw roll i believe, so usually you only want to edit the middle value
-targetname is just anything, but ive found that if you leave it blank the model usually doesnt show up ingame
-classname is a given too

peter
06-04-2009, 08:01 PM
Thanks diamond! that is what I needed!!

Vet
06-06-2009, 01:21 PM
Don't forget that if you're adding non-standard models/sprites, you'll want to edit/create a .res file and upload them to your content server.