AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Make Wall Block Shooting? (https://forums.alliedmods.net/showthread.php?t=47602)

Wilson [29th ID] 11-22-2006 02:46

Make Wall Block Shooting?
 
I'm trying to create a wall that prevents shooting through it. Here's what I have so far, but you can still shoot through it:

Code:
public create_walls() {     new ent = create_entity("info_target")         entity_set_origin(ent, g_wallorigin[0])         entity_set_string(ent,EV_SZ_classname,"fire_blocker");     entity_set_model(ent, "models/null.mdl")     entity_set_int(ent, EV_INT_solid, SOLID_BBOX)     entity_set_float(ent,EV_FL_takedamage,0.0)         entity_set_size(ent,g_wallsize[0][0],g_wallsize[0][1])         drop_to_floor(ent) } // g_wallsize[0] is {-900.0, -100.0, -500.0}, {900.0, 100.0, 500.0}

It creates the wall and is the right size, but I can still shoot right through it. Originally I had the Y value as -32.0 and 32.0 (thickness) but it was the same thing so I tried increasing it and no luck.

Anyone know what else I have to do to prevent shooting through it?

The Specialist 11-22-2006 03:55

Re: Make Wall Block Shooting?
 
have you tried setting EV_FL_takedamage to another setting ? -1 or something .

dutchmeat 11-22-2006 04:27

Re: Make Wall Block Shooting?
 
try this:

Code:

public spawnmodel(id){
new Float: placepos[3]
entity_get_vector(id,EV_VEC_origin,placepos)
new model
model = create_entity("env_model")
new Float:tmaxs[3] = {5.0,5.0,5.0}
new Float:tmins[3] = {-5.0,-5.0,-5.0}
entity_set_origin(model,placepos)
entity_set_model(model,"models/null.mdl")
entity_set_int(model,EV_INT_solid, 2)
entity_set_size(model,tmins,tmaxs)
entity_set_float(model,EV_FL_scale,5.0)
}


XxAvalanchexX 11-22-2006 15:51

Re: Make Wall Block Shooting?
 
Try SOLID_BSP instead of SOLID_BBOX.

stupok 11-22-2006 19:19

Re: Make Wall Block Shooting?
 
If Avalanche's suggestion does not work, you can put 3 (I think thats the magic number) entities side-by-side and that should block bullets.

Wilson [29th ID] 11-25-2006 23:07

Re: Make Wall Block Shooting?
 
Neither SOLID_BSP nor the 3 entities side by side seemed to work at all.
Any other ideas on how to make the wall not shootable-through?

XxAvalanchexX 11-25-2006 23:53

Re: Make Wall Block Shooting?
 
Then try also setting its flags to FL_WORLDBRUSH.

Emp` 11-26-2006 00:40

Re: Make Wall Block Shooting?
 
or try setting its classname to func_wall

stupok 11-26-2006 13:52

Re: Make Wall Block Shooting?
 
Make sure the three entities aren't touching or intersecting. There should be a space between them.

3 ents in a row works for The Specialists, from my experience.

=|[76AD]|= TatsuSaisei 11-28-2006 06:47

Re: Make Wall Block Shooting?
 
Quote:

Originally Posted by Emp` (Post 407363)
or try setting its classname to func_wall

func_button might wokr better... buttons are shootable but not shoot through...


All times are GMT -4. The time now is 07:01.

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