Raised This Month: $ Target: $400
 0% 

Creating a ladder.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-24-2007 , 13:44   Creating a ladder.
Reply With Quote #1

Has anyone succeeded?
I've tryed lots of stuff but nothing seems to work.

Sure, the ent is created but i cant climb it...

This didn't work.
Code:
new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_ladder")) if ( ent ) {     set_pev(ent, pev_origin, { 0.0, -400.0, -350.0 })     set_pev(ent, pev_solid, 2)     set_pev(ent, pev_mins, { 123.0, -3225.0, -61.0 })     set_pev(ent, pev_maxs, { 129.0, -2975.0, 181.0 })     engfunc(EngFunc_SetModel, ent, "*37") }

Could someone give me a hint or point me in the right direction?
[ --<-@ ] Black Rose is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 01-24-2007 , 16:05   Re: Creating a ladder.
Reply With Quote #2

You cant make a ladder like that with amxx.

When making a map, a ladder consists of two brushes.

One is a func_illusionary and the other is a func_ladder, layered one on top of the other.

You would have to make two entities, func_illusionary then func_ladder and place the func_ladder over the func_illusionary.

The func_illusionary brush holds the texture and the func_ladder is drawn invisible on map compile, which uses the trigger texture.
organizedKaoS is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-24-2007 , 16:23   Re: Creating a ladder.
Reply With Quote #3

ok... 2 bad :/
[ --<-@ ] Black Rose is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-24-2007 , 18:16   Re: Creating a ladder.
Reply With Quote #4

A ladder consists of one brush: func_ladder. A ladder doesn't require a visible brush nearby to be usable. Furthermore, not all ladder-representation brushes are func_illusionary.

This is how I create a brush model in my hostage AI plugin:

Code:
new ent, wall, Float:absmin[3], Float:absmax[3]; new wall_classname = engfunc(EngFunc_AllocString,"func_wall"); while((ent = engfunc(EngFunc_FindEntityByString,ent,"classname","func_illusionary")) != 0) {     wall = engfunc(EngFunc_CreateNamedEntity,wall_classname);     // make me solid     set_pev(wall,pev_solid,SOLID_BSP);     set_pev(wall,pev_movetype,MOVETYPE_PUSH);     // make me the same size and position as func_illusionary     set_pev(wall,pev_modelindex,pev(ent,pev_modelindex));     pev(ent,pev_absmin,absmin);     pev(ent,pev_absmax,absmax);     engfunc(EngFunc_SetSize,wall,absmin,absmax); }

This creates a func_wall over all func_illusionary entities, of the same size. Don't ask why. Basically, the requirements are: solid type is SOLID_BSP, move type is MOVETYPE_PUSH (game crashes if there is a SOLID_BSP without MOVETYPE_PUSH), and model index is the same as another brush model index (I first tried setting the model string, like you do, but it didn't work). I can't remember if the SetSize was required for it to work or not.

Anyway, I don't know if you can create a ladder of a custom size, I think you probably have to leech off of existing brush models. Also, func_ladder might use a SOLID_TRIGGER instead of SOLID_BSP.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS

Last edited by XxAvalanchexX; 01-24-2007 at 18:21.
XxAvalanchexX is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 01-24-2007 , 23:48   Re: Creating a ladder.
Reply With Quote #5

Quote:
Originally Posted by XxAvalanchexX View Post
A ladder consists of one brush: func_ladder. A ladder doesn't require a visible brush nearby to be usable. Furthermore, not all ladder-representation brushes are func_illusionary.
I have always used two brushes to make ladders and maps that come standard with cs...assault, oilrig, militia for example, use the two brush method.

Even tutorials on how to make ladders describe the two brush method.

The visible brush nearby is how a player knows a ladder is there.

The two brush method for ladders exists for the reason that for func_ladder, the trigger texture is used. That texture is drawn invisible on map compile.

Without the func_illusionary with the ladder texture, you would not be able to see the ladder dimensions or the ladder itself.
organizedKaoS is offline
commonbullet
Veteran Member
Join Date: Oct 2005
Old 01-25-2007 , 00:25   Re: Creating a ladder.
Reply With Quote #6

Quote:
Originally Posted by organizedKaoS View Post
Without the func_illusionary with the ladder texture, you would not be able to see the ladder dimensions or the ladder itself.
You could add a 'ladder functionality' to an existent map object, i.e.
And it doesn't require to be a func_illusionary or even a brush entity.

Last edited by commonbullet; 01-25-2007 at 00:31.
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-25-2007 , 05:48   Re: Creating a ladder.
Reply With Quote #7

create a illusionary ladder! ( )
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-25-2007 , 12:09   Re: Creating a ladder.
Reply With Quote #8

Thank you all. I've tryed some different combinations and it didn't really work well... I can't climb it. It looks like I'm lagging my way trough it.
Code:
#define ORIGIN { 0.0, -400.0, -350.0 } #define ABSMAX {-958.0, 1474.0, -94.0} #define ABSMIN {-978.0, 1342.0, -3042.0}         ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_ladder"))     if ( ent ) {         set_pev(ent, pev_origin, ORIGIN)         set_pev(ent, pev_solid, SOLID_BSP)         set_pev(ent, pev_movetype, MOVETYPE_PUSH)         engfunc(EngFunc_SetModel, ent, "*12")         set_pev(ent, pev_modelindex, 13)         set_pev(ent, pev_absmin, ABSMIN)         set_pev(ent, pev_absmax, ABSMAX)     }

Last edited by [ --<-@ ] Black Rose; 01-25-2007 at 12:14.
[ --<-@ ] Black Rose is offline
lunarwolfx
Member
Join Date: Feb 2005
Old 01-26-2007 , 21:10   Re: Creating a ladder.
Reply With Quote #9

Quote:
Originally Posted by [ --<-@ ] Black Rose View Post
Thank you all. I've tryed some different combinations and it didn't really work well... I can't climb it. It looks like I'm lagging my way trough it.
Code:
#define ORIGIN { 0.0, -400.0, -350.0 } #define ABSMAX {-958.0, 1474.0, -94.0} #define ABSMIN {-978.0, 1342.0, -3042.0}         ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_ladder"))     if ( ent ) {         set_pev(ent, pev_origin, ORIGIN)         set_pev(ent, pev_solid, SOLID_BSP)         set_pev(ent, pev_movetype, MOVETYPE_PUSH)         engfunc(EngFunc_SetModel, ent, "*12")         set_pev(ent, pev_modelindex, 13)         set_pev(ent, pev_absmin, ABSMIN)         set_pev(ent, pev_absmax, ABSMAX)     }
The problem might be because you need to take a brush that has the aaatrigger texture.

Last edited by lunarwolfx; 01-27-2007 at 00:42. Reason: changed aaatexture to aaatrigger
lunarwolfx is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-27-2007 , 12:30   Re: Creating a ladder.
Reply With Quote #10

Quote:
Originally Posted by lunarwolfx View Post
The problem might be because you need to take a brush that has the aaatrigger texture.
and what exactly is the "brush"? It has the same model, modelindex, absmin, absmax as an existing ladder.
[ --<-@ ] Black Rose is offline
Reply


Thread Tools
Display Modes

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 22:30.


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