Raised This Month: $ Target: $400
 0% 

how to create func_door_rotating triggered by func_button


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 04-28-2011 , 06:49   how to create func_door_rotating triggered by func_button
Reply With Quote #1

so yeah, i want a plugin to create a surf_ski_2 style jail, i got func_door_rotating and func_button to spawn but thats it

PHP Code:
iEntity create_entity"func_door_rotating" )
    if( !
is_valid_entiEntity ) ) {
        
log_amx"There was an error with creating")
        return 
0;
    }
    
entity_set_stringiEntityEV_SZ_classname"func_door_rotating")
    
entity_set_intiEntityEV_INT_movetypeMOVETYPE_FLY)
    
entity_set_intiEntityEV_INT_solidSOLID_BBOX)
    
entorigin[0] = jailLocation[0] +0.5
    entorigin
[1] = jailLocation[1] -0.5
    entorigin
[2] = jailLocation[2] -100//+0.5
    
entity_set_origin(iEntityentorigin
    
entity_set_model(iEntity,"models/fakejail/jail_floor.mdl")
    
entity_set_vector(iEntityEV_VEC_anglesFloat:{ 0.00.0 0.0  })
    
entity_set_size(iEntity,Float:{ -155.0,-155.0,-2.5}, Float:{ 155.0,155.0,2.5}  )
    
entity_set_string(iEntityEV_SZ_target"jbutton")
    
entity_set_string(iEntityEV_SZ_targetname"jdoor")
    
entity_set_float(iEntityEV_FL_speed100.0)


    
    
iEntity create_entity"func_button" )
    if( !
is_valid_entiEntity ) ) {
        
log_amx"There was an error with creating")
        return 
0;
    }
    
    
entity_set_stringiEntityEV_SZ_classname"func_button")
    
entity_set_intiEntityEV_INT_movetypeMOVETYPE_NONE)
    
entity_set_intiEntityEV_INT_solidSOLID_BBOX)
    
entorigin[0] = jailLocation[0]
    
entorigin[1] = jailLocation[1]
    
entorigin[2] = jailLocation[2] +178
    entity_set_origin
(iEntityentorigin
    
entity_set_model(iEntity,"models/fakejail/jail_button.mdl")
    
entity_set_vector(iEntityEV_VEC_anglesFloat:{ 0.00.0 0.0  })
    
entity_set_size(iEntity,Float:{ -16.0,-16.0,0.0}, Float:{ 16.0,16.0,32.0}  )
    
entity_set_string(iEntityEV_SZ_target"jdoor")
    
entity_set_string(iEntityEV_SZ_targetname"jbutton"
also id like the door to be touch activated, i found that in valve hammer theres a "flags" tab in object properties, where you could set that, but how to do that in code

pictures of flags that need to be set:
http://www.upload.ee/image/1303364/nupp.PNG
http://www.upload.ee/image/1303366/luuk.PNG

Last edited by jimaway; 04-28-2011 at 07:26.
jimaway is offline
 



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 04:23.


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