AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Creating a wall (https://forums.alliedmods.net/showthread.php?t=241677)

Misery 06-07-2014 13:29

Creating a wall
 
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

Fr33m@n 06-08-2014 06:04

Re: Creating a wall
 
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.

Misery 06-08-2014 14:27

Re: Creating a wall
 
Is there a way to have an invisible model or something? I'd just like the wall to be invisible, but still solid.

klippy 06-08-2014 16:17

Re: Creating a wall
 
Quote:

Originally Posted by Misery (Post 2148482)
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.

Misery 06-10-2014 21:07

Re: Creating a wall
 
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.

Nextra 06-10-2014 21:32

Re: Creating a wall
 
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.


All times are GMT -4. The time now is 13:56.

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