Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 9 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Scripting A Conversation While Frozen?
s6robi
General Member
Since: Jun 12, 2006
Posts: 85
Last: Feb 18, 2021
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Saturday, Sep. 26, 2009 11:56 pm
Hello Everyone,
I have been working call of duty scripting and editing tools for a little while(off and on for about 3 years). I am in a stump though. I am trying to script a conversation between friendly AI. I have recorded my own voice and what I want to happen is have a friendly AI(Commanding Ofiicer) give me the layout of my mission once the loading screen disappears. I want my player to be frozen in place until the friendly AI is done talking. I have looked for tutorials helping me with this but the only thing that comes close is the original COD tut. that you have to run into a script you made for the friendly AI. I have successfully done this and it works but I dont want to do this anymore. I want to be able to listen to someone tell me an order once i start up my map and have me be frozen and forced to listen to his order.

If anyone has any tips on how I may be able to do this please reply back to me.

Thank you for your time,
s6robi.
Share |
starkk
General Member
Since: Aug 8, 2008
Posts: 216
Last: Apr 5, 2012
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Sunday, Sep. 27, 2009 03:14 am
Make it so player cant move in cod4 and codwaw would be

freezecontrols_all( true );

to make it so player couldnt move

freezecontrols_all( false );

make it so he could move again

Should be the same in cod2
Share |
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Sunday, Sep. 27, 2009 04:20 am
Spawn a script_origin and link the player to it. The player will still be able to look around, just not move.
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Monday, Sep. 28, 2009 12:52 am
freezecontrols_all is a utility function for cod5 coop. it performs the parser function freezecontrols on all clients:

Code:
freezecontrols_all( toggle, delay )
{
	if( IsDefined( delay ) )
	{
		wait( delay );
	}

	players = get_players(); 
	
	for( i = 0; i < players.size; i++ )
	{
		players[i] FreezeControls( toggle ); 
	}
}


use [entity] freezecontrols([true/false] ); in other CoD versions


clanhelio's suggestion:

// assuming "player" as the player entity
org = spawn("script_origin", player getorigin());
org.angles = player getplayerangles();
player linkto(org);

// do stuff here

player unlink();
org delete();
Share |
s6robi
General Member
Since: Jun 12, 2006
Posts: 85
Last: Feb 18, 2021
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, Sep. 28, 2009 03:21 am
Thank you all so much! This is exactly what I wanted and it has helped me out greatly.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»