Forum

> > CS2D > Scripts > How to make NPC walk.
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to make NPC walk.

4 replies
To the start Previous 1 Next To the start

old How to make NPC walk.

WiFi
User Off Offline

Quote
I want to make a map with walking NPCs.
I mean,NPC can walk from Point A to Point B.
It can be achieved?
sorry for my bad English.

old Re: How to make NPC walk.

Baloon
GAME BANNED Off Offline

Quote
Of course it's possible.

I am not sure Env_NPC can do it, but there is another way to create walking NPC, use Env_Sprite instead. Use Trigger_Delay for triggering the images, also use any entity to trigger your Trigger_Delay. Just imagine how it works.

If you want walking- Env_NPCs, LUA can do it with always hook. In my way, this is quite hard, so use Env_Sprites and triggers instead LUA codes.

old Re: How to make NPC walk.

sonkii
User Off Offline

Quote
Not possible.I think.

You mean CS2D normal npcs?no,you cant do it with lua.Use your own npc (image) and make the npc moves around.

On the other hand,CS2D npcs will moving if they spotted the player.You can use map editor tricks.

I am wrong or not?

old Re: How to make NPC walk.

Rainoth
Moderator Off Offline

Quote
If you're a mapper, your best choice is using env_sprite and then move it. It won't be a smooth motion though.

If you can script, you can use image position to move a sprite you load with image and a time hook.

You could also script CS2D bots to walk to your point with ai_goto.

You cannot move env_npc entities though.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview