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

Members Online

»
0 Active | 82 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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: 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 10: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 11: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 11: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: Saturday, Aug. 18, 2012 01:05 am
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 10: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 09:53 am
Call the init() in that same objpoints file before doing anything.
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

»