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

Members Online

»
0 Active | 8 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 SP Mapping
Call of Duty 2 single player mapping, scripting and everything single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
Author Topic: SP Objectives & AI spawning.
65kawasaki
General Member
Since: Nov 15, 2013
Posts: 73
Last: Sep 19, 2017
[view latest posts]
Level 3
Category: CoD2 SP Mapping
Posted: Friday, Oct. 17, 2014 04:29 pm
Still the same error. Uninitialised variable ´obj2´ [confused]
Share |
65kawasaki
General Member
Since: Nov 15, 2013
Posts: 73
Last: Sep 19, 2017
[view latest posts]
Level 3
Category: CoD2 SP Mapping
Posted: Friday, Oct. 17, 2014 04:35 pm
Should i write something in weapon (panzerschreck ) entity window ?
I wrote there Key: targetname
Value: obj2
Is there something else that i must write in ? [confused]
Share |
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Oct. 17, 2014 05:05 pm
Name the panzerschreck "panz" and add this at the top after calling the obj2 thread:
it should go

obj2
{
obj2=getent("panz ","targetname");
.............then the rest here

...can you maybe post you script here?

edited on Oct. 17, 2014 10:09 am by antonio.horvatovic0
Share |
65kawasaki
General Member
Since: Nov 15, 2013
Posts: 73
Last: Sep 19, 2017
[view latest posts]
Level 3
Category: CoD2 SP Mapping
Posted: Friday, Oct. 17, 2014 05:36 pm
Thanks , it works [casanova]
But now another "error"
When i get new objective = Get a Panzerschreck. it right writes me objective completed ( i dont get the panzerschreck ). [cry]

It dont wait till i have the panzerschreck.
Share |
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Oct. 17, 2014 06:26 pm
Please post your script here or PM me so I can be 100% sure what's wrong, and it will be faster :D
Share |
65kawasaki
General Member
Since: Nov 15, 2013
Posts: 73
Last: Sep 19, 2017
[view latest posts]
Level 3
Category: CoD2 SP Mapping
Posted: Friday, Oct. 17, 2014 06:40 pm
obj2()
{
obj2 = getent("obj2","targetname");
objective_add(2,"active",&"NOYERS_NOYERS_PANZERSCHRECK",( -665, -22, 45));
objective_current(2);
obj2 waittill (!level.player hasweapon("panzerschreck"));
objective_state(2,"done");
obj2 delete();
}

This is the whole script for this Objective ...
It dont wait till i get the Panzerschreck. [lol]
Btw ... the timer is working [casanova]


Share |
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Oct. 17, 2014 06:42 pm
I've meant the whole script[wink]
Share |
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Oct. 17, 2014 06:47 pm
Try tu put obj2 waittill (level.player hasweapon("panzerschreck"));
instead of obj2 waittill (!level.player hasweapon("panzerschreck"));
The difference is the ! sign :D

edited on Oct. 17, 2014 11:47 am by antonio.horvatovic0
Share |
65kawasaki
General Member
Since: Nov 15, 2013
Posts: 73
Last: Sep 19, 2017
[view latest posts]
Level 3
Category: CoD2 SP Mapping
Posted: Friday, Oct. 17, 2014 06:52 pm
No, it don´t work ...
Here is the script


#include maps\_utility;
#include maps\_anim;
#using_animtree("generic_human");

main() // Hlavni torzo skriptu
{
maps\_load::main(); // Spousti dulezite funkce pro beh SP mapy
maps\noyers_fx::main();

ambientPlay("ambient_noyers");

thread setupplayer(); // Spusteni nastaveni hrace
thread obj1();

////PRECACHE////

precacheshader("black"); // Nacteni cerne obrazovky
precacheString(&"NOYERS_INTRO_1"); // Titulek (nazev) mapy (napr. Ani krok zpet)
precacheString(&"NOYERS_INTRO_2"); // Misto, kde se mapa odehrava (napr. Rusko)
precacheString(&"NOYERS_INTRO_3"); // Cas, kdy se mapa odehrava (napr. September 1942)
precacheString(&"NOYERS_INTRO_4");

precacheModel( "xmodel/weapon_panzerschreck" );
preCacheItem( "panzerschreck" );
precachestring( &"NOYERS_NOYERS_DEFEND1" );
precachestring( &"NOYERS_NOYERS_PANZERSCHRECK" );

// Timto prikazem se nastavi uvodni obrazovka po nacteni mapy
maps\_introscreen::introscreen_delay(&"NOYERS_INTRO_1", &"NOYERS_INTRO_2", &"NOYERS_INTRO_3", &"NOYERS_INTRO_4");

}

setupplayer() // Nastaveni hrace
{
level.player takeallweapons(); // Sebrani vsech zbrani (pokud se hrala predtim nejaka jina mapa)

level.player giveWeapon("binoculars");

level.player giveWeapon("m1garand"); // Primarni zbran
level.player giveWeapon("colt"); // Sekundarni zbran
level.player giveWeapon("mk1britishfrag"); // Rucni granat
level.player giveWeapon("smoke_grenade_american"); // Dymovy granat

level.player switchToWeapon("m1garand"); // Prepnuti primarni zbrane do ruky
level.player switchToOffhand("mk1britishfrag"); // Nastaveni aktivniho granatu

}

obj1()
{

obj1 = getent("obj1","targetname");
objective_add(1,"active",&"NOYERS_NOYERS_DEFEND1",(-544, -320, 32));
objective_current(1);

level.hudTimerIndex = 20;

level.timer = newHudElem();
level.timer.alignX = "left";
level.timer.alignY = "middle";
level.timer.horzAlign = "right";
level.timer.vertAlign = "top";
if(level.xenon)
{
level.timer.fontScale = 2;
level.timer.x = -225;
}
else
{
level.timer.fontScale = 1.6;
level.timer.x = -180;
}
level.timer.y = 100;
level.timer.label = &"NOYERS_DEFEND_TIMER";//You need to define this in your LOCALIZEDSTRINGS
level.timer setTimer(20);
wait (20);

level.timer destroy();

objective_state(1,"done");
obj1 delete();
wait(2);

thread obj2();
}

obj2()
{
obj2 = getent("obj2","targetname");
objective_add(2,"active",&"NOYERS_NOYERS_PANZERSCHRECK",( -665, -22, 45));
objective_current(2);
obj2 waittill (!level.player hasweapon("panzerschreck"));
objective_state(2,"done");
obj2 delete();
}

Share |
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Friday, Oct. 17, 2014 06:54 pm
Have you tryed to remove the ! sign?
Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 SP 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

»