NPC Help

Im creating a Text Based Space Strategy game. (example: www.SEInfinium.net)

I am wanting to create NPCs that go to different sectors by them selves.
They need to auto attack anyone with certain reputation points.
If they die I need the to drop loot.

Can anyone help me out? I have no clue…

Hello and welcome to PHPHelp,

do you use pseudo code to plan a project?

in level/sector/area
if reputation points >= x then NPC attack (class, function or procedure call)
or player enters arena: switch case reputation points NPCattack, default ignore

place a life staus for each character (class, function or procedure)
load and track the life status for each character throughout a level
if life status x (dead) then drop_loot (class, function or procedure call)

not too difficult in theory but coding it is a different story.
maybe search for open source examples will help.

PHP Help has alot of experienced and wise members. maybe someone has more to say.

Sponsor our Newsletter | Privacy Policy | Terms of Service