Page 2 of 3

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

Posted: April 11th, 2010, 2:32 pm
by Drofder2004
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.

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

Posted: April 11th, 2010, 4:40 pm
by Uzumakibro93
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...

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

Posted: April 11th, 2010, 5:17 pm
by Drofder2004
We are talking CoD1. Two different engines entirely.

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

Posted: April 16th, 2010, 10:01 pm
by xeno
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).

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

Posted: April 17th, 2010, 12:29 am
by Drofder2004
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.

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

Posted: April 17th, 2010, 5:39 am
by xeno
Aww :(, not even a clue :)

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

Posted: April 17th, 2010, 10:55 am
by waywaaaard
Easy: use finishplayerdamage and use the angle from below the player or radiusdamage on the player in a loop

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

Posted: June 18th, 2010, 4:50 am
by bopey
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 );

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

Posted: June 18th, 2010, 10:14 am
by MasterThomy
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 )

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

Posted: June 18th, 2010, 10:55 pm
by bopey
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

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

Posted: June 19th, 2010, 9:45 pm
by MasterThomy
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...

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

Posted: June 21st, 2010, 8:54 pm
by BatterY
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();
	}
}

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

Posted: June 21st, 2010, 9:56 pm
by Drofder2004
UO has a "spawn solid" style script somewhere, but it is UO only...

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

Posted: June 21st, 2010, 10:20 pm
by BatterY
I'll contact BraX when I see him online on xfire.

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

Posted: June 22nd, 2010, 11:58 am
by Uzumakibro93
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.