View Full Version : scripting questions
10-22-2002, 08:28 PM
I have a few questions about what scripting can and can't do.
Since building my level, i have thought up some neat scenes to have... so here comes a few questions...
Can I have npc's sitting around a table. Much like in Star Wars, the scene where Darth Vadar chokes that one General.. without the choking of course.
Can I have an Npc Shoot at a fixed point somewhere in my level, say at an exploding crate or a control panel.
and finally, is it possible to script NPC movement. In movement, I mean to make them do certain thing like raise their arms, or walk in circles or jump around, maybe shake a leg.
10-23-2002, 03:08 AM
I'll give you a couple of answers for a start. Somebody other will give the rest.
You can have NPCs sitting around a table. If I remember correctly, there might be even two kinds of sittings (not to mention sleeping while sitting).
I haven't even considered having NPCs shoot at some structural target, so I have no opinion at that. Might be possible with ref_tags or something.
You can have your NPCs doing various kinds of animations. To know the alternatives you have to study the anims.h file in the source code directory (now, that's it, if I remember correctly). However, I don't know if all animations work for all humanoid NPCs or if they must have all the specific animations encoded. I have only directed, so far, Kyle and Jan, and they worked as I wanted (if not as I expected... I had to say that).
The actual animating part is done, as you know, with scripting, in a cinematic behavior state. I assume you know how to do that. If you don't, the best way is to study the Raven scripts in the cinematics folder. As I have stated before in these forums, the examples Raven gave us are even better material than RichDiesal's tutorials.
10-23-2002, 08:35 AM
I've tried a few animations so I'll tell you how far I got.
Sitting- There are a few sitting animations including normal sit (bar at Nar Shaddar) lotus position (Luke cutscene) ****pit sit etc. One problem is that you can't do all that much while sitting as most of the talk gestures are written as standing up animations. You can get round this by applying these as ANIM_UPPER rather than ANIM_BOTH so that they only affect the upper body. Oh and you could do the choking if you wanted to (BOTH_CHOKE1START- remember the tavion cutscene).
I've been having problems doing your second question. It's easy to do it for an NPC (SET_VIEWTARGET) but this doesn't seem to work for non NPCs even with a script targetname. You can always do it using absolute refences (SET_DYAW, SET_DPITCH) but this is a bit fiddly.
The best way to find out what animations you can do is to look at anims.h, and then good old trial and error!
10-23-2002, 08:43 AM
I can't believe this forum! Help I'm being censored- they can't handle the truth!
OK the third kind of sitting animation was for the place where the pilot sits- the C0CKpit.
10-23-2002, 09:44 AM
Thanks a lot guys, this thread is a big help to me as well :)
10-23-2002, 04:09 PM
i just wanted to get some ideas of what i'll be able to do and what i won't.
I can't give away too much of my plot, but if you ever saw the movie strange brew, when the guy plays the organ music, and all those guy's in the black and white hockey stormtrooper like armor start reacting to the music..... i wanted to do something like that.
without the hockey stuff though!!!
vBulletin®, Copyright ©2000-2014, Jelsoft Enterprises Ltd.