How do make an ai

idk i don’t know

well, i dunno either but i have a feeling ai might have to do with the random code. there is 3 codes where the computer chooses by random. use the random code and mess around with it. :)

if you have something like a 2p and a vs cpu, play 2p first and identify the goal of the player. for example, if i wanted to make a cpu for my shooter game, the goal of the player is to dodge bullets and shoot the other player. i would make the computer shoot toward the player (easier) and move away when the enemy bullet is coming (way harder).
if you had a villain, decide its movesets (like for bowser in SMB), it can walk, jump, throw hammers, and launch fire at you. do those moves randomly.

3 Likes

The simplest AI is one that follows a character! You could edit the code from this example: https://www.youtube.com/watch?v=r9j-3Ka09U8&feature=emb_logo

So that instead of mouseX, mouseY it uses character.x character.y


I expanded on the example above and made this little AI follower example. The fly checks how far it is from the character, and moves toward the character if he’s further away! HTML and .wick file are down below.

basic_ai_follower.html (2.1 MB)
basic_ai_follower7-20-2020_12-56-47PM.wick (47.3 KB)

thanks!!!

1 Like