Page 2 of 2
Posted: Tue Sep 30, 2003 2:12 pm
by Vic Marrow
I tried: while($para.origin != $path4.origin)
This didn't work he would get to the waypoint and spin around.
I played with the number and found if I made it 50 he would go right to the waypoint anything less than 50 and he would get to the waypoint and spin. I guess I don't quite understand the vector command. The distance between the $para and $path4 is 200 units. bdodger how did you come up with the number 64 you didn't know any distances of my map?
Another thing do you know what command makes enitys walk like they are on patrol you know they seem to walk a little slower, head turns like he's looking around and he lights up a smoke every now and then.
Thanks for all your help!!!!!!!
Thanks to all you guys for your help!!!!
commands
Posted: Tue Sep 30, 2003 2:28 pm
by tltrude
Here is a way to see all the animation. Highlight the para guy and hit key n. Then click on the Anim: pluse and minus buttons. The name of each animation will show up in test anim and you can see the posture of the animation in the 3d window.
Posted: Tue Sep 30, 2003 4:08 pm
by bdbodger
By makeing an info_splinepaths and targeting one the the next to make a path in a loop then use the i key on the keyboard to open the ai dialog box . Set the type idle to patrol and the patrol path box on the right hand side will open . Put in the name of the first node of the patol path in this box and probably leave the waittrigger at 0 the click on apply .
Posted: Thu Oct 02, 2003 5:23 am
by Vic Marrow
I have set up the patrol method in radiant and it works great the enity will walk to as many waypoints as I want and he wil stay in patrol mode. You know walking slow, turning his head like hes looking around, and some ocasional smoking. Very relaxed. But the minute he stops to talk to another enity, and you send him to the next waypoint with the "walkto" command you can't get him to resume his patrol mode. He walks faster, no looking around, and when he gets to where hes going hes in a alert crouched position. Thats why a while back I started a thread "How can I make a ai stay idle" because he wouldn't go back to idle. It took alot of work but jv_map helped me figure it out. But now with this new way of commanding different types of walks that you showed me bdbodger I don't have the idle problem any more. I found the walk command "rifle_walk_patrol_forward" which is the walk used in the patrol mode. Its a calm walk just like "walk_bored_forward" so when the enity stops at a waypoint he automaticly goes idle (calm). I think the "walkto" command is an alert walk so when the enity gets to where hes going he alert and ready to fight.
That command that you showed me:
$para turnto $path5
while(vector_length ($para.origin - $path5.origin) > 50)
{
$para anim "rifle_walk_patrol_forward"
$para waittill flaggedanimdone
}
$para exec global/stand.scr
Mathamaticly dosen't make any sence to me. I have one enity 168 units from the waypoint and I have to set: >50 If I use 49 or less and he will go into a spin, 51 or more he will stop short of the waypoint but do the animation and turn correctly. I have another enity 152 units from a waypoint and I have to set: >101 If I use 100 or less he will go into a spin, 102 or more he will stop short of the waypoint. but do the move correctly. But I guess I don't care because it works!!!!!!!!!!!! Only drag is when I set up a waypoint to go to with this command its trial and error to find the right number.
Now its all working great if I could just figure out how to get the para to turn his head like hes looking around like when hes in patrol mode. I looked at the "patrol_path.scr" and it made me dizzy but the answer is in there on how to make his head turn like he on patrol. I start reading .self .look .local while if and I get .lost
Sorry for the long post.
Posted: Thu Oct 02, 2003 9:30 am
by bdbodger
There are scripts that automatically do things when you use
$ai walkto $my_walk_place
I think they are called handler scripts . When you do
$para anim "rifle_walk_patrol_forward"
$para waittill flaggedanimdone
you are manually doing what the handler scripts usually do .
From what I have read what you do for the patrol_path.scr is this , link info_pathnodes into a patol route . Give the first node a targetname like my_path then do .
$para exec global/patrol_path.scr::patrol $my_pathnode
also in the script it says that if you put
Key:look_point
Value:my_look_spot
Key: look_interval
Value: 6
at one of the linked nodes on the patrol path the ai will stop and look the look spot , just use a value that is the script_origin you want to look at and if you target other script_origins he will then look at them too , or if you use
key: turn_point
value: my_turn_and_or_look_spot
same idea ai will stop and turnto the script_origin . If you set
key: pause_interval
value: 6
he wll pause for 6 seconds the default is 4 seconds
if you use
Key: run_thread
value: mythread
the mythread will run and the ai will wait for it to finish before resumeing his route this maybe what you need for some dialog . These keys and values can be set at any of the nodes on the patrol path .
this is also one of those scripts that use the
level.script = maps/mymap.scr
one animation you can use if you want to manually do the animations is
$my_ai exec global/setweaponpose.scr "down" // or "up"
this will make him lower his weapon .