Raised This Month: $51 Target: $400
 12% 

Creating a wall


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Misery
Senior Member
Join Date: Dec 2010
Old 06-07-2014 , 13:29   Creating a wall
Reply With Quote #1

Hi,

Could anyone give me an example on how to make a wall "func_wall" going from for example (x,y,z) from (1.0, 1.0, 1.0) to (8.0, 28.0, 1.0) (the two lower corners) with a height of 20.0 and a thickness of 10.0 ?

there's...
create_entity("func_wall")

After that, for setting its origin and all I'm fine.
But how the heck to I set its dimensions?

I'm a bit lost

Thanks

Last edited by Misery; 06-07-2014 at 13:36.
Misery is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 06-08-2014 , 06:04   Re: Creating a wall
Reply With Quote #2

Search for these function in include.
an example :

entity_set_size(ent, {-16.0, -16.0, 0.0}, {16.0, 16.0, 2.0})
or
engfunc(EngFunc_SetSize, id, {-16.0, -16.0, 0.0}, {16.0, 16.0, 2.0})

Note that your entity need a model to spawn at correct origin.

Last edited by Fr33m@n; 06-08-2014 at 06:05.
Fr33m@n is offline
Misery
Senior Member
Join Date: Dec 2010
Old 06-08-2014 , 14:27   Re: Creating a wall
Reply With Quote #3

Is there a way to have an invisible model or something? I'd just like the wall to be invisible, but still solid.
Misery is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-08-2014 , 16:17   Re: Creating a wall
Reply With Quote #4

Quote:
Originally Posted by Misery View Post
Is there a way to have an invisible model or something? I'd just like the wall to be invisible, but still solid.
Just set
PHP Code:
set_pev(iEntpev_effectsEF_NODRAW); 
on a wall entity and it will not be drawn, or in other words, it will be fully invisible.
klippy is offline
Misery
Senior Member
Join Date: Dec 2010
Old 06-10-2014 , 21:07   Re: Creating a wall
Reply With Quote #5

Another question guys!
Is there a kind of dummy model I can use (since its invisible i absolutely dont care about the model used). I'm just not sure what to put inside the mdl field.
Misery is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 06-10-2014 , 21:32   Re: Creating a wall
Reply With Quote #6

You may want to look at Walkguard for reference (and maybe it already does what you need): https://forums.alliedmods.net/showthread.php?t=55245

For a generic model you should use something from the default Half-Life which will ensure that it never has to be downloaded for any mod you want to support. Something like "rpgrocket.mdl" is often used for this purpose. Walkguard uses "gib_skull.mdl" for example.
__________________
In Flames we trust!

Last edited by Nextra; 06-10-2014 at 21:33.
Nextra is offline
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 01:31.


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