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

Members Online

»
0 Active | 45 Guests
Online:

LATEST FORUM THREADS

»
Light grid issue
CoD4 MP 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 4
Category: CoD4 SP Mapping
CoD 4 mapping and level design for single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Spawn guy won't go to goalnode
gunrock
General Member
Since: Oct 30, 2004
Posts: 172
Last: Oct 3, 2018
[view latest posts]
Level 4
Category: CoD4 SP Mapping
Posted: Wednesday, Oct. 3, 2018 12:34 pm
My problem is that my one of my enemy a.i actor won't go to the goal node
that i placed for him. the player triggers 3 bad guys who ride in a russian uaz jeep the 3rd guy is suppose to get out and go right to his goal node but he sits there[confused]

There are plenty of path nodes spread about and i tested one of my hero actor
to go to that goal node and he does without any problems. so it's not a pathfinding issue. perhaps vehicle spawn group have that problem?

Connect_path is checked mark in the level compiling option and i double checked the spelling in my map scripts
////////////////////////////////////////////////////////////////////////////////////////////////////

iprintln("i move to inside housa");

level.house_guy = getent( "house_guy", "script_noteworthy" );/////the bad guy
level.house_guy setgoalnode (getnode("house_guy_point1", "targetname"));///// he not going to this.
level.house_guy.bravery = 50000 ;
level.house_guy.goalradius = 12;

please help!

Share |
JerryALT
General Member
Since: Oct 5, 2018
Posts: 5
Last: Nov 27, 2018
[view latest posts]
Level 0
Category: CoD4 SP Mapping
Posted: Friday, Oct. 5, 2018 11:23 am
Maybe this will help.

//Hero init
level.house_guy = get_living_ai( "house_guy", "script_noteworthy" );

//Getnode init
house_guy_point1= getnode ("house_guy_point1", "targetname");
level.house_guy setgoalnode(house_guy_point1);// Moving to getnode

And the console does not give any errors?

P.S : I made special module map (Google Disk)

Good luck with map

edited on Oct. 6, 2018 02:11 pm by JerryALT
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 530
Last: Oct 17, 2018
[view latest posts]
Level 6
Category: CoD4 SP Mapping
Posted: Sunday, Oct. 7, 2018 06:20 am
The AI is spawned with vehicle, which is already making the defining process of him difficult.
You did getent on the AI but that won't work this way and not with script noteworthy.
I personally had this same issue with Rooftops 1 but I didn't solve it cuz it wasn't necessary at that part.
What I see in your code is that you give the AI some settings AFTER you tell him to go to the node. The setgoalradius must be set BEFORE you tell him to go to the node. Also what does bravery do? I've never seen it in COD before. Finally, when you want to define an AI from the script_noteworthy try using get_living_ai instead of getent just like our friend JerryALT suggested.

So to sum up, here's a code I would suggest.

Code:
level.house_guy = get_living_ai( "house_guy", "script_noteworthy" );
level.house_guy.bravery = 50000 ;
level.house_guy.goalradius = 12;
//Wait until he is out of the vehicle. I don't know what else you have in script to check this.
level.house_guy setgoalnode (getnode("house_guy_point1", "targetname"));


Share |
JerryALT
General Member
Since: Oct 5, 2018
Posts: 5
Last: Nov 27, 2018
[view latest posts]
Level 0
Category: CoD4 SP Mapping
Posted: Sunday, Oct. 7, 2018 06:32 am
SPi, your code does not work because the game does not see the character. When the character is in the technique as I understand it uses the (self) designation.

Anyway, here is my code from the module that I filled on Google Disk.

Code:

uaz_setup()
{
	cityuaz = maps\_vehicle::spawn_vehicle_from_targetname("cityuaz");
	cityuaz = getent ("cityuaz", "targetname");
	cityuaz waittill( "reached_end_node" );
	cityuaz notify( "unload" );
	self endon( "death" );
	self thread hero_setup();
	wait 3; //For testing 
	thread start();
}

hero_setup()
{
    level.kirill = get_living_ai( "guy1", "script_noteworthy" );
}

start()
{
    marine_point1 = getnode ("marine_point1", "targetname");	
    level.kirill setgoalnode(marine_point1);
}




edited on Oct. 7, 2018 06:32 am by JerryALT
Share |
SPi
General Member
Since: Jul 4, 2012
Posts: 530
Last: Oct 17, 2018
[view latest posts]
Level 6
Category: CoD4 SP Mapping
Posted: Sunday, Oct. 7, 2018 08:51 am
Yes because it'sup to you to modify it.
However I never managed to define an AI spawned from a vehicle, at least as far as remember. So you have to look into original level scripts.
Also your code seems to have spare stuff.
The hero_settings doesn't need self and it would have the AI defined otherwise.
I don't thnk I can help at the moment, good luck.
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»