Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Scripted NPC


YunO
 Share

Recommended Posts

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

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

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

@[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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...