Need urgent help on cordova

Get help using Construct 2

Post » Wed May 18, 2016 8:42 am

Hi everyone! Ca some one provide me some example.capx of using cordova-plugin-game?
The problem is - project compiled by intelXDK, and everything is good, project log in to google play pefectly, BUT USER PHOTO DID NOT LOADING! =((( Can some one help me?
code i use to load GP userImage:
on start of layout--___trigger once while true->cordova-plugin-game___login, tag "log"
c-p-g is logged in ->c-p-g_ get user image
c-p-g__on user ime get success-> sprite load image url_c-p-g.userImageUrl
The whole life is in the movement.Stopped - fell asleep to hell...
B
14
S
3
G
1
Posts: 122
Reputation: 1,694

Post » Wed May 18, 2016 9:05 am

I dont know the cordova plugin. But if it works as all read/write plugins do, then time is your problem.

'on start of layout' runs its actions just once. After it ran once, it keeps its actions and sub conditions out of the following ticks.

So, first of, that 'trigger once while true' (unless its embeddded in a loop) has no meaning. After one time working, it will not see one tick again.

Secondly. I suppose the 'cordova-plugin-game___login, tag "log"' will log in the user. When you tested this at home, it probaly took almost no time to complete. So the 'c-p-g is logged in' got triggerd in time and picked it up. But this does take time. Also 'get user image' takes time.

Every time you use a 'store' or 'read' condition. That reading and storing will take time. Thats why they all have a 'on completed' or a 'on succes' condition. But if you keep those in the 'on start of layout' they will not be checked in the following ticks.

Just bring them out of the 'on start of layout'. Make them root events. Then they check every tick if there is a succes story to tell. And if so, they run there actions.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon May 23, 2016 10:02 am

nope, this is not a solution. still no photo
The whole life is in the movement.Stopped - fell asleep to hell...
B
14
S
3
G
1
Posts: 122
Reputation: 1,694


Return to How do I....?

Who is online

Users browsing this forum: Seruza and 9 guests