Ritualistic Forums

Go Back   Ritualistic Forums > Ritual Entertainment Games > SiN Episodes > SiN Episodes Editing

Reply
 
Thread Tools Display Modes
Old 10-29-2006, 08:06 AM   #1
Maxsilver
Newbie
 
Join Date: Oct 2006
Posts: 4
Default Map AI Question

Hi,

I've been playing around with Hammer and the Sin SDK and stumbled upon a few questions that I couldn't find answers for in the Sin SDK Wiki.

I'm trying to get npc_jessica to do the following...
1. Shoot grunts
2. If there are no grunts, follow player
3. If player gets into car, jessica gets into car (passanger) and shoots grunts if there are grunts and Get out of the car if the player gets out.

Right now, the only thing she does is shoot grunts. And only if I see her (in the level, the player starts out right above the action, but the grunts wont shoot at her, and she wont shoot back until the player is looking at the grunts)


I've been trying to following the guide for making Jessica drive the car ( http://www.ritualediting.com/wiki/?t...rive_a_vehicle ) and expanding it to fit the list above, but I have not been successful in making her do it. The guide says I need a "trigger_once" and I don't see that on my entity list (would an "action" suffice?)


this is the map i've been playing with and any help would be greatly appreciated,

Thanks.
Maxsilver is offline   Reply With Quote
Old 10-29-2006, 09:04 AM   #2
Xenogenetic
Addict
 
Xenogenetic's Avatar
 
Join Date: Mar 2004
Location: Dallas TX
Posts: 1,120
Default Re: Map AI Question

You can't drive cars in Emergence(I think). You might also want to fix up your brushes so they are a bit cleaner (don't intersect when they don't have to) and apply the nodraw texture to the outside of walls that players can't see. You also don't have to name each grunt unless you want to have another entity interact with them, but you can name them if you want to. Enough of that though...

I am not great with AI, I don't know all the entites by heart, but I guess you could make a trigger to check if all the grunts are dead and then, if they are, run a script on Jessica. If you need more detailed help I might have some time later today to make you an example map.

--------------------
Xenogenetic is offline   Reply With Quote
Old 10-29-2006, 10:40 AM   #3
Maxsilver
Newbie
 
Join Date: Oct 2006
Posts: 4
Default Re: Map AI Question

Quote:
You can't drive cars in Emergence(I think).
The car was written as drivable by someone at Ritual, all you need to do is place the car on the map, walk to it and press use (on driver door) and you can drive it (WASD controls, space is brake).


Quote:
I am not great with AI, I don't know all the entites by heart, but I guess you could make a trigger to check if all the grunts are dead and then, if they are, run a script on Jessica.
I'd rather make some kind of script that only checks grunts around her. The levels will eventually have lots of grunts all over the place. I'd rather Jessica only stop to kill grunts if they are within viewing distance of her -- otherwise she'd never stop killing them long enough to follow the player around / hop in the car.

Quote:
If you need more detailed help I might have some time later today to make you an example map.
I'd greatly appreciate that
Maxsilver is offline   Reply With Quote
Old 10-29-2006, 03:31 PM   #4
Xenogenetic
Addict
 
Xenogenetic's Avatar
 
Join Date: Mar 2004
Location: Dallas TX
Posts: 1,120
Default Re: Map AI Question

OK after looking at the stuff I have concluded
1) The car is drivable (really fun to run grunts over)
2) If you are driving the car Jessica can't get in.
3) I don't know what I would put in the example map I don't know how to get Jessica to follow the player :S

Maybe when I have some more time I can figure everything out and show you, or you can figure it out and show me

--------------------
Xenogenetic is offline   Reply With Quote
Old 10-29-2006, 07:41 PM   #5
MeatPuppet
Level Designer
 
Join Date: May 2004
Posts: 123
Default Re: Map AI Question

Jessica can ride in the passenger seat. Give the prop_vehicle_sin a name. In Jessica's properties there is a field called "target vehicle". Enter the name of the vehicle there. Now you need to give her a command of "enter vehicle force" with a parameter override of "1" which designates the passenger seat and she will pop in there. If you use "enter vehicle" she might path her way to the car then get in. I don't recall off the top of my head.

It's convenient to fire off the "enter vehicle force" command when the player enters the car. It is the "player on" flag in the vehicle properties.

Hope this helps.
MeatPuppet is offline   Reply With Quote
Old 10-30-2006, 06:41 AM   #6
Maxsilver
Newbie
 
