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

Members Online

»
0 Active | 35 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
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 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 Topic is Locked
Page
Next Page
subscribe
Author Topic: Patroller Problem
joep109
General Member
Since: Jun 30, 2008
Posts: 9
Last: Aug 1, 2008
[view latest posts]
Level 0
Category: CoD4 SP Mapping
Posted: Wednesday, Jul. 30, 2008 08:56 am
Hello,

I added a patroller in my map.
I gave it a key/value of script_patroller/patrol_walk.
But it gave me an error:
http://img93.imageshack.us/img93/8343/erroorhr3.png
When i delete the key/value of script_patroller/patrol_walk, the level works fine, but the patroller doesn't work then.
Share |
RollinHard
General Member
Since: Jun 7, 2006
Posts: 24
Last: Feb 22, 2010
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Friday, Aug. 1, 2008 06:29 am
If you using or calling the _patrol.gsc on your actor you dont need to set this key/value because the script will do it.
you can use this key/value only with On & Off e.g. 1/0
so it have to be Key:script_patroller Value:1

In the cod2 tutorial section is a tut for patrollers.
Share |
joep109
General Member
Since: Jun 30, 2008
Posts: 9
Last: Aug 1, 2008
[view latest posts]
Level 0
Category: CoD4 SP Mapping
Posted: Friday, Aug. 1, 2008 11:36 am
I added ''script_patroller'''/''1'' but it still gives me the error messages. how can I call the _patrol.gsc on my actor?
Share |
RollinHard
General Member
Since: Jun 7, 2006
Posts: 24
Last: Feb 22, 2010
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Friday, Aug. 1, 2008 01:44 pm
If you want to do it simple..build your path for your actor with simple pathnodes..the actor have to be connected to your start node(select the actor + the first node & press W) then connect the start node to the next node and so on...
If the patroller use a ring(loop) to move then "not_chain" must be checked in the entity editor on the last node.
Select your AI and add a "targetname" for your actor. Key:targetname Value:patroller1

As for scripting:

If it is no spawner:
Code:

patroller1 = getent( "patroller1", "targetname" );
patroller1 thread maps\_patrol::patrol( self.target );


If it is a spawner
Code:

patroller1 = getent( "patroller1", "targetname" );
patroller1 thread add_spawn_function( maps\_patrol::patrol, self.target );



edited on Aug. 1, 2008 09:47 am by CaulkHarmony
Share |
junior1444
General Member
Since: Aug 29, 2009
Posts: 18
Last: Nov 13, 2011
[view latest posts]
Level 1
Category: CoD4 SP Mapping
Posted: Sunday, Aug. 1, 2010 01:14 pm
not works
Share |
Pablo_Abruzzi
General Member
Since: Jan 30, 2010
Posts: 93
Last: Aug 10, 2011
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Thursday, Aug. 5, 2010 04:47 pm
I check it and it's not working.
Can sb explain me what I'm doing wrong.

.gsc file:
Code:
#include common_scripts\utility;

#include maps\_utility;

#include maps\_anim;

#include maps\_patrol;


main()

{
   maps\_load::main();
   level.player takeallweapons();
   level.player giveWeapon ("m4_grenadier");
   level.player giveWeapon ("colt45");
   level.player switchToWeapon ("m4_grenadier");
   level.player giveWeapon ("fraggrenade");
   level.player giveWeapon( "smoke_grenade_american" );
   level.player setOffhandSecondaryClass( "smoke" );
thread ziom();
}


ziom()
{
patroller1 = getent( "sol", "targetname" );
patroller1 thread maps\_patrol::patrol( self.target );
}


My Zone Files:
Code:
ignore,code_post_gfx
ignore,common
col_map_sp,maps/ok.d3dbsp
rawfile,maps/ok.gsc
localize,ok
sound,common,ok,!all_sp
sound,generic,ok,!all_sp
sound,voiceovers,ok,!all_sp
sound,requests,ok,!all_sp
sound,ok,ok,!all_sp
weapon,sp/mp5
xmodel,viewmodel_base_viewhands
weapon,sp/m4_grenadier
weapon,sp/m203_m4
rawfile,maps/_patrol.gsc


Error:
Code:
******* script runtime error *******
assert fail: Tried to set generic run anim but the anim was not defined in the maps _anim file: (file 'maps/_utility.gsc', line 6328)
 assertEx( isdefined( level.scr_anim[ "generic" ][ anime ] ), "Tried to set generic run anim but the anim was not defined in the maps _anim file" );




Share |
Raven21633
General Member
Since: Jan 17, 2008
Posts: 184
Last: Sep 12, 2010
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Friday, Aug. 6, 2010 01:25 pm
Scripting is NOT my strong suit so I may be wrong here, but instead of threading ziom(), try just calling it as ziom();

#include common_scripts\utility;

#include maps\_utility;

#include maps\_anim;

#include maps\_patrol;


main()

{
maps\_load::main();
level.player takeallweapons();
level.player giveWeapon ("m4_grenadier");
level.player giveWeapon ("colt45");
level.player switchToWeapon ("m4_grenadier");
level.player giveWeapon ("fraggrenade");
level.player giveWeapon( "smoke_grenade_american" );
level.player setOffhandSecondaryClass( "smoke" );
ziom();
}


ziom()
{
patroller1 = getent( "sol", "targetname" );
patroller1 thread maps\_patrol::patrol( self.target );
}
Share |
FattalError
General Member
Since: May 4, 2009
Posts: 26
Last: Feb 16, 2011
[view latest posts]
Level 2
Category: CoD4 SP Mapping
Posted: Friday, Aug. 6, 2010 09:05 pm
You must have "name of your level"_anim.gsc
Code:

#include maps\_utility;

#include maps\_anim;

#include common_scripts\utility;

#include animscripts\utility;


#using_animtree( "generic_human" );

main()

{

  level.scr_anim[ "smoker" ][ "smoke_idle" ] = %patrol_bored_idle_smoke;

  level.scr_anim[ "generic" ][ "patrol_walk" ]            = %patrol_bored_patrolwalk;
  level.scr_anim[ "generic" ][ "patrol_walk_twitch" ]     = %patrol_bored_patrolwalk_twitch;
  level.scr_anim[ "generic" ][ "patrol_stop" ]            = %patrol_bored_walk_2_bored;
  level.scr_anim[ "generic" ][ "patrol_start" ]           = %patrol_bored_2_walk;
  level.scr_anim[ "generic" ][ "patrol_turn180" ]         = %patrol_bored_2_walk_180turn;

  level.scr_anim[ "generic" ][ "patrol_idle_1" ]          = %patrol_bored_idle;
  level.scr_anim[ "generic" ][ "patrol_idle_2" ]          = %patrol_bored_idle_smoke;
  level.scr_anim[ "generic" ][ "patrol_idle_3" ]          = %patrol_bored_idle_cellphone;
  level.scr_anim[ "generic" ][ "patrol_idle_4" ]          = %patrol_bored_twitch_bug;
  level.scr_anim[ "generic" ][ "patrol_idle_5" ]          = %patrol_bored_twitch_checkphone;
  level.scr_anim[ "generic" ][ "patrol_idle_6" ]          = %patrol_bored_twitch_stretch;  

  level.scr_anim[ "generic" ][ "patrol_idle_smoke" ]      = %patrol_bored_idle_smoke;
  level.scr_anim[ "generic" ][ "patrol_idle_checkphone" ] = %patrol_bored_twitch_checkphone;
  level.scr_anim[ "generic" ][ "patrol_idle_stretch" ]    = %patrol_bored_twitch_stretch;
}


and in your gsc file
Code:

#include common_scripts\utility;

#include maps\_utility;

#include maps\_anim;

#include maps\_patrol;

#using_animtree( "generic_human" );I think this isn't necessary

main()
{
   maps\_load::main();
   maps\"your map name"_anim::main();
   level.player takeallweapons();
   level.player giveWeapon ("m4_grenadier");
   level.player giveWeapon ("colt45");
   level.player switchToWeapon ("m4_grenadier");
   level.player giveWeapon ("fraggrenade");
   level.player giveWeapon( "smoke_grenade_american" );
   level.player setOffhandSecondaryClass( "smoke" );
thread ziom();
}

ziom()
{
patroller1 = getent( "sol", "targetname" );
patroller1 thread maps\_patrol::patrol( self.target );
patroller1.animname = "generic";
}
Share |
Raven21633
General Member
Since: Jan 17, 2008
Posts: 184
Last: Sep 12, 2010
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Saturday, Aug. 7, 2010 08:24 pm
I've been following along trying to fix this same problem in a SP Co-Op mission for W@W.

The map works, and at least he's moving now, but instead of patrolling he stands in front of the guard house dancing to the latest in the hit parade LOL! [rocking]



I haven't been through all the tutorials yet so I'm not asking any questions yet but thought you guys would get a laugh out of him. Now I just need to add the appropriate music ha ha ha.
Share |
lolwot
General Member
Since: May 16, 2010
Posts: 53
Last: Dec 15, 2015
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Sunday, Aug. 8, 2010 12:35 am
Raven21633 writes...
Quote:
I've been following along trying to fix this same problem in a SP Co-Op mission for W@W.

The map works, and at least he's moving now, but instead of patrolling he stands in front of the guard house dancing to the latest in the hit parade LOL! [rocking]



I haven't been through all the tutorials yet so I'm not asking any questions yet but thought you guys would get a laugh out of him. Now I just need to add the appropriate music ha ha ha.


Very simple, all you have to do I update the zone file with the required xanims, it should have them in missing assets already. When I did for CoD4 I need to put these in
Code:
xanim,patrol_bored_patrolwalk_twitch xanim,patrol_bored_patrolwalk xanim,patrol_bored_2_walk_180turn xanim,patrol_bored_2_walk xanim,patrol_bored_twitch_stretch xanim,patrol_bored_twitch_checkphone xanim,patrol_bored_twitch_bug xanim,patrol_bored_idle_cellphone xanim,patrol_bored_idle_smoke xanim,patrol_bored_idle xanim,patrol_bored_walk_2_bored xanim,void_loop
Share |
Restricted Access Topic is Locked
Page
Next Page
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

»