How can you spawn a solid model players can't walk through

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

xeno
CJ Wannabe
CJ Wannabe
Posts: 38
Joined: October 31st, 2007, 12:37 am
Location: United States - GA

How can you spawn a solid model players can't walk through

Post by xeno » February 28th, 2010, 10:58 pm

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.
Image

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: How can you spawn a solid model players can't walk through

Post by Drofder2004 » March 1st, 2010, 1:24 am

If I recall correctly, this is something that is impossible in the early CoD Games.
Image
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

xeno
CJ Wannabe
CJ Wannabe
Posts: 38
Joined: October 31st, 2007, 12:37 am
Location: United States - GA

Re: How can you spawn a solid model players can't walk through

Post by xeno » March 1st, 2010, 2:10 am

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.
Image

BatterY
CJ Worshipper
CJ Worshipper
Posts: 238
Joined: January 29th, 2010, 10:27 pm

Re: How can you spawn a solid model players can't walk throu

Post by BatterY » March 12th, 2010, 7:59 pm

ok, first of all its from zombie mod. 2nd, im now trying to search the correct code. 8)

User avatar
waywaaaard
Core Staff
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

Post by waywaaaard » March 12th, 2010, 8:14 pm

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
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

BatterY
CJ Worshipper
CJ Worshipper
Posts: 238
Joined: January 29th, 2010, 10:27 pm

Re: How can you spawn a solid model players can't walk throu

Post by BatterY » March 12th, 2010, 8:16 pm

...some time later ive found something:

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
		}
	}
}
but there is no "Place Crate" or "Place Zombie Step" or something smiliar to that :(

back to work...

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: How can you spawn a solid model players can't walk throu

Post by Drofder2004 » March 13th, 2010, 3:15 pm

That does nothing.

I checked all the Zombie mods I could find and not even an idea of crate placing came up...
Image
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

User avatar
Rezil
Core Staff
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

Post by Rezil » March 13th, 2010, 3:16 pm

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.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: How can you spawn a solid model players can't walk throu

Post by Drofder2004 » March 13th, 2010, 3:19 pm

Rez|l wrote:I'm not sure what he wants, to spawn a model that is solid and players can't walk through it?
Yes. The object is a solid model and therefore players cannot walk through it.
Image
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

User avatar
Rezil
Core Staff
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

Post by Rezil » March 13th, 2010, 3:35 pm

Code: Select all

model = spawn("misc_model", (0,0,0));
model.angles = origin.angles; //make a script_origin somewhere
model setmodel("xmodel/bleh");
Something like that?
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.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: How can you spawn a solid model players can't walk throu

Post by Drofder2004 » March 13th, 2010, 5:44 pm

Rez|l wrote:

Code: Select all

model = spawn("misc_model", (0,0,0));
model.angles = origin.angles; //make a script_origin somewhere
model setmodel("xmodel/bleh");
Something like that?
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.
Image
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

User avatar
Rezil
Core Staff
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

Post by Rezil » March 13th, 2010, 5:54 pm

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.

User avatar
waywaaaard
Core Staff
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

Post by waywaaaard » March 13th, 2010, 6:12 pm

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
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: How can you spawn a solid model players can't walk throu

Post by Drofder2004 » March 13th, 2010, 7:55 pm

If I remember correctly, they introduced a "setbounds" command in one game. Although removed at least in CoD4...
Image
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

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: How can you spawn a solid model players can't walk throu

Post by megazor » April 11th, 2010, 11:47 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests