How do I Fix this Recursion (Minimax Algorithm)

Get help using Construct 2

Post » Sun Mar 23, 2014 3:48 am

I'm trying to build a board game 3x3 (like the last man standing) with AI. When I'm building the algoritm, there is a little problem with some condition. Like the image below.
i just want to run "Terpilih = -1000" one time only, but its keep running and never done the "Else" events.

For more detail check this
Game Papan Strategi.capx
You do not have the required permissions to view the files attached to this post.
Posts: 1
Reputation: 127

Post » Sun Apr 20, 2014 2:04 pm

Else events only triggered when the last event is NOT triggered, so if it always triggered the last event, of course the else event won't be triggered. Have you tried to look at the debugger and see if the Terpilih variable actually change value when you want it to change? Have you tried the "System > Trigger once while true" condition? (it supposed to make sure the event only triggered once, and only triggered again after the statement becomes false, because of a change of a variable's value for example)

ps: fellow Indonesian here. (Ini buat tugas akhir ya? Eventnya sudah cukup rumit jadi susah bantu cari penyebab errornya kenapa, soalnya minim komentar di kodenya.)
Posts: 16
Reputation: 776

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests