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

Members Online

»
0 Active | 140 Guests
Online:

LATEST FORUM THREADS

»
New BF2 Mod
BF2 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: World at War
Category: CoDWW Scripting
Scripting and coding with Call of Duty: World at War.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: waittill_dead return true even when it's supposed to not do!
superpanos2
General Member
Since: Sep 1, 2011
Posts: 6
Last: Sep 26, 2013
[view latest posts]
Level 0
Category: CoDWW Scripting
Posted: Friday, Jun. 28, 2013 02:46 am
Well as the title explains the waittill_dead functin doesn't work!
In order to complete an objective, you have to kill some guys, but the waittill_dead returns true instantly and the object is comleted, even without completing it!
Any help is welcome!


Code:
first_objective() { precacheString(&"SURVIVORS_CLEAR1"); marker = getent("side_a_obj", "targetname"); //a script origin side_a_guys = GetEntArray( "side_a", "targetname" ); // spawners targetname for( i = 0; i < side_a.size; i++ ) { side_a_guys[i] DoSpawn(); } objective_add( 1, "current", &"SURVIVORS_CLEAR1", marker.origin ); objective_current(1); wait 1; waittill_dead(side_a_guys); objective_state(1, "done"); //marker delete(); thread second_objective(); }


thanks in advance
Share |
3st0nian
General Member
Since: Jan 14, 2008
Posts: 291
Last: Dec 4, 2017
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Friday, Jun. 28, 2013 03:15 am
If you use side_a_guys = GetEntArray( "side_a", "targetname" ); with spawners, it only references to spawn entities, not actors that spawn from them.
Code:

first_objective() 
{ 
	precacheString(&"SURVIVORS_CLEAR1");
	real_guys = [];//Create empty array
	marker = getent("side_a_obj", "targetname"); //a script origin 
	side_a_guys = GetEntArray( "side_a", "targetname" ); // spawners targetname 
	for( i = 0; i < side_a.size; i++ )  
		real_guys[i] = side_a_guys[i] DoSpawn(); //Make reference to actors that spawn from these spawners
 
	objective_add( 1, "current", &"SURVIVORS_CLEAR1", marker.origin ); 
	objective_current(1); 
	wait 1; 
	waittill_dead(real_guys); 
	objective_state(1, "done"); 
	//marker delete(); 
	thread second_objective(); 
}

or you can use
real_guys = get_living_ai_array("side_a", "targetname");
waittill_dead(real_guys);
Dont know though, if that function exists in WaW.
Share |
superpanos2
General Member
Since: Sep 1, 2011
Posts: 6
Last: Sep 26, 2013
[view latest posts]
Level 0
Category: CoDWW Scripting
Posted: Friday, Jun. 28, 2013 05:45 am
ty for the help, I didn't know that...
Anyway... I didn't test if it works now, but the function
get_living_ai_array DOES work.(Referenced in maps/_utility.gsc)

edited on Jun. 28, 2013 05:47 am by superpanos2
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty: World at War : CoDWW 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

»