How can you spawn a solid model players can't walk through
Moderator: Core Staff
How can you spawn a solid model players can't walk through
Question rephrased a little bit: How can you make a model you spawn solid players can't walk through it?
Need a scripting command. Making a mod and need to be able to spawn a model that players can jump on or can't walk though. Thanks.
Need a scripting command. Making a mod and need to be able to spawn a model that players can jump on or can't walk though. Thanks.

-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: How can you spawn a solid model players can't walk through
If I recall correctly, this is something that is impossible in the early CoD Games.

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: How can you spawn a solid model players can't walk through
Weird, because I thought I remembered seeing a mod where they were able to jump and spawn a box below them and just keep doing it to reach really high heights.

Re: How can you spawn a solid model players can't walk throu
ok, first of all its from zombie mod. 2nd, im now trying to search the correct code. 

-
- Core Staff
- Posts: 2214
- Joined: February 6th, 2006, 3:18 pm
- Location: Germany/Bayern
Re: How can you spawn a solid model players can't walk throu
if you have the zombie mod, please link to it or give the name and I can have a look in the scripts
THAT HANDS WERE NOT TRACED!
visit my blog: Link
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality
Re: How can you spawn a solid model players can't walk throu
...some time later ive found something:
but there is no "Place Crate" or "Place Zombie Step" or something smiliar to that
back to work...
Code: Select all
#include "ui_mp/menudef.h"
#define ORIGIN_QUICKMESSAGETAB 32 224
#define ORIGIN_QUICKMESSAGEWINDOW 32 256
// TITLE
itemDef
{
name "title"
visible 1
rect 0 0 224 32
origin ORIGIN_QUICKMESSAGETAB
style WINDOW_STYLE_FILLED
forecolor 1 1 1 1
backcolor 0 0 0 0.7975
type ITEM_TYPE_TEXT
text "^1QUICK ZOMBIE"
textfont UI_FONT_NORMAL
textscale .24
textalignx 112
textaligny 24
textalign ITEM_ALIGN_CENTER
decoration
}
itemDef
{
name "title_quickmessage_gray"
visible 1
rect 3 3 218 29
origin ORIGIN_QUICKMESSAGETAB
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 20 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "^11. Drop Mine"
decoration
}
execKey "1" { scriptMenuResponse "1"; close quickzombie }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 36 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "^12. Drop Med Kit"
decoration
}
execKey "2" { scriptMenuResponse "2"; close quickzombie }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 52 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "^13. Drop Current Weapon"
decoration
}
execKey "3" { scriptMenuResponse "3"; close quickzombie }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 68 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "^14. Suicide"
decoration
}
execKey "4" { scriptMenuResponse "4"; close quickzombie }
itemDef
{
name "window"
visible 1
rect 16 84 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "@QUICKMESSAGE_ESC_EXIT"
decoration
}
}
}

back to work...
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: How can you spawn a solid model players can't walk throu
That does nothing.
I checked all the Zombie mods I could find and not even an idea of crate placing came up...
I checked all the Zombie mods I could find and not even an idea of crate placing came up...

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: How can you spawn a solid model players can't walk throu
I'm not sure what he wants, to spawn a model that is solid and players can't walk through it?
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: How can you spawn a solid model players can't walk throu
Yes. The object is a solid model and therefore players cannot walk through it.Rez|l wrote:I'm not sure what he wants, to spawn a model that is solid and players can't walk through it?

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: How can you spawn a solid model players can't walk throu
Code: Select all
model = spawn("misc_model", (0,0,0));
model.angles = origin.angles; //make a script_origin somewhere
model setmodel("xmodel/bleh");
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: How can you spawn a solid model players can't walk throu
That spawns a non solid model. vCoD (like all the other series) uses a collmap model system, where the models are actually ALWAYS non-colliding. When you compile the compiler automatically assigns each model a collmap, which creates a clip around the object, making it appear solid.Rez|l wrote:Something like that?Code: Select all
model = spawn("misc_model", (0,0,0)); model.angles = origin.angles; //make a script_origin somewhere model setmodel("xmodel/bleh");

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: How can you spawn a solid model players can't walk throu
Any way to spawn solid brushes via script?
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
-
- Core Staff
- Posts: 2214
- Joined: February 6th, 2006, 3:18 pm
- Location: Germany/Bayern
Re: How can you spawn a solid model players can't walk throu
Hm haven't seen a way though.
Make 60 brushes in your map and place them somewhere outside. Manage those all in an array and set a limit how many a player can place.
Now if a player wants to spawn one, search for a free brush, make it nonsolid() and move it to the player now make it solid(). Make a function that allows a player to free all brushes he used. Those brushes will now go back to the place outside of the map and can be used for something else.
Array: [60][2] so you have
[*][0]
ent
[*][1]
player who is using it or null
each player has wether a limit of brushes he is allowed to use or first come first serve
ofc you can store additional information and other stuff
Make 60 brushes in your map and place them somewhere outside. Manage those all in an array and set a limit how many a player can place.
Now if a player wants to spawn one, search for a free brush, make it nonsolid() and move it to the player now make it solid(). Make a function that allows a player to free all brushes he used. Those brushes will now go back to the place outside of the map and can be used for something else.
Array: [60][2] so you have
[*][0]
ent
[*][1]
player who is using it or null
each player has wether a limit of brushes he is allowed to use or first come first serve
ofc you can store additional information and other stuff
THAT HANDS WERE NOT TRACED!
visit my blog: Link
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: How can you spawn a solid model players can't walk throu
If I remember correctly, they introduced a "setbounds" command in one game. Although removed at least in CoD4...

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: How can you spawn a solid model players can't walk throu
There is a long, tiresome way not to let players be in a certain place:
1. Create a function that returns true if a player is in some place (checking if the player's coordinates correspond to given coordinate ranges.
2. Make an infinite loop with this function inside.
This way isn't perfect though, but, as far as we see, it's the only way to do it.
1. Create a function that returns true if a player is in some place (checking if the player's coordinates correspond to given coordinate ranges.
2. Make an infinite loop with this function inside.
This way isn't perfect though, but, as far as we see, it's the only way to do it.
Who is online
Users browsing this forum: No registered users and 1 guest