AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Size of Model (https://forums.alliedmods.net/showthread.php?t=57280)

MeNtAL MaNiAC 07-01-2007 18:35

Size of Model
 
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]

hlstriker 07-01-2007 23:47

Re: Size of Model
 
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 :P

stupok 07-02-2007 01:47

Re: Size of Model
 
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.

Drak 07-02-2007 01:51

Re: Size of Model
 
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.

stupok 07-02-2007 14:25

Re: Size of Model
 
I've never heard of that, but maybe you're right.

Drak 07-02-2007 14:59

Re: Size of Model
 
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)

MeNtAL MaNiAC 07-02-2007 16:53

Re: Size of Model
 
How would I go about changing that entity value?

}v{ajinX 07-05-2007 07:18

Re: Size of Model
 
entity_set_float(ent,EV_FL_scale,0.4)


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

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