AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity problem; min, max and drop_to_floor (https://forums.alliedmods.net/showthread.php?t=228581)

rak 10-22-2013 20:22

Entity problem; min, max and drop_to_floor
 
1 Attachment(s)
Hi all, I have a little problem; min and max values are wrong and the entity isnt in the floor

PHP Code:

create_item(victim) {
    
    static const 
Float:fMaxs[3] = { 20.09.013.0 
    
    static const 
Float:fMins[3] = { -20.0, -9.00.0 
    
    new 
ent create_entity("info_target")
    
    new 
Float:origin[3]
    
    
entity_get_vector(victimEV_VEC_originorigin)
    
    
entity_set_string(entEV_SZ_classnameg_classname)
    
    
entity_set_model(entg_Model)
    
    
entity_set_vector(entEV_VEC_originorigin)
    
    
set_size(entfMinsfMaxs)
    
    
entity_set_int(entEV_INT_bcTeamget_user_team(victim))
    
    
entity_set_int(entEV_INT_solidSOLID_BBOX)
    
    
entity_set_int(entEV_INT_movetypeMOVETYPE_NONE)
    
    
entity_set_float(entEV_FL_nextthinkget_gametime()+1.0)
    
    
drop_to_floor(ent)
    
    
//set_task(Remove_Entity_Time, "Entity_Remove", ent + TASK_REMOVE)
    


I dump the model info

Code:

ID Tag: IDST
Version: 10
Name: "dtgift.mdl"
Length: 261340

Eye Position: -0.000000 0.000000 0.000000
Min: 0.000000 0.000000 0.000000
Max: 0.000000 0.000000 0.000000
Bounding Box Min: 0.000000 0.000000 0.000000
Bounding Box Max: 0.000000 0.000000 0.000000
Flags: 0

Number of Bones: 1

Bone 1 Name: "Box01"
Bone 1 Parent: -1
Bone 1 Flags: 0
Bone 1 Bonecontroller: -1 -1 -1 -1 -1 -1
Bone 1 Value: -2.784223 -0.232019 0.000000 0.000000 0.000000 0.261799
Bone 1 Scale: 0.003906 0.003906 0.003906 0.000012 0.000012 0.000048

Number of Bone Controllers: 0

Number of Hitboxes: 1

Hitbox 1 Bone: 0
Hitbox 1 Group: 0
Hitbox 1 Bounding Box Min: -19.299999 -8.970000 0.000000
Hitbox 1 Bounding Box Max: 19.299999 8.970000 12.760000

Number of Sequences: 1

Sequence 1 Label: "idle"
Sequence 1 Frames per sec: 30.000000
Sequence 1 Flags: 0
Sequence 1 Events: 0

Number of Sequence Groups: 1

Sequence Group 1 Label: "default"

Sequence Group 1 Name: ""

Sequence Group 1 Data: 0

Number of Textures: 1
Texture Index: 6472
Texture Data Index: 6556

Texture 1 Name: "supply_box.BMP"
Texture 1 Flags: 0
Texture 1 Width: 504
Texture 1 Height: 504
Texture 1 Index: 6556

Number of Skin References: 1
Number of Skin Families: 1

Number of Body Parts: 1

Body Part 1 Name: "studio"
Body Part 1 Number of Models: 1
Body Part 1 Base: 1
Body Part 1 Model Index: 768

        Sub Model 1 Name: "ref_supplybox"
        Sub Model 1 Type: 0
        Sub Model 1 Meshes: 1
        Sub Model 1 Vertices: 164
        Sub Model 1 Normals: 32
        Sub Model 1 Deformation Groups: 0

                Sub Model 1, Mesh 1 Total Triangles: 238
                Sub Model 1, Mesh 1 Triangle Index: 3448
                Sub Model 1, Mesh 1 Skin Reference: 0
                Sub Model 1, Mesh 1 Total Normals: 32
                Sub Model 1, Mesh 1 Normals Index: 0

Number of Attatchments: 0

any idea why this happen?

Shooting King 10-24-2013 04:39

Re: Entity problem; min, max and drop_to_floor
 
Remove set_size() and try. btw do you want entity to be 'on the floor' or 'in the floor' ? This suggestion is for 'on the floor'.


All times are GMT -4. The time now is 23:15.

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