Log Object with new browser object

Get help using Construct 2

Post » Fri Jun 14, 2013 11:31 am

Hi everybody,

Even though I've beeen developing with construct for a while now I've never asked a question here before. So here goes:

With the old browser plugin described here http://www.scirra.com/forum/log-text-Objects-to-chrome-console_topic47859.html I could easily log objects like arrays to the browser. With the new Construct browser object I can't figure out how to do this. I'm not allowed to just log the object and printing as JSON is not very readable.

Any ideas?
B
3
Posts: 5
Reputation: 235

Post » Fri Jun 14, 2013 11:44 am

The plugin you refer to is a third part plugin.

The built in Browser plugin could allow you to do so with this action I think:
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,311
Reputation: 71,086

Post » Fri Jun 14, 2013 2:42 pm

Yeah I tried that, see in my above post: "With the new Construct browser object I can't figure out how to do this. I'm not allowed to just log the object and printing as JSON is not very readable."

My simple array comes out looking like this, pretty unreadable compared to the third party plugin's version. Was just wondering if there was another way. (here's what my simple 2D array looks like in JSON" {"c2array":true,"size":[12,2,1],"data":[[[1],["B"]],[[2],["B"]],[[3],["B"]],[[4],["B"]],[[5],["B"]],[[1],["B"]],[[7],[0]],[[8],[0]],[[9],[0]],[[10],[0]],[[11],[0]],[[12],[0]]]} )


Nevermind, found out I can use go to layout by name and then enter a variable for the question below. In my case: Go to Layout QContent.At(currentQIndex,2)
Also, is there a way to dynamically load a layout? I have a quiz game where each question has a questiontype, each type has its own layout. So I've stored the questionnumbers and their layout types in an array and want to load the appropriatelayout as mentioned in the array to be loaded.Salvator2013-06-14 14:47:03
B
3
Posts: 5
Reputation: 235


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests