Page 2 of 2

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 6th, 2010, 11:53 pm
by Drofder2004
Rezil wrote:For 3. it would be quite difficult, the alpha way won't work because the arrow is one shader used for all players. Modifying it directly would affect all of your teammates as well. Ragdolls and physics in cod4 are shit because they're local, not server-side so for example if a brick is in one place on your computer, it might be in a completely different place for someone else(in theory).
3. I misread the arrow thing, To my knowledge the location of yourself is controlled behind the scripts. you can stop everyone from seeing anyone (such as DM) or remove yourself (as in all players cannot see self, as Rez said).

Indeed, the physics is local, but animations are played before the ragdoll, so the death you see from the point of standing to hitting the floor, is seen the same on all screen.

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 7th, 2010, 10:56 am
by Moustache
Thank you guys very much for the help, and the provided info. Really awesome :mrgreen:

1. The first part is fixed like this now:

Code: Select all

blackscreen_HUD()
{
	if (isDefined(self.blackscreen))
		self.blackscreen destroy();

	wait 0.05;

	self.blackscreen = newClientHudElem(self);
	self.blackscreen.x = 0;
	self.blackscreen.y = 0;
	self.blackscreen.alpha = 1;
	self.blackscreen.sort = 100;
	self.blackscreen.foreground = 1;
	self.blackscreen.alignX = "fullscreen";
	self.blackscreen.alignY = "fullscreen";
	self.blackscreen.vertAlign = "fullscreen";
	self.blackscreen.horzAlign = "fullscreen";
	self.blackscreen.hidewheninmenu = false;
	self.blackscreen setShader("black", 600, 480);
}
2. The animation and the text on the bottom left works. I need to check it if it really works for all players.

3. I will search for it when I am back from school.

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 7th, 2010, 7:40 pm
by Moustache
I couldn't find the script for the player his place on the minimap :?


And the death animation is only visible for the player himself.

I start the tread like this:

Code: Select all

level thread fake_death(self);
This is the thread:

Code: Select all

fake_death(faker)
{
	obituary(faker, faker, "none", "MOD_SUICIDE");

	ent = faker ClonePlayer(0);
	deathAnim = ent getcorpseanim();

	startFrac = 0;

	if ( animhasnotetrack( deathAnim, "start_ragdoll" ) )
	{
		times = getnotetracktimes( deathAnim, "start_ragdoll" );
		if ( isDefined( times ) )
			startFrac = times[0];
	}

	waitTime = startFrac * getanimlength( deathAnim );
	wait( waitTime );

	if ( isDefined( ent ) )
		ent startragdoll( 1 );
}

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 7th, 2010, 8:26 pm
by Drofder2004
Try using "clonePlayer(5)".

From general reading, the atrributes inside the conePlayer function are the during of the cloned played.

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 7th, 2010, 8:32 pm
by Moustache
K, thanks.
I will test it tomorrow.

I also noticed that the death animation happens every time when I spawn. But that is just a failure in my script I think. Instead of the script you have given to me.

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 7th, 2010, 10:20 pm
by Drofder2004
After reading the script, I don't think this is possible.

Playing animations is hard coded for MP.
The code for it was once used (as in destructables.gsc) but was removed and hardcoded...

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 8th, 2010, 8:02 am
by Moustache
O bugger :|

Then I need to find something else.
Nevertheless thank you for all the provided info :mrgreen:

Hmmm...
Is it possible to use a menu that is placed in the raw map of cod4 without compiling it in the fast file of the mod?

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 8th, 2010, 7:15 pm
by Drofder2004
Moustache wrote:O bugger :|

Then I need to find something else.
Nevertheless thank you for all the provided info :mrgreen:

Hmmm...
Is it possible to use a menu that is placed in the raw map of cod4 without compiling it in the fast file of the mod?
No idea, shouldnt be hard to test.

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 8th, 2010, 7:31 pm
by Rezil
Moustache wrote:Hmmm...
Is it possible to use a menu that is placed in the raw map of cod4 without compiling it in the fast file of the mod?
Not sure about menus but custom textures don't work when placed in the main folder(i.e. cod2 style) in an .iwd. I would assume the same applies to all game assets.

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 9th, 2010, 10:27 am
by Moustache
I don't want to use an modifed menu.
Just a menu that comes in the cod4 raw map.

Drofder can you help me with a test? Because I don't know much (read nothing) about menu's.

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 16th, 2010, 7:47 am
by positive
Everything that is in \raw\ is already loaded in the game if you didn't overwrite it via your .ff.
So with the function Openmenu(<menu name>); you can open any menu that is in the game by default.
All the menus that are loaded: (Don't mind the "Line: Precachemenu();", the names are game["***"] etc.)

Code: Select all

Line 18: 		precacheMenu(game["menu_callvote"]);
	Line 19: 		precacheMenu(game["menu_muteplayer"]);
	Line 31: 		precacheMenu(game["menu_eog_main"]);
	Line 32: 		precacheMenu(game["menu_eog_unlock"]);
	Line 33: 		precacheMenu(game["menu_eog_summary"]);
	Line 34: 		precacheMenu(game["menu_eog_unlock_page1"]);
	Line 35: 		precacheMenu(game["menu_eog_unlock_page2"]);
	Line 58: 		precacheMenu(game["menu_controls"]);
	Line 59: 		precacheMenu(game["menu_options"]);
	Line 60: 		precacheMenu(game["menu_leavegame"]);
	Line 63: 	precacheMenu("scoreboard");
	Line 64: 	precacheMenu(game["menu_team"]);
	Line 65: 	precacheMenu(game["menu_class_allies"]);
	Line 66: 	precacheMenu(game["menu_changeclass_allies"]);
	Line 67: 	precacheMenu(game["menu_initteam_allies"]);
	Line 68: 	precacheMenu(game["menu_class_axis"]);
	Line 69: 	precacheMenu(game["menu_changeclass_axis"]);
	Line 70: 	precacheMenu(game["menu_class"]);
	Line 71: 	precacheMenu(game["menu_changeclass"]);
	Line 72: 	precacheMenu(game["menu_initteam_axis"]);
	Line 73: 	precacheMenu(game["menu_changeclass_offline"]);
	Line 7: 	precacheMenu(game["menu_quickcommands"]);
	Line 8: 	precacheMenu(game["menu_quickstatements"]);
	Line 9: 	precacheMenu(game["menu_quickresponses"]);

Re: CoD 4 Set Next Spawn Point (origin)

Posted: September 16th, 2010, 4:43 pm
by Moustache
K thanks :)