
KouRyuu
Joined: Jul 9, 2009
U.S. Marines. 'nuff said.
|
Posted: Jul 9, 2009 09:38 AM
Msg. 1 of 15
Hi. well, i've been cruising and browsing around these forums for quite sometime, and i have found SOO much help about the ai. the problem is that with some vehicles, the Actor doesn't want to get in the DRIVER seat, even though it's in the command. i've figured out that restarting sapien fixes this (haven't tested it, i just happened when i was hardly paying attention to it after i opened it up the second time). but whenever they get in, they don't follow the path that i set after the command. I used adumbass's tutorial on path finding, and did everything right, but instead of following the path, the driver (or pilot in this case) drives off, makes a 180, and circls the ground, as if he's trying ever so diligently to promote something to the rank of speed bump. this is the message that i get in sapien before he goes AWOL: " is flying but was placed in a non-3d-firing-position encounter (any encounter type name). any ideas? just other questions: how do i get an ai to get out of a vehicle in a certain area? (mainly, what script commands do i need to use, i already know it needs to be in a trigger volume) how can i do this by pressing a button? (after seeing and successfully using the pelican pickup script, i know how this command works.) *and if i can do that, do i need to assign specific actors to this? ****{[ here's an example: (if (= red_pelican_has_hog_number 10) (begin (sleep 1)
*objects attacth/detatch would change to something, but dunno what.* (objects_attach red_pelican "cargo" g6 "") (objects_detach red_pelican g6 ) ) ) where as red_pelican is the peli, and g6 is a ghost }]***** any help on any of the topics would be much appreciated! 
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 9, 2009 10:14 AM
Msg. 2 of 15
For setting up a command list for the pelican, make sure the command points are in the air, and not too far apart.
|
|
|

KouRyuu
Joined: Jul 9, 2009
U.S. Marines. 'nuff said.
|
Posted: Jul 9, 2009 10:18 AM
Msg. 3 of 15
that's the reason? it gave me the same thing for a warthog, or any other vehicle i think...
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 9, 2009 10:21 AM
Msg. 4 of 15
Did you set up the vehicle like in the picture?
|
|
|

KouRyuu
Joined: Jul 9, 2009
U.S. Marines. 'nuff said.
|
Posted: Jul 9, 2009 10:26 AM
Msg. 5 of 15
as well as i could. the thing is that when he wasn't in the vehicle, or if it didn't spawn (this was on a different map for personal preference) he ran the course, no matter how far the points were. in fact, if i just start fresh on a new map, no ai, and i give him a vehicle, he does the same thing. i don't even give him any points. i'll try again right now.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 9, 2009 10:35 AM
Msg. 6 of 15
Yea, because he isn't following the command list. You need to make him follow the command list. Make sure "Allow initiative" is off.
|
|
|

KouRyuu
Joined: Jul 9, 2009
U.S. Marines. 'nuff said.
|
Posted: Jul 9, 2009 10:48 AM
Msg. 7 of 15
ok. the 'allow initiative' thing threw me off a bit. that helped him get in, so now i'm at the point where he's flying in circles. i'm going to start building the flying command list now.
edit: ugh. he still does the same thing. it seems that he stops following the command after he gets in. i'm going to see what i can find about that. Edited by KouRyuu on Jul 9, 2009 at 10:56 AM
edit: i can't figure it out. i don't know why he's doing it.. Edited by KouRyuu on Jul 9, 2009 at 11:08 AM
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 9, 2009 11:13 AM
Msg. 8 of 15
Create a separate command list for flying. Then, use a script to make him get in, and execute the command list. For now, create the flying command list, and make it separate from the get in command list. In the Sapien console, use the vehicle_load_magic command to make him get in. Then use the ai_command_list command to make him execute the command list. You'll have to restart Sapien before they do anything.
|
|
|

KouRyuu
Joined: Jul 9, 2009
U.S. Marines. 'nuff said.
|
Posted: Jul 9, 2009 11:20 AM
Msg. 9 of 15
ok. i'm not too astonishing at scripting. when you say 'script', u mean command? or script? i understand what u mean though.
edit: whoops. i know which script variables and such i'm gonna need to use to make him get in. i think i can make the script by starting off with him inside it already, then have the script execute the command. Edited by KouRyuu on Jul 9, 2009 at 11:22 AM
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 9, 2009 11:47 AM
Msg. 10 of 15
Order of operations.
-Spawn AI. (ai_place [AI]) -Get AI in vehicle. (vehicle_load_magic [VEHICLE] "" (ai_actors [AI])) -Execute command list. (ai_command_list [AI] [COMMAND LIST NAME])
|
|
|

KouRyuu
Joined: Jul 9, 2009
U.S. Marines. 'nuff said.
|
Posted: Jul 9, 2009 12:03 PM
Msg. 11 of 15
sweet. that worked. now all i have to do is put that in a script, and it'll run. thank you a bunch Gamma.
not that i don't appreciate your help (i really do), but do you think u have any answers to the other two questions? preferably the 2nd?
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 9, 2009 12:10 PM
Msg. 12 of 15
For the second question, the command is: (vehicle_unload [VEHICLE] "")
You can leave it at "" to unload all seats, or put in a specific seat name.
|
|
|

KouRyuu
Joined: Jul 9, 2009
U.S. Marines. 'nuff said.
|
Posted: Jul 9, 2009 12:24 PM
Msg. 13 of 15
and that would be when it has entered a trigger volume. i want to make it easier to do for other maps by using a button, but that kind of thing is beyond me (probably simple to you).
the pelican script maker has the 'q' flashlight function that would mkae it so a vehicle (in this case, marines inside) would be detached whenever.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Jul 9, 2009 03:14 PM
Msg. 14 of 15
(script continuous empty (begin (if (and (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true) (vehicle_test_set [VEHICLE] "" (unit (list_get (players) 0)))) (begin (vehicle_unload [VEHICLE] "") (unit_enter_vehicle (unit (list_get (players) 0)) [VEHICLE] "") (unit_set_desired_flashlight_state (unit (list_get (players) 0)) false) ) )
Over MP, it only works for the first player. Edited by Gamma927 on Jul 9, 2009 at 03:14 PM
|
|
|

KouRyuu
Joined: Jul 9, 2009
U.S. Marines. 'nuff said.
|
Posted: Jul 9, 2009 04:13 PM
Msg. 15 of 15
nice, thanks. i just tried compiling it, and it says:
02.13.09 15:11:04 [fox_island line 4] this is not a valid function or script name.: vehicle_test_set testing_vehicle "" (unit (list_get (players) 0))))
02.13.09 15:11:04 recompiling scripts after scenarios were merged. 02.13.09 15:11:04 [fox_island line 3] this left parenthesis is unmatched.: (if (and (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true) =/ i've done what it tells me, that the parenthesis is unmatched, but it keeps saying stuff that i know is wrong. note: the map is for my personal use. Edited by KouRyuu on Jul 9, 2009 at 04:16 PM
edit:i think u misspelled seat.... Edited by KouRyuu on Jul 9, 2009 at 04:34 PM
alright, i went through it and got this:
*** 02.13.09 15:44:18 [fox_island line 3] this is not a valid function or script name.: player) 0))) true) ***wtf?! 02.13.09 15:40:21 recompiling scripts after scenarios were merged. 02.13.09 15:40:21 this left parenthesis is unmatched.: (= (unit_get_current_flashlight_state (unit (list_get (player 0))) true) Edited by KouRyuu on Jul 9, 2009 at 04:42 PM Edited by KouRyuu on Jul 9, 2009 at 04:44 PM
|
|
|