Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Help With Debuger

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 5th Mar 2016 12:24 Edited at: 5th Mar 2016 12:50
Hi.

for my character I used Random() command . (for e.g: if Rand = 1 then FireBullet, if Rand = 2 then Walking to Player ,....) .

but sometimes when Rand is 1 instead of play FireBullet Animation. it Play Walking to Player Animation.

so I need a way to find this problem. but I don't know how can find it with debugger, also I don't know AppGameKit debugger can do it or not . if anyone have idea pleaseguide me to fix it.

this is my Random code:



I think this code is correct and problem is relate to Action Functions() . but I want know is there any way to check some variables with debugger or not?

Thanks.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Mar 2016 13:06
try using breakpoints, red dot beside row no.
copy Rand into debugger variable list.
use debug step, F10 if editor is active.
AGK (Steam) V2.0.17 : Windows 10 Pro 64 Bit : AMD (15.30.1025) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 5th Mar 2016 15:38
Quote: "Rand = Random(4,3)"


This should be Rand = Random(4,6).

Also you don't need : behind case. I don't know if that causes any problems though.

Your problem could be elsewhere though as I can't see anything that would give you the problems you have.
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 5th Mar 2016 16:17
Quote: "try using breakpoints, red dot beside row no.
copy Rand into debugger variable list.
use debug step, F10 if editor is active."


Thanks Markus.

Quote: "This should be Rand = Random(4,6)."

yes, In my main code I fixed it.

Quote: "Also you don't need : behind case. I don't know if that causes any problems though."


second Select case when happen that Distance is Less than 2.

Login to post a reply

Server time is: 2024-11-25 10:16:31
Your offset time is: 2024-11-25 10:16:31