Forum

> > CS2D > Scripts > How can creat any new npc?
Forums overviewCS2D overview Scripts overviewLog in to reply

English How can creat any new npc?

4 replies
To the start Previous 1 Next To the start

moved How can creat any new npc?

gunfire
User Off Offline

Quote
How can creat any new npc?
please tell me,i want to creat some new npcs!
like machinegunman and ghost?
i need the Detailed lesson!

old Re: How can creat any new npc?

dENd
User Off Offline

Quote
user gunfire has written
How can creat any new npc?
please tell me,i want to creat some new npcs!
like machinegunman and ghost?
i need the Detailed lesson!


you cant

you can only edit the sprites/images of them in the gfx folder

old Re: How can creat any new npc?

Apache uwu
User Off Offline

Quote
With lua only.

Here are the hooks you will need.

Hook_always---> for constant npc movement
Hook_projectile---> to see if it was hurt

You will need to make an image, then have the image tween_ at random or moving towards the closest player.

If the player shoots back it will have a health counter from xmax to 0, once at zero you can add your own little effect for death.

Weiwen does an excellent job of implementing that in his RPG mod. Here it is if you want to learn from it. clicky.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview