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

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 » April 11th, 2010, 2:32 pm

megazor wrote: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.
I think the intention was not to stop them but to add something, they can jump onto.
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
Uzumakibro93
CJ Newbie
CJ Newbie
Posts: 61
Joined: April 6th, 2010, 11:56 pm
PSN ID: uzumakibro93
Location: Simpsonville, South Carolina
Contact:

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

Post by Uzumakibro93 » April 11th, 2010, 4:40 pm

I remember BraX being able to do this with CoD 4, perhaps we can contact him and get the scripts? He made custom models that were colliding, replacing all the old models that he needed to use, though...
Image

I've worked until I have been driven insane. And then I kept working. The only thing I need to know is, exactly who are those people talking to me in my head? And why do they want me to kill you?

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 » April 11th, 2010, 5:17 pm

We are talking CoD1. Two different engines entirely.
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 throu

Post by xeno » April 16th, 2010, 10:01 pm

Superjump and spawning solid models

Ok, in Brax's zombie mod I've now seen two things I thought
weren't possible. The spawning a solid model under a player (the
zombie's spawning boxes under themselves to get to weird places) and
the 'super-jump', which is just a normal jump but higher.

I've been able to do a warped version of superjump that spawns a
model, links player to model, then shifts the model in a particular
direction - but it's not very smooth, and the player can easily get
stuck in buildings and what-not.

The super-jump in Brax's mod works perfect - it's just like a normal
jump, you don't go through solid object but bounce off them.

I've been trying to get ahold of Brax to get a glimpse at how he did
this, but am having trouble doing so... so I'd thought I'd post in
these forums and see if you guys have any ideas as to how he did this
(or perhaps battery will respond, I know he has access to the
server-side files for the brax zombie mod).
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 throu

Post by Drofder2004 » April 17th, 2010, 12:29 am

xeno wrote:Superjump and spawning solid models

Ok, in Brax's zombie mod I've now seen two things I thought
weren't possible. The spawning a solid model under a player (the
zombie's spawning boxes under themselves to get to weird places) and
the 'super-jump', which is just a normal jump but higher.

I've been able to do a warped version of superjump that spawns a
model, links player to model, then shifts the model in a particular
direction - but it's not very smooth, and the player can easily get
stuck in buildings and what-not.

The super-jump in Brax's mod works perfect - it's just like a normal
jump, you don't go through solid object but bounce off them.

I've been trying to get ahold of Brax to get a glimpse at how he did
this, but am having trouble doing so... so I'd thought I'd post in
these forums and see if you guys have any ideas as to how he did this
(or perhaps battery will respond, I know he has access to the
server-side files for the brax zombie mod).
The jump is done by using explosive boosting. Lev has done this in one of his maps (unreleased?), so I wont be posting any code for that for now.
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 throu

Post by xeno » April 17th, 2010, 5:39 am

Aww :(, not even a clue :)
Image

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 » April 17th, 2010, 10:55 am

Easy: use finishplayerdamage and use the angle from below the player or radiusdamage on the player in a loop
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:

bopey
CJ Wannabe
CJ Wannabe
Posts: 2
Joined: June 18th, 2010, 4:42 am

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

Post by bopey » June 18th, 2010, 4:50 am

heres a hint for the supper jump lol and a huge one hope matty doesnt read these forums
self thread Callback_PlayerDamage( self, self, damage, 0, "SUPERJUMP", "jump", self.origin, AnglesToForward( self GetPlayerAngles() ) + ( 0,0,0.35 ), "torso_upper", 0 );

User avatar
MasterThomy
CJ Wannabe
CJ Wannabe
Posts: 42
Joined: December 23rd, 2008, 5:14 pm

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

Post by MasterThomy » June 18th, 2010, 10:14 am

About solid models...(I heard this from someone else btw)

You can't actually spawn models that are solid, you can only create POINTS that are solid.
Here's a code for that:

Code: Select all

 
soliddot = spawn( "script_origin", self.origin+(0,0,30));
soliddot setcontents(1);
soliddot solid();
So you can actually make up a model with dots like these...however there's a limit of spawns :( (curse you CoD2 limits! :x )
Ex CoD2 mapper/modder.

bopey
CJ Wannabe
CJ Wannabe
Posts: 2
Joined: June 18th, 2010, 4:42 am

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

Post by bopey » June 18th, 2010, 10:55 pm

for cod2
soliddot setcontents(1);
wouldntnot help you its all about the model and how you build it in asset manger not the script its self

User avatar
MasterThomy
CJ Wannabe
CJ Wannabe
Posts: 42
Joined: December 23rd, 2008, 5:14 pm

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

Post by MasterThomy » June 19th, 2010, 9:45 pm

Ok, I experimented a little and found this:

Code: Select all

solidsphere = spawn( "trigger_radius", self.origin,0,100,100);
solidsphere setcontents(1);
You can spawn a solid (and also bullet stopping) sphere with 100 radius (it can't be a cilinder though).
It's perfect for blocking paths (btw I'm gonna use this in my PJ mod update..), so I'm pretty sure this is what you were searching for...
Ex CoD2 mapper/modder.

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 » June 21st, 2010, 8:54 pm

xeno wrote:Aww :(, not even a clue :)
from CoD:UO

Script by OPPDelta

Code: Select all

main()
{


	level._effect["fire"] = loadfx ("fx/explosions/fireball1_em.efx");


	start = getentarray ("DBK_freefallstart","targetname");
	for(i = 0; i < start.size; i++) 
	{
		start[i] thread fromCenter();
	}

	
}

fromCenter()
{
	while (1)
	{
		self waittill ("trigger",player);
		playerlink = spawn("script_model",player.origin);
		player linkto (playerlink);
		player iprintln("Try to land on a highlighted sqaure when you fall!");
		wait(1);
		player iprintlnbold("You are about to be launched, in...");
		wait(2);
		player iprintlnbold("^13");
		wait(1);
		player iprintlnbold("^22");
		wait(1);
		player iprintlnbold("^41");
		wait(1);
		player shellshock("melee", 2);
		playerlink movegravity ((0,0,5000), 4);
		for(i = 0; i < 70; i++)
			{ 
				playfx(level._effect["fire"], player.origin);
				wait 0.05;
			}
		wait 0.35;
		
		player unlink();
	}
}

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 » June 21st, 2010, 9:56 pm

UO has a "spawn solid" style script somewhere, but it is UO only...
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

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 » June 21st, 2010, 10:20 pm

I'll contact BraX when I see him online on xfire.

User avatar
Uzumakibro93
CJ Newbie
CJ Newbie
Posts: 61
Joined: April 6th, 2010, 11:56 pm
PSN ID: uzumakibro93
Location: Simpsonville, South Carolina
Contact:

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

Post by Uzumakibro93 » June 22nd, 2010, 11:58 am

Why not do a decent workaround: Force Highlod? It's fairly simple, you get the xmodel_exporter and export to obj, then import in milkshape3d and export as an xmodel_export and then create a new assman compilation gdt and run though it with a simple force highlod. This SHOULD, in theory, work. I've never tried it in a mod though, should be perfect from what I've heard. And I'll also ask BraX if I see him on, he helps me whenever I have problems that Nightmare can't help with.
Image

I've worked until I have been driven insane. And then I kept working. The only thing I need to know is, exactly who are those people talking to me in my head? And why do they want me to kill you?

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests