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

Members Online

»
0 Active | 64 Guests
Online:

LATEST FORUM THREADS

»
Unity Vacant Remake
CoD4 MP Mapping
COD 4 Compile Error
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 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 subscribe
Author Topic: Kill a German Mortar Crew then let level proceed?
Centauri
General Member
Since: Jun 23, 2018
Posts: 2
Last: Jun 30, 2018
[view latest posts]
Level 0
Category: CoD2 SP Mapping
Posted: Saturday, Jun. 30, 2018 01:34 pm
attachment: image(639.0Kb)
So I want the player to kill a German Mortar Crew made up of 2 guys and then complete the objective allowing the level to progress, how would I do that? [confused] Here is a section of my .gsc file.


obj1()
{

objective_add(1, "current", &"SAND_OBJ0",getent("obj1","targetname").origin); //add obj.

objective_current(1); //current objective

mortar_crew = getentarray ("mortar_crew", "targetname");

{
for (i=2;i mortar_crew[2] waittill ("death");

}


objective_state(1, "done");

}

the only problem is, the objective comes up but then automatically says objective completed. Check the attachment I have up top ^
Share |
rr016
General Member
Since: Aug 13, 2016
Posts: 70
Last: Aug 26, 2018
[view latest posts]
Level 3
Category: CoD2 SP Mapping
Posted: Tuesday, Jul. 3, 2018 09:38 am
Yeah, it doesn't work like that with the for() loop. First go in radiant and select the mortar crew you want dead. They go to the entity window (press n) and give them all a key: script_aigroup and value: (whatever you want, maybe "obj1" for your case). Compile the map and now for the script.

It should look something like this:

obj1()
{
objective_add(1, "current", &"SAND_OBJ0",getent("obj1","targetname").origin);
objective_current(1);

obj1 = getentarray ("obj1", "targetname");
waittill_aigroupcleared("obj1");

objective_state(1, "done");
}
Share |
Restricted Access Topic is Locked 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

»