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

Members Online

»
1 Active | 27 Guests
Online:

LATEST FORUM THREADS

»
Rainbow HELP....
CoD4 MP Mapping
help pls
CoD2 Scripting

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, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Objpoints which has its origin
Moczulak
General Member
Since: Mar 30, 2009
Posts: 77
Last: Apr 8, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Aug. 17, 2012 03:25 pm
Hey i have problem..

This is my script:

Code:
b()
{
	for(;;)
	{
		array = [];
		obj = array[0];
		
		array[0].origin = (785, 289, 12);
		
		thread maps\mp\gametypes\_objpoints::addTeamObjpoint(obj.origin, "allies", "objpoint_A");
	}
}


It is not work..
What can I do to work objpoints [confused]
I want to put on the map "objpoints" in a certain place...

Please help me [ohwell]
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Friday, Aug. 17, 2012 04:30 pm
If i tell you that:

z=x

and x=5

and you cannot read backwards and cannot adjust any known vars

You wouldnt know the value of Z.

Now, read your script again.
Share |
Moczulak
General Member
Since: Mar 30, 2009
Posts: 77
Last: Apr 8, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Aug. 17, 2012 04:55 pm
I improved my script:

Code:
b()
{
	level.obj_origin = [];
	level.obj_origin[0].origin = (785, 289, 12);

	for(n = 0; n < level.obj_origin.size; n++)
	{
		thread maps\mp\gametypes\_objpoints::addTeamObjpoint(level.obj_origin[n].origin, "allies", "objpoint_A");
	}
}


And i see this error:

******* script runtime error *******
undefined is not a field object: (file 'files/maps/mp_toujane.gsc', line 222)
level.obj_origin[0].origin = (785, 289, 12);
*
called from:
(file 'files/maps/mp_toujane.gsc', line 18)
thread b();
*
called from:
(file 'maps/mp/mp_toujane.gsc', line 3)
thread files\maps\mp_toujane::main();
*
started from:
(file 'maps/mp/mp_toujane.gsc', line 1)
main()
*
************************************
Sys_Error: Error during initialization:
script runtime error
(see console for details)
(file 'maps/mp/mp_toujane.gsc', line 1)


Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Friday, Aug. 17, 2012 06:05 pm
level.obj_origin[0]=spawnstruct();
level.obj_origin[0].origin=(coordinates here);
Share |
Moczulak
General Member
Since: Mar 30, 2009
Posts: 77
Last: Apr 8, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Saturday, Aug. 18, 2012 03:16 am
Is still the same error:

Code:
b()
{
	level.obj_origin = [];
	level.obj_origin[0] = spawnStruct();
	level.obj_origin[0].origin = (785, 289, 12);

	for(n = 0; n < level.obj_origin.size; n++)
	{
		thread maps\mp\gametypes\_objpoints::addTeamObjpoint(level.obj_origin[n].origin, "allies", "objpoint_A");
	}
}


And error:

******* script runtime error *******
undefined is not a field object: (file 'maps/mp/gametypes/_objpoints.gsc', line 108)
for(i = 0; i <> objpoints.array.size; i++)
*
called from:
(file 'files/maps/mp_toujane.gsc', line 227)
thread maps\mp\gametypes\_objpoints::addTeamObjpoint(level.obj_origin[n].origin, "allies", "objpoint_A");
*
called from:
(file 'files/maps/mp_toujane.gsc', line 18)
thread b();
*
called from:
(file 'maps/mp/mp_toujane.gsc', line 3)
thread files\maps\mp_toujane::main();
*
started from:
(file 'maps/mp/mp_toujane.gsc', line 1)
main()
*
************************************
Sys_Error: Error during initialization:
script runtime error
(see console for details)
(file 'maps/mp/mp_toujane.gsc', line 1)
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Sunday, Aug. 19, 2012 02:53 am
Call the init() in that same objpoints file before doing anything.
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Why console gaming is dying
Quote:Consider this: Dedicated gaming sales — including living-room consoles...
Devs: Games are being dumb...
Click 'read more' to view the contents of this post.
Loadout
Gun Crafting to the Max. edited on Sep. 25, 2012 06:57 pm by Morp...
Introducing the Source Fil...
Surprised this wasn't made a long time ago. Sounds like a nice little feature.
Introducing the Source Fil...
The Source Filmmaker (SFM) is the movie-making tool built and used by us he...

Partners & Friends

»