Discuss Scratch

Silenttaco99
Scratcher
58 posts

Help with AI for Super Smash Bros game

Hello I need help with creating AI for a super smash bros game. I just need a basic idea of what to start with. I don't want to create something simple because there are usually flaws that can be exploited and I want to reduce that by making it complex.
-Scratchdotmit-
Scratcher
49 posts

Help with AI for Super Smash Bros game

Silenttaco99 wrote:

Hello I need help with creating AI for a super smash bros game. I just need a basic idea of what to start with. I don't want to create something simple because there are usually flaws that can be exploited and I want to reduce that by making it complex.

So basically what exactly do you want it to do?? I don't play super smash bros
Silenttaco99
Scratcher
58 posts

Help with AI for Super Smash Bros game

I want to add a mode where you fight a.i. before fighting a boss. Super smash bros is like any arcade fighter game except its more complex. I just want to make an AI that knows how to move back when your gonna attack for example and it attacks you when its close.
-Scratchdotmit-
Scratcher
49 posts

Help with AI for Super Smash Bros game

Silenttaco99 wrote:

I want to add a mode where you fight a.i. before fighting a boss. Super smash bros is like any arcade fighter game except its more complex. I just want to make an AI that knows how to move back when your gonna attack for example and it attacks you when its close.

That would be super hard because you know, the AI would knwo what to do and when. I guess you could do some stuff, like for example

when green flag clicked
forever
if <(distance to [ Player]) < [10]> then
switch costume to [ Punch]
end
end

(for the punch)

I guess I could help you on this project if you like

Last edited by -Scratchdotmit- (Sept. 10, 2020 01:44:37)

Silenttaco99
Scratcher
58 posts

Help with AI for Super Smash Bros game

Ok thank you, maybe I can make a studio. I just need to fix many bugs in my game.
Wyan100
Scratcher
1000+ posts

Help with AI for Super Smash Bros game

i would recommend looking up some Popular Scratch Smash games (such as this one) and seeing what they do, maybe you could find some inspiration.
-Scratchdotmit-
Scratcher
49 posts

Help with AI for Super Smash Bros game

Simple Crouch

when green flag clicked
forever
if <key [ c (crouch key)] pressed?> then
if <(distance to [ Player]) < [10]> then
if <(pick random (1) to (2)) = [1]> then
switch costume to [ crouch]


else

end
end
end
end
NANI_Studios
Scratcher
4 posts

Help with AI for Super Smash Bros game


This is how i learned to do the AI left and right movement
define (move speed)(friction)(gravity)(jump height)
if <(direction) > [0]> then
if <(distance to [ player]) > [50]> then
point towards [player ]
change [x vel] by (move speed)
end
end
if <(direction) < [0]> then
if <(distance to [ player]) > [50]> then
point towards [player ]
change [x vel] by (move speed)
end
end
change [x vel ] by ((x vel) * (friction))
change x by (x vel)

Last edited by NANI_Studios (Dec. 7, 2020 00:01:42)

Powered by DjangoBB