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 / how can sync a action in outside Do--Loop ?

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 19th Jun 2016 19:56
Hi.
I need sync a action in outside of Do--Loop but i don't know how can do it.
I used Sync() and Swap() and Render() in my code but won't work.

Please guide me.

Thanks.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 19th Jun 2016 22:05
I don't understand what you are trying to do. I may be getting the wrong end of the stick here, but you can call Sync() from wherever you like. i.e:


Maybe if you post some code that isn't working, we can fix it for you?
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Jun 2016 02:43
In Tier 1, you can call Sync() anywhere that you want.

Showing the code that isn't working would help.
Cheers,
Ancient Lady
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 20th Jun 2016 04:22 Edited at: 20th Jun 2016 05:18
Thanks for Reply.

I want sync this code in outside of Do--Loop.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 20th Jun 2016 07:18 Edited at: 20th Jun 2016 07:23
i think you will do this:
AGK (Steam) V2.0.19 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th Jun 2016 11:40
Why do you return ret, when it does nothing?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 20th Jun 2016 11:45
@Mobiius because i think it can used to see if the scale max is reached.
AGK (Steam) V2.0.19 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th Jun 2016 12:41 Edited at: 20th Jun 2016 12:41
Then you mean this...


But if it were me, I personally see no point in having two syncs in any game loop? What specifically neds you to sync somewhere else in the code? It makes it very difficult to debug when things go wrong, and I personally think it's bad practice to have multiple screen draws in the code.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 20th Jun 2016 16:49
@Mobiius not, because you made a loop without sync. the result can used for exit the loop or as trigger. me not know what Behdadsoft exact will do.
AGK (Steam) V2.0.19 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 21st Jun 2016 11:30
Thanks All for reply.

lets I test something and if need I description more about this. I doubt to something in my code.
so I after test I will description more about my mean.

Thanks.

Login to post a reply

Server time is: 2024-09-29 15:24:05
Your offset time is: 2024-09-29 15:24:05