NPC routing for SP -1 reply

Please wait...

SilentSpanky

Canadian National Defense Army

50 XP

26th January 2004

0 Uploads

168 Posts

0 Threads

#1 14 years ago

I belive this reuqires a sticky! Those who wish to get NPC routing for SP perfect.. Do these following things.. http://www.gamingforums.com/attachment.php?attachmentid=3007&stc=1 NPC_targetname npc_fakeplayer [sets the NPC a target for when ya do scripting] spawnscript scripts/test/1 [pretty much is for scripting on the npc. Sets its behaviour/skills..] targetname npc [this is a subject to being linked from a target_relay*see furthur down for target_relay*] target nav_player1 [its the nav goal] refer to the next attachment! http://www.gamingforums.com/attachment.php?attachmentid=3008&stc=1 make it a solid_ok, this is the big waypoint.. I will mention more on the smaller one, but now that ya got your npc setup, you want to tell it to move.. So highlight the npc and then highlight the big waypoint.. hit CTRL+k to link them.. But thats not gonna work.. so we name this wp targetname nav_player1 ok next attachment.. http://www.gamingforums.com/attachment.php?attachmentid=3009&stc=1 this being the smaller wp, as you can see I made it bigger so it is visable, *note= same as the big wp for its target name, and is also a solid_ok..* The big and small wp given the same target name will be a guide for one another.. Keep that in mind! !*!*!*!*!{All wp's big and small should have same targetnames]!*!*!*!*!*! http://www.gamingforums.com/attachment.php?attachmentid=3010&stc=1 Now your woundering what the target_relay is really all about huh? well give it a targetname, and make sure this, I mean THIS target_relay will be linked to your npcs.. Most importantly you linked to it.. Why you ask? http://www.gamingforums.com/attachment.php?attachmentid=3011&stc=1 Well if your are really woundering why... You the player can walk anywhere in the map, while the NPC is dumb.. You linked to the target_relay that linked to the npc which is linking to the wp's.. Sets everything in motion! Without the player the npcs wouldn't have a exact guidance to follow from..




moberemk

Just a guy who likes to help.

50 XP

1st December 2003

0 Uploads

1,285 Posts

0 Threads

#2 14 years ago

Excellent. This will be very useful. I agree, this should be stickied.




SilentSpanky

Canadian National Defense Army

50 XP

26th January 2004

0 Uploads

168 Posts

0 Threads

#3 14 years ago

http://www.gamingforums.com/attachment.php?attachmentid=3012&stc=1 now do this setup the same way as mine.. Make sure ya do a wait of 4000 or the npc wont be as paitent.. 4000 is equal to 4 secounds keep that in mind! 400 or 40 is milisecounds.. 40000 is 40 secounds, 400000 is 4 minuets.. remember from school about decimals? well make sure ya do it exactly how ya want.. but 4 secounds is good for a npc to follow its route.. but I made a mistake.. when ya have wait.. 4000 is 4 secounds, but after that it should of been 8000 and then 12000, if ya have anything less then 4 secounds of waiting, your npc will run.. so ya need to correct the script saying, first I want you to wait then walk to the first wp under 4 secs.. then wait another 4 but while the script is running move at 8 secounds, but wait another 4 secounds and move at 12 secounds.. and there ya have it! Oh yeah if ya noticed in affect npc_fakeplayer is the Npc_targetname npc_fakeplayer.. which means if ya use a spawn script directed at a npc.. always do this in the affect feild if the npc has a Npc_targetname!!! *Which if you mean to script a npc you should always do those TWO things!*




SilentSpanky

Canadian National Defense Army

50 XP

26th January 2004

0 Uploads

168 Posts

0 Threads

#4 14 years ago

As it is known I am working on a SP project, I am using files from JK2files.com under mod use-age.. For sabers, and sounds, rest I will do by myself.. Making a new menu, Well re-arranging the text so it can fit the SP story.. A new hud, alot of GFX work.. I mean the .tga and .jpg and .png gfx.. But yes, if this is a sitcky, I will addmore to this! I know there are some things most mappers know, but its the noob mappers who want to do thier best.. Dont want a ladder map do we? Well I mean from noobs :P Oh yeah admins.. I have attachments in this thread.. http://www.gamingforums.com/showthread.php?t=110652

1.jpg http://www.gamingforums.com/attachment.php?attachmentid=2994 2.jpg http://www.gamingforums.com/attachment.php?attachmentid=2995 (also be nice if ya can delete that thread too!) But dont delete this one :P I cant delete them manually.. So if you may please.. Get rid of em for me?




SilentSpanky

Canadian National Defense Army

50 XP

26th January 2004

0 Uploads

168 Posts

0 Threads

#5 14 years ago
SilentSpankyhttp://www.gamingforums.com/attachment.php?attachmentid=3012&stc=1 now do this setup the same way as mine.. Make sure ya do a wait of 4000 or the npc wont be as paitent.. 4000 is equal to 4 secounds keep that in mind! 400 or 40 is milisecounds.. 40000 is 40 secounds, 400000 is 4 minuets.. remember from school about decimals? well make sure ya do it exactly how ya want.. but 4 secounds is good for a npc to follow its route.. but I made a mistake.. when ya have wait.. 4000 is 4 secounds, but after that it should of been 8000 and then 12000, if ya have anything less then 4 secounds of waiting, your npc will run.. so ya need to correct the script saying, first I want you to wait then walk to the first wp under 4 secs.. then wait another 4 but while the script is running move at 8 secounds, but wait another 4 secounds and move at 12 secounds.. and there ya have it! Oh yeah if ya noticed in affect npc_fakeplayer is the Npc_targetname npc_fakeplayer.. which means if ya use a spawn script directed at a npc.. always do this in the affect feild if the npc has a Npc_targetname!!! *Which if you mean to script a npc you should always do those TWO things!*

BIG error... if ya want to make waits from 2000 then 4000 your gonna end waiting a long while... I was thinking starcraft scripting.. lol.. if ya wanna wait any lenth of secounds its 2000 per wait.. so ya dont have to do this... ....