This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-09-17 09:04:55

JorZed
Scratcher
Registered: 2012-07-15
Posts: 8

enemy AI

Every time i try developing my own AI script it doesn't work can someone help me?

Offline

 

#2 2012-09-17 12:20:48

Prestige
Scratcher
Registered: 2008-12-15
Posts: 100+

Re: enemy AI

It depends on the type of AI. They normally work by selecting an attack or combo from a list by determining which action will bring about the greatest possible result for the AI. It's impossible to give an example that you could use without knowing how your game works, but in this top down shooter I use an enemy AI so it might be relatable.


"Don't insult someone until you've walked a mile in their shoes. That way, if they don't like what you have to say, you'll be a mile away and still have their shoes  smile  "

Offline

 

#3 2012-09-17 15:23:54

Laserjl
Scratcher
Registered: 2011-11-13
Posts: 19

Re: enemy AI

make a variable, call it damage,and set damage to  a random number between 10 and 20 minus enemys defense(variable).

cool


http://scratch.mit.edu/projects/Laserjl/2856013

Offline

 

#4 2012-09-18 02:42:08

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: enemy AI

Laserjl wrote:

make a variable, call it damage,and set damage to  a random number between 10 and 20 minus enemys defense(variable).

cool

That is not Artificial Intelligence. That's just a script for damage.


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#5 2012-09-18 06:30:33

TPAL125
Scratcher
Registered: 2012-06-09
Posts: 18

Re: enemy AI

What do you want the Ai to do?

Offline

 

Board footer