I need your great Experience.

Blitz3D Forums/Blitz3D Programming/I need your great Experience.

Kissme(Posted 2004) [#1]
Hi all,

I try to make a little cool game, i wan to know how i can manage and create some NPC ? Did i using scripts or coding all things for all NPC of the game...

Thanks you alot for reading and try to help.

Kiss ya all
Stephanie Pailly


Jeremy Alessi(Posted 2004) [#2]
You can do it however you want. I would proably set up a few behaviors which I could assign in the game's editor and then have the code take over to control logic depending on what settngs I applied to the NPC in a game editor.


Kissme(Posted 2004) [#3]
Hi Ban300,

Thanks for your answering :) but i try to make this :

I have a terrain, with 2 rabbits in, and i try to make them moving if player it's around.

If someone can help me to do that, i can make a donation around 50$ for his sample code.

Kiss,
Stephanie


Warren(Posted 2004) [#4]
If you can't handle moving a few rabbits around a terrain, you might be biting off more than you can chew here. Maybe start with a smaller project...


IPete2(Posted 2004) [#5]
KissKool,

Look in the manual for commands such as

Entitydistance, entityvisible, entityinview, pointentity, moventity.

Use these to make a simple AI. In psuedo code (ie think it out loud and then work out how to code it)...

If player to rabbit distance is < 200 then move rabbit

If camera cannot see rabbit then don't move it.

if player distance to rabbit >500 then get rabbit to move towards player.


I hope this helps.

IPete2.


Kissme(Posted 2004) [#6]
Ok thanks you Ipete2

Stephanie


TroM(Posted 2004) [#7]
you can also try a line pick with a radius, and after finding out the position of the entity in the linepick (the player) move the rabbit in opposite direction... or something...