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

Members Online

»
0 Active | 50 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
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Objective Problem
predieanalien
General Member
Since: Dec 16, 2004
Posts: 19
Last: Apr 27, 2008
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Sunday, Oct. 30, 2005 06:50 pm
Hi, ive been trying to add a 2nd obj. but every time the game has it marked already off. here is the script. (its obj2)

Code:

main()
{
maps\_load::main();
maps\_truck::main();
maps\_tiger_gmi::main();

        setCullFog (0, 3000, .30, .30, .37, 0);
           
         level.player takeallweapons();
         level.player setViewmodel( "xmodel/viewmodel_hands_uswinter" );
precacheshader("black");
precacheShellshock("default");
precacheModel("xmodel/vehicle_tank_tiger");
precachemodel("xmodel/vehicle_tank_tiger_camo_d");
precacheturret("mg42_tiger_tank");
precacheModel("xmodel/vehicle_tank_panzeriv_machinegun");

thread snow();  
thread message();
thread message2();
thread truck_guys();
thread obj1();
thread intro_screen();
thread tiger1();

level waittill ("finished intro screen");
}


message()
{
trigger = getent ( "message1_trig","targetname");
trigger waittill ("trigger");
 
        iprintlnbold("TOWN3_LINE1");

}

obj1()
{
obj1 = getent("obj1_trig", "targetname");
        objective_add(1, "active", &"TOWN3_OBJ1", (768.0,216.0,-48.0));
objective_current(1);
 obj1 waittill("trigger");
 objective_state(1, "done");

thread obj2();

}

snow()
{
 level.snoweffect = loadfx("fx/weather/snowfallfor5seconds.efx");
snowmitters = getentarray("snowmitter","targetname");
delay = 5;
initialoffset = 0;
for(i=0;i<snowmitters.size;i++)
{
 snowmitters[i] thread snowblow(delay,initialoffset);
 if(initialoffset < 5)
 {
  initialoffset += .2;
 }
 else
  initialoffset = 0;
 
}
}

snowblow(delay,initialoffset)
{
wait initialoffset;
while(1)
{
 playfx (level.snoweffect,self.origin);
 wait delay;
}

}

message2()
{
trigger = getent ( "message2_trig","targetname");
trigger waittill ("trigger");
 
        iprintlnbold("TOWN3_LINE2");

}

truck_guys()
{
	trucktrig = getent ( "truck_trigger","targetname");
	trucktrig waittill ("trigger");

	truck = getent ( "truck1","targetname");
	path = getVehicleNode (truck.target,"targetname");
	truck attachpath(path);
	truck maps\_truck::init();
	truck maps\_truck::attach_guys();
	truck startPath();
	truck waittill ("reached_end_node");
	truck notify ("unload");
}

intro_screen()
{

precacheString(&"TOWN3_PLACE");
precacheString(&"TOWN3_DATE");
precacheString(&"TOWN3_TIME");
maps\_introscreen::introscreen(&"TOWN3_PLACE", &"TOWN3_DATE", &"TOWN3_TIME");

}

tiger1()
{
trigger = getent ( "tiger1_trig","targetname");
trigger waittill ("trigger");

tank = getent ( "tiger1","targetname");
path = getVehicleNode ("tiger1_start","targetname");
tank attachpath(path);
tank maps\_tiger_gmi::init();

tank startPath();
tank waittill ("reached_end_node");

}

obj2()
{
obj2 = getent("obj2_trig", "targetname");
        objective_add(2, "active", &"TOWN3_OBJ2", (5552.0,-1296.0,-32.0));
objective_current(2);
 obj2 waittill("trigger");
 objective_state(2, "done");


}


edited on Oct. 30, 2005 01:50 pm by predieanalien
Share |
andyuk666
General Member
Since: Apr 12, 2004
Posts: 74
Last: Jan 19, 2009
[view latest posts]
Level 3
Category: CoDUO Mapping
Posted: Sunday, Oct. 30, 2005 07:14 pm
Correct me if i'm wrong but shouldn't




thread obj2();


be somewhere up by these?


thread snow();
thread message();
thread message2();
thread truck_guys();
thread obj1();
thread intro_screen();
thread tiger1();

like i said correct me if i'm wrong not all that good at all this
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoDUO Mapping
Posted: Sunday, Oct. 30, 2005 08:19 pm
obj2(); gets called at the end of obj1();. That way obj2 won't appear on the radar until obj1 is cleared.

As for the problem..

Does your first objective act normally? If so maybe you made a mistake with naming your second objective trigger?
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Sunday, Oct. 30, 2005 08:25 pm
}(this thing)

obj2()
{
obj2 = getent("obj2_trig", "targetname");
objective_add(2, "active", &"TOWN3_OBJ2", (5552.0,-1296.0,-32.0));
objective_current(2);
obj2 waittill("trigger");
objective_state(2, "done");


}

I might be wrong but I don't think u need that first bracket or whatever its called. I mgiht be wrong though I am not great at scripting.

edited on Oct. 30, 2005 03:25 pm by Ace008
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoDUO Mapping
Posted: Sunday, Oct. 30, 2005 08:38 pm
that first } is the closure of the function before it, tiger1().
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Monday, Oct. 31, 2005 01:38 am
Oh ok I see that now. Man I wish I were better at scripting. [cry]
Share |
predieanalien
General Member
Since: Dec 16, 2004
Posts: 19
Last: Apr 27, 2008
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Monday, Oct. 31, 2005 01:46 pm
Yes the first obj acts normally.
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoDUO Mapping
Posted: Monday, Oct. 31, 2005 02:17 pm
In the tutorial about adding objectives, there is a 2 second wait (wait (2); ) before calling the obj2() thread. Maybe that might work.
Share |
Yorkshire-Rifles
General Member
Since: Mar 16, 2005
Posts: 272
Last: Apr 19, 2008
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Tuesday, Nov. 1, 2005 12:18 am
Just a thought but you've got both cod and coduo map folders loaded.

maps\_load::main(); ----- for cod
maps\_truck::main(); ----- for cod
maps\_tiger_gmi::main(); ----- for coduo

try

maps\_load_gmi::main();
maps\_truck_gmi::main();
maps\_tiger_gmi::main();

I think that all of the .gsc files for handling elements have been redone by Grey Matter to work together so if you have a _tiger_gmi you'll need a _load_gmi for all the major files.

As I said this is "just a thought" and might not be "gospel".
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

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

»