Author |
Topic: SP Objectives & AI spawning. |
65kawasaki |
General Member Since: Nov 15, 2013 Posts: 73 Last: Sep 19, 2017 [view latest posts] |
|
|
|
sgt.hawkins |
General Member Since: Apr 12, 2013 Posts: 122 Last: Nov 28, 2016 [view latest posts] |
|
|
|
65kawasaki |
General Member Since: Nov 15, 2013 Posts: 73 Last: Sep 19, 2017 [view latest posts] |
|
|
|
antonio.horvatovic0 |
General Member Since: Jan 31, 2014 Posts: 225 Last: Jul 14, 2017 [view latest posts] |
|
|
Category: CoD2 SP Mapping Posted: Wednesday, Oct. 15, 2014 02:58 pm |
|
http://modsonline.com/Tutorials-read-616.html
You can use this for objectives, it worked for me( both CoD2 and Cod4).
As for the trigger spawn. You need to create a trigger multiple and add targetname of flood_and_secure to it. Then select you AI and tick the spawner box and add them the count of 4 or 5 or as whatever you wish. Connect the trigger with the AI and it should work. |
|
|
|
65kawasaki |
General Member Since: Nov 15, 2013 Posts: 73 Last: Sep 19, 2017 [view latest posts] |
|
|
|
antonio.horvatovic0 |
General Member Since: Jan 31, 2014 Posts: 225 Last: Jul 14, 2017 [view latest posts] |
|
|
Category: CoD2 SP Mapping Posted: Wednesday, Oct. 15, 2014 08:33 pm |
|
As for the defending time...you can make a trigger(name it Obj_defend ) multiple and when you trigger it you wait for 180 seconds(3 minutes) until objective is completed.
On paper, it looks like this(havent tested)
obj0()
{
obj0=getent("Obj_defend ","targetname");
objective_add(1,"active",&"OMAHA_OBJ0",(3672, -800, 24));//you need to change this one to suit your LOCALIZEDSTRINGS
objective_current(1);
wait(180);
objective_state(1,"done");
obj0 delete();
wait(2);
SaveGame("");
thread obj1();
}
edited on Oct. 15, 2014 01:34 pm by antonio.horvatovic0 |
|
|
|
65kawasaki |
General Member Since: Nov 15, 2013 Posts: 73 Last: Sep 19, 2017 [view latest posts] |
|
|
|
antonio.horvatovic0 |
General Member Since: Jan 31, 2014 Posts: 225 Last: Jul 14, 2017 [view latest posts] |
|
|
Category: CoD2 SP Mapping Posted: Thursday, Oct. 16, 2014 05:39 pm |
|
http://modsonline.com/Forums-top-146955.html
This should help..just copy this before 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 = 180;
level.timer.label = &"STRINGS_HOUSE_DEFEND_TIMER_NEXT";//You need to define this in your LOCALIZEDSTRINGS
level.timer setTimer(total_time);
wait total_time;
level.timer destroy();
// |
|
|
|
65kawasaki |
General Member Since: Nov 15, 2013 Posts: 73 Last: Sep 19, 2017 [view latest posts] |
|
|
Category: CoD2 SP Mapping Posted: Thursday, Oct. 16, 2014 06:07 pm |
|
It works :)
Now i want to make obj: Get a Panzerschreck.
I found one tutorial for CoD4 about objective Get a Javelin .
its the same so i tried it with panzerschreck.
It works but its not good i think.
Here is my remaked script for this obj.
It´s something wrong here ?
It write me an error ( uninitialised variable ´obj2´ ) i think it mean this line.
obj2 waittill (!level.player hasweapon("panzerschreck"));
So what´s wrong ?
obj2()
{
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();
}
edited on Oct. 16, 2014 11:07 am by 65kawasaki
edited on Oct. 16, 2014 11:08 am by 65kawasaki |
|
|
|
antonio.horvatovic0 |
General Member Since: Jan 31, 2014 Posts: 225 Last: Jul 14, 2017 [view latest posts] |
|
|
Category: CoD2 SP Mapping Posted: Thursday, Oct. 16, 2014 06:32 pm |
|
obj2()
{
objective_add(2,"active",&"OMAHA_OBJ0",(x, y, z));//you need to change this one to suit your LOCALIZEDSTRINGS and the x, y, z is the position of the weapon
objective_current(2);
obj2 waittill (!level.player hasweapon("panzerschreck"));
objective_state(2,"done");
obj2 delete();
wait(2);
SaveGame("");
//thread obj3();uncomment this to start the next objective
}
|
|
|
|