Aeon Posted May 28, 2002 Share Posted May 28, 2002 Someone please help! Link to comment Share on other sites More sharing options...
UniKorn Posted May 28, 2002 Share Posted May 28, 2002 http://www.lucasforums.com/showthread.php?s=&threadid=57585 Link to comment Share on other sites More sharing options...
Aeon Posted May 28, 2002 Author Share Posted May 28, 2002 Right, except the script is already written and exists in-game (it's already in the base folder). Isn't there a console command to select an NPC and have him execute a script? Link to comment Share on other sites More sharing options...
Xcom Posted May 28, 2002 Share Posted May 28, 2002 Yes, there is. An NPC must have a NPC_targetname. So, if you have an NPC. open entity window (N key) in Radiant and add: key: NPC_targetname value: npc1 (you can give any name) In the game you can use "runscript" command. Syntax: runscript <targetname> <script> Example: runscript npc1 common/crouchshoot If you wanna script run globally (not on specific NPC), just ignore targetname. Basically, this runscript is just a debug command for developers. In actual game you would need to run scripts by either target_scriptrunners or by assigning "spawnscript" key to the entity. Hope this helps. Link to comment Share on other sites More sharing options...
Aeon Posted May 28, 2002 Author Share Posted May 28, 2002 Yes it does, immensely. Thank you very much. :-) Link to comment Share on other sites More sharing options...
Aeon Posted May 29, 2002 Author Share Posted May 29, 2002 Actually, could you elaborate on that last paragraph? I'm not sure how to use target_scriptrunners or spawnscript ingame... Thanks again. Link to comment Share on other sites More sharing options...
Xcom Posted May 29, 2002 Share Posted May 29, 2002 You must create a trigger (say trigger_multiple) and target it at target_scriptrunner. Then select target_scriptrunner and in entity window (N key) enter: key: usescript value: path to the script (ex.common/crouchshoot). So when the player or NPC passes thru the trigger, the script will be executed. As to how to set "spawnscript" check this thread.. http://www.lucasforums.com/showthread.php?s=&threadid=54963 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.