Raised This Month: $ Target: $400
 0% 

Create wall


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Basic-Master
Veteran Member
Join Date: Apr 2005
Location: hello pm
Old 11-05-2005 , 05:28  
Reply With Quote #1

okay, thanks
but unfortunately I can't turn the wall with EV_VEC_angles (well the model turns but not the "basic" object you can collide with). here is my current function:
Code:
public cmdWall(id) {     new wall = create_entity("func_wall")     entity_set_model(wall, "models/wall.mdl") // I found it somewhere in the forums     // Set size and absmin+absmax values     new Float:mins[3]     mins = Float:{-100.0, -10.0, -75.0}     new Float:maxs[3]     maxs = Float:{100.0, -10.0, 75.0}     entity_set_vector(wall, EV_VEC_mins, mins)     entity_set_vector(wall, EV_VEC_maxs, maxs)     entity_set_vector(wall, EV_VEC_absmin, mins)     entity_set_vector(wall, EV_VEC_absmax, maxs)     // Turn model     new Float:vRetVector[3]     entity_get_vector(id, EV_VEC_v_angle, vRetVector)     vRetVector[0] = 0.0     entity_set_vector(wall, EV_VEC_angles, vRetVector)     // Get user origin     new Float:someOrigin[3]     entity_get_vector(id, EV_VEC_origin, someOrigin)     // You can offset the origin here.     new offset = 200     new Float:adjustPos[3]     velocity_by_aim(id, offset, adjustPos)     // This prevents the wall from spawning in the current position of the user and make it spawn farther away from the user.     someOrigin[0] += adjustPos[0]       someOrigin[1] += adjustPos[1]     someOrigin[2] += adjustPos[2]     entity_set_origin(wall, someOrigin)     // Set other values     entity_set_int(wall, EV_INT_solid, SOLID_BBOX)     entity_set_int(wall, EV_INT_movetype, MOVETYPE_FLY)     // zomg! }
and now I'm wondering.. what's wrong with it?
Basic-Master is offline
Send a message via ICQ to Basic-Master Send a message via MSN to Basic-Master
Reply



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


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