Join Date: Oct 2006
Posts: 4
Default Re: Map AI Question

Thanks so much!

Giving Jessica the "enter vehicle force" command works, and the plain "enter vehicle" works (she will path her way over to the car, but only if it is really close to her)


But for some reason, "exit vehicle" doesn't work. For some reason, giving the car an (If PlayerOn then Jessica EnterVehicle 1) works, but an (If PlayerOff then Jessica ExitVehicle) won't kick her out of it, and won't throw a dev error message.

I also still can't figure out how to get Jessica to follow the player. I'm messing around with "squads" and "teams" to see if somehow that will allow it.

Thanks for the assistance so far, I appreciate it a lot.
Maxsilver is offline   Reply With Quote
Old 10-30-2006, 09:35 PM   #7
MeatPuppet
Level Designer
 
Join Date: May 2004
Posts: 123
Default Re: Map AI Question

"enter vehicle" works (she will path her way over to the car, but only if it is really close to her)... Make sure there are enough path nodes in the area of the car.



"But for some reason, "exit vehicle" doesn't work." ..... The command should target the car with a parameter of "1". Think of it as an ejection seat.

"I also still can't figure out how to get Jessica to follow the player. I'm messing around with "squads" and "teams" to see if somehow that will allow it." ... What you are looking for is "ai_goal_follow". It can be turned on and off.

The biggest problem you are likely to have is when you kick Jessica out of the car. She probably won't know where to go and might stay in the air in her sitting positon.
MeatPuppet is offline   Reply With Quote
Old 10-31-2006, 09:45 PM   #8
Maxsilver
Newbie
 
Join Date: Oct 2006
Posts: 4
Default Re: Map AI Question

Quote:
What you are looking for is "ai_goal_follow". It can be turned on and off.
Worked perfectly. Thanks so much!

Quote:
The biggest problem you are likely to have is when you kick Jessica out of the car. She probably won't know where to go and might stay in the air in her sitting positon
Your absolutely right, the car "ejection seat" command sends her sitting in mid air (being ejected from either driver or passanger seat)

What can I do about this? (I was hoping that sending jessica the "exitvehicle" commmand would fix it, but that doesn't seem to have much use)


Also, I noticed when she is in the passanger seat, her animation gets lost sometimes (it looks for something like ACT_PASSANGER_IDLE and cant find it) Is this an animation I need to add to her character in something like faceposer?

And is there any way to get her to fire while sitting. (If the car approaches grunts, I'd like her to auto lean out the window and fire just like she normally does if tailing the player.

Last edited by Maxsilver : 10-31-2006 at 09:52 PM. Reason: added detail
Maxsilver is offline   Reply With Quote
Old 11-01-2006, 06:44 PM   #9
MeatPuppet
Level Designer
 
Join Date: May 2004
Posts: 123
Default Re: Map AI Question

Jessica wasn't designed to be a passenger but she might fire at enemy grunts if she hates them enough. You can use an ai_relationship to tell her to hate them. She won't lean out the windows on her own. You will have to write some code to make that happen.

As for her idle animation while riding as a passenger, I think it should work. It was definitely working at some point.

I'm not sure what the best way to deal with the exit vehicle command on Jessica is. At some point she would play an exit animation. But I just checked the model viewer and didn't see the passenger exit animation. So, I have a feeling that a fix that might work is to kill her after the exit vehicle command and then spawn a new instance of her. Getting her to spawn wherever the player stops the car is going to be another problem you will have to figure out. I'm not sure how to do it off the top of my head but that doesn't mean a solution doesn't exist. You might try parenting an info_spawn_destination to the car and have her spawn there? I have no idea if it will work but it might be worth trying.
MeatPuppet is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hi dumbass question here, Sin EP will it be retale impkeeper SiN Episodes 4 05-10-2006 12:07 PM
Multiplayer Question for Ritual PPL Frontier Star Trek Elite Force II 9 06-18-2003 10:44 AM
Sin storyline question richardfld SiN, SiN Steam & Wages of Sin 6 09-12-2001 09:52 AM
A question about design preferences... sarumn SiN, SiN Steam & Wages of Sin 7 11-04-1999 04:44 AM
Question of the Day Hexagon Heavy Metal FAKK2 5 10-27-1999 10:56 AM


All times are GMT -5. The time now is 05:14 PM.


Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.