โ† Back to Courses
โšก JavaScript ๐ŸŒฑ Beginner โšก 50 XP โฑ 8 min โญ Premium

Decision Trees: If Player Near, Attack

๐Ÿ“‹ Instructions

Real game AI makes DECISIONS: 'If the player is close, attack. Otherwise, wander.' This is called a decision tree.

Build an enemy that picks different actions based on the situation.

๐Ÿ”’

The code editor and XP reward for this lesson are part of Premium.

Unlock Premium
๐Ÿ”’

This is a Premium Lesson

Subscribe to unlock the interactive code editor, run your own solutions, and earn XP for this lesson.

โญ Unlock Premium