YunO Posted July 27, 2009 Author Share Posted July 27, 2009 Can anybody teach me how to make a scripted NPC? I don't know how to make it stay stopped, and in one direction, and execute the script when attack him… Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 27, 2009 Share Posted July 27, 2009 To have him stay stopped, you just surround the NPC with "Npc-avoid" attributes.To have him execute the script, you use the ScriptedNpc sub in the Main.txt; for more information, I'd recomend consulting the Scripting boards, moreso the http://www.touchofdeathforums.com/smf/index.php/topic,10036.0.html tutorial. Link to comment Share on other sites More sharing options...
YunO Posted July 27, 2009 Author Share Posted July 27, 2009 Ok, sorrund with npc avoid… FineThat tutorial I already knew, but how to define the direction of the NPC? Link to comment Share on other sites More sharing options...
damian666 Posted July 27, 2009 Share Posted July 27, 2009 you mean like face in 1 direction?sadly thats not really do-able, but what you can do to get teh same effect, make all frames on that NPC face the same direction.thats what i do, and when you want to let it stay still, set its behaviour to shopkeeper or whatever its called :)Damian666 Link to comment Share on other sites More sharing options...
Greendude120 Posted July 27, 2009 Share Posted July 27, 2009 Warning - while you were typing 2 new replies have been posted. You may wish to review your post. (Wtf! Twice in one day)And use the http://www.touchofdeathforums.com/smf/index.php/topic,8502.0.html topic for commands to put in your sub once you've learnt how :) Link to comment Share on other sites More sharing options...
YunO Posted July 27, 2009 Author Share Posted July 27, 2009 I can't put shopkeeper if I use scripted… Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 27, 2009 Share Posted July 27, 2009 @[ToD:> YunO - oh shit! link=topic=49012.msg507801#msg507801 date=1248727081]> I can't put shopkeeper if I use scripted…What I do (as well as everyone else), is surround the NPC with NPC-Avoid, and just add a new row in the Sprites.bmp, so the NPC is always facing one direction.It may be possible doing it via scripting with the command, I think it's called "SetNpcDir", and have it in the OnMapLoad sub; have an If-Then check to see what NewMap is, and if NewMap has the NPC you want, just Call SetMapNpcDir(NewMap, NpcIndex, Direction)May work. Link to comment Share on other sites More sharing options...
YunO Posted July 28, 2009 Author Share Posted July 28, 2009 Well, I'll just put it with the NPC Avoid. But there is another problem, when I attack or do anything else, nothing happen! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now