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

Members Online

»
0 Active | 102 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 subscribe
Author Topic: script_patroller 1 help please
lazygit
General Member
Since: Dec 13, 2003
Posts: 296
Last: Nov 3, 2022
[view latest posts]
Level 5
Category: CoD4 SP Mapping
Posted: Tuesday, Nov. 18, 2008 10:14 pm
i am having trouble getting a patrolling AI in cod4 done it in cod and cod2 no problems

the error im getting is

undefined is not an array string or vector

picture of console picture here


my map.gsc file reads

Code:
#include maps\_utility;

#include common_scripts\utility;

#include animscripts\utility;

#include maps\_anim;

#using_animtree( "generic_human" );



main()
{
	
        maps\_load::main();
        maps\sp_heck_fx::main();
        maps\createfx\sp_heck_fx::main();
        maps\sp_heck_anim::main();

       


        level.player takeallweapons();
	level.player giveWeapon( "m4_silencer" );
	level.player givemaxammo( "m4_silencer" );
	level.player giveWeapon( "usp_silencer" );
	level.player giveMaxAmmo( "usp_silencer" );
	level.player giveWeapon( "flash_grenade" );
	level.player switchtoWeapon( "m4_silencer" );
	
	

	battlechatter_off( "allies" );
	battlechatter_off( "axis" );

        



        thread ammoc();
        thread ammoc1();
        thread fanspin();
        thread vent();

	


}


      

  ammoc()

{
      
      
      
      damagetrigg = getent ("dmtrig","targetname");

      alerts = getentarray ("bang","targetname");
      
      wallgood = GetEnt ("wallgood","targetname");

      clip1 = GetEnt ("clip1","targetname");

      wallbad = GetEnt ("wallbad","targetname");

      clip2 = GetEnt ("clip2","targetname");

      wallbad hide();

      clip2 hide();
      
      wallgood show();

      clip1 show();
      
      damagetrigg waittill ("trigger");

      wallgood delete();

      clip1 delete();

      wallbad show();

      clip2 show();
      
      origin = wallbad getorigin();

      origin = clip2 getorigin();

      alerts[0] playsound("bang");

      

      

      
      
}

 ammoc1()

{
      
      
      
      damagetrigg = getent ("dmtrig2","targetname");

      alerts = getentarray ("bang2","targetname");
      
      doorgood = GetEnt ("doorgood","targetname");

      doorbad = GetEnt ("doorbad","targetname");

      doorbad hide();
      
      doorgood show();
      
      damagetrigg waittill ("trigger");

      doorgood delete();

      doorbad show();
      
      origin = doorbad getorigin();

      alerts[0] playsound("bang");

      

      

      
      
}

vent()

{

      
      damagetrigg = getent ("venttrig1","targetname");
      
      ventgood1 = GetEnt ("ventgood1","targetname");

      ventbad1 = GetEnt ("ventbad1","targetname");

      ventbad1 hide();
      
      ventgood1 show();
      
      damagetrigg waittill ("trigger");

      ventgood1 delete();

      ventbad1 show();
      
      origin = ventbad1 getorigin();

      damagetrigg = getent ("venttrig2","targetname");
      
      ventgood2 = GetEnt ("ventgood2","targetname");

      ventbad2 = GetEnt ("ventbad2","targetname");

      ventbad2 hide();
      
      ventgood2 show();
      
      damagetrigg waittill ("trigger");

      ventgood2 delete();

      ventbad2 show();
      
      origin = ventbad2 getorigin();
  
             

       

}

fanspin()
 
{

      fan1 = getEnt ("fan1","targetname");
      fan2 = getEnt ("fan2","targetname");
      fan3 = getEnt ("fan3","targetname");
      fan4 = getEnt ("fan4","targetname");
      
      
      

      while (1)

{

      fan1 rotatePitch ( 360, 5, 0, 0 );
      fan2 rotateYaw   ( 360, 5, 0, 0 );
      fan3 rotateYaw   ( 360, 5, 0, 0 );
      fan4 rotateYaw   ( 360, 5, 0, 0 );
     
      
      
      wait 4.9;
}
}



my anim.gsc file reads

Code:
#include maps\_utility;

#include common_scripts\utility;

#include maps\_anim;

#using_animtree( "generic_human" );


main()
{
	
	




        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;
	level.scr_anim[ "generic" ][ "patrol_idle_phone" ]		= %patrol_bored_idle_cellphone;
}        


my fast file data or missingasset reads



Code:
ignore,code_post_gfx
ignore,common
col_map_sp,maps/sp_heck.d3dbsp
rawfile,maps/sp_heck.gsc
localize,sp_heck
sound,common,sp_heck,!all_sp
sound,generic,sp_heck,!all_sp
sound,voiceovers,sp_heck,!all_sp
sound,requests,sp_heck,!all_sp
sound,sp_heck,sp_heck,all_sp
rawfile,maps/sp_heck.gsc
weapon,sp/mp5
weapon,sp/m4_silencer
weapon,sp/usp_silencer
xmodel,viewmodel_base_viewhands
rawfile,maps/sp_heck_fx.gsc
rawfile,maps/createfx/sp_heck_fx.gsc
fx,distortion/sewer_stream_village
fx,distortion/watery
fx,distortion/warsglow
fx,breakables/exp_wall_cinderblock_96
fx,distortion/distortion_tank_muzzleflash
fx,distortion/war111fall1
fx,misc/flashlight
fx,smoke/steam_jet_med_loop
fx,explosions/circuit_breaker
fx,fire/gas_pump_fire
rawfile,maps/sp_heck_anim.gsc
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



the patroller wont move on patrol

ive must be missing something out like i said ive done this for cod 1 and 2 and had no problem my nodes are set correct one has been made not chain

ive looked at the _patrol script and got the list of amins

im lost dont know what to do next

edited on Nov. 18, 2008 05:17 pm by lazygit
Share |
JerryTube
General Member
Since: Mar 4, 2007
Posts: 88
Last: Jul 1, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Wednesday, Nov. 19, 2008 06:14 am
I made a tut over at InfinityTutorials check this link. [casanova]
Share |
lazygit
General Member
Since: Dec 13, 2003
Posts: 296
Last: Nov 3, 2022
[view latest posts]
Level 5
Category: CoD4 SP Mapping
Posted: Wednesday, Nov. 19, 2008 03:30 pm
Thankyou very much that is a great tutorial and works lovely:)
Share |
JerryTube
General Member
Since: Mar 4, 2007
Posts: 88
Last: Jul 1, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 SP Mapping
Posted: Wednesday, Nov. 19, 2008 09:26 pm
No probs, thats what im here for [biggrin]
Share |
Restricted Access Topic is Locked 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

»