Raised This Month: $ Target: $400
 0% 

Size of Model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MeNtAL MaNiAC
Junior Member
Join Date: Nov 2006
Old 07-01-2007 , 18:35   Size of Model
Reply With Quote #1

I am somewhat of a noob to amxx but definately a noob to custom models and how to spawn them. Now i have followed the tutorial on how to spawn a car in front of myself and simply replaced the car with my model but i cannot seem to change the size of it. I changed the floats in entity_set_size, i resized it in my 3d program before compiling, i changed the $scale in the qc file but it is still huge. How can i get it smaller?

[PHP]
#include <amxmodx>
#include <amxmisc>
#include <engine>
new g_Classname[] = "sword"
new g_Model[] = "models/sword.mdl"
public plugin_init()
{
register_plugin("Sword Test","MeNtAL","0.01")

register_clcmd("say sword","sword")
}
public plugin_precache()
precache_model(g_Model)
public sword(id)
{
new Ent = create_entity("info_target")
entity_set_string(Ent,EV_SZ_classname,g_Class name)
entity_set_model(Ent,g_Model)
entity_set_int(Ent,EV_INT_solid,SOLID_TRIGGER )
entity_set_size(Ent,Float:{0.0,0.0,0.0},Float :{1.0,1.0,1.0})
entity_set_edict(Ent,EV_ENT_owner,id)
}
[PHP]
MeNtAL MaNiAC is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 07-01-2007 , 23:47   Re: Size of Model
Reply With Quote #2

I'm pretty sure entity_set_size sets the bounds of the entity. This will not change the appearance of the model itself.

I think the only way to change the size of the model is in the modeling program. I have no clue how to model so I can't help you there
hlstriker is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 07-02-2007 , 01:47   Re: Size of Model
Reply With Quote #3

entity_set_size() sets the size of the bounding box

The bounding box is what's used for collisions, it has nothing to do with the appearance of the model. It seems like you're talking about making the model itself smaller. That means you have to edit the model with Milkshape or any other modelling program.
stupok is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 07-02-2007 , 01:51   Re: Size of Model
Reply With Quote #4

Can't you set the models scale somehow? (Physically) Some mods changed were you can set the scale of models, not only sprites ( SDK default is only sprites ).
Just by changing the entity value 'scale' works.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
stupok
Veteran Member
Join Date: Feb 2006
Old 07-02-2007 , 14:25   Re: Size of Model
Reply With Quote #5

I've never heard of that, but maybe you're right.
stupok is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 07-02-2007 , 14:59   Re: Size of Model
Reply With Quote #6

I went to go try it, and seemed to work just fine on sprites. But on models, there needs to be some changes in the SDK. (Spirit based mods have it)

[IMG]http://img165.**************/img165/2306/demo10001nm7.jpg[/IMG]
(Re-sized turrent via code)
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
MeNtAL MaNiAC
Junior Member
Join Date: Nov 2006
Old 07-02-2007 , 16:53   Re: Size of Model
Reply With Quote #7

How would I go about changing that entity value?
MeNtAL MaNiAC is offline
}v{ajinX
Junior Member
Join Date: Jun 2007
Old 07-05-2007 , 07:18   Re: Size of Model
Reply With Quote #8

entity_set_float(ent,EV_FL_scale,0.4)
}v{ajinX is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode