Hey. I was wondering if anybody would know how I would construct a script to enable me to control an npc (like how you can control the mouse and r5 droids in jk2)
I honestly would have no idea how to start.
It will only work in SP, but I think you just need one line.
I may be wrong, because I've never used it. But according to the documentation, that's what that command does. All you need is an npc with a targetname.
Check that out, it should get you on your way.
Thanks a lot.
Just a LITTLE problem...:(
When ever I give a npc a targetname, it refuses to spawn.
Am I going to have to make a spawn script for it? :confused:
(I presume this because when i typed in "npc kill all" I got a message saying that the npc was a "spawner")
I got the wrong variable. The correct variable is SET_VIEWENTITY. My bad.
If you give an NPC a targetname, it needs fired by a trigger somewhere, and it will spawn when triggered. Give that a shot, and if that doesn't work, there's one other possibility. :)
All right, thanks.
I guessed about the view entity thing, but the trigger thing really helped.
If targetname fails to change your view to the NPC, you may need to use an npc_targetname or npc_target instead.......I forget which. Otherwise, it's up to a manual or a more experienced modder to answer your question.
[COLOR=Navy]I think you should open from the JK2 the kejim_base map...on that's end there is a control with a mouse, and the script there are in the assets0.pk3...and the essence is that, what ov_nab622 sait, use VIEWENTITY;) .........Sry, I can't understand everything....did you fix the problem, or no?:D [/COLOR]
No, I haven't yet been able to get it to work, but I think that it's because of how I've set it up in my map.
The script I made is just a one liner "set view entity" so it should be working.
I've just got to set this map up to work.
I hate scripting...
Post a screenshot of the script, and a screenshot of the entity window (with the NPC selected, of course). That'll make it pretty easy for us to help you.