How do i "Give AI choice"

Get help using Construct 2

Post » Tue Sep 24, 2013 1:45 am

Hiya,

Im back again to ask if theres a way to give a enemy the option to switch its attacks based on a timer system. I want the enemy to stop its attack and decide on another of repeat the same to not make it to predictable of a enemy.

Is this possible? Hope so!

Lemme know if there is

Thank you people
B
9
S
1
G
2
Posts: 23
Reputation: 1,603

Post » Tue Sep 24, 2013 2:08 am

set the logic on variables, then have the variable chosen at random.

example

Enemy is within range of player: > set "Choice" random(1,2)
          Variable 1 is set: > sword attack pattern 1
          Variable 2 is set: > sword attack pattern 2

where "choice" would be a variable
B
26
S
7
G
1
Posts: 83
Reputation: 2,575

Post » Tue Sep 24, 2013 2:11 am

Are you using Turret Behavior?

I believe you can AquireNewTarget as long as it's within the Range.

You could set a variable:

set RandomAItarget to random(0,1)

if RandomAItarget = 1 then AquireNewTarget etc...

otherwise do nothing (keep attacking the current target)
   
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Tue Sep 24, 2013 11:55 pm

Thank you very much ppl
B
9
S
1
G
2
Posts: 23
Reputation: 1,603


Return to How do I....?

Who is online

Users browsing this forum: gameglaux and 3 guests