How to add newline ("\n") on event sheet?

For developers using the Construct 2 Javascript SDK

Post » Sun Jun 24, 2012 3:50 am

Could we add newline ("\n") on ACE table?

Uh, for example, an action could set both speed and angle.
Original, there is one line.
[code]Set speed to <i>{0}</i>. Set angle to <i>{1}</i>.[/code]
After adding newline, it could be two lines
[code]Set speed to <i>{0}</i>.
Set angle to <i>{1}</i>.[/code]

I try to add "\n", or "<br> ... </br>", but useless.rexrainbow2012-06-24 04:17:01
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Sun Jun 24, 2012 2:38 pm

I think that just creating a new action is the same. C2 works that way after all.

B
42
S
11
G
5
Posts: 446
Reputation: 6,417

Post » Sun Jun 24, 2012 3:37 pm

@Sargas

Yes, the execution result will be the same.

Since two (or more) actions are bound in one action, user will never forget one of them, or user does not need to add two (or more) actions from menu.

Well, it's just an example. My goal is try to add a newline ("\n") in one description of action to make it more readable.rexrainbow2012-06-24 15:47:58
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Sun Jun 24, 2012 6:47 pm

Not a bad idea really. The editor can get a bit mangled when you have a lot of expressions. Then there's conditionals oy.
<code>int(angle(Sprite.Pathfinder.PathX((Sprite.EaseTween.Progress)-1),Sprite.Pathfinder.PathY((Sprite.EaseTween.Progress)-1),Sprite.X,Sprite.Y))>-1 &int(angle(Sprite.Pathfinder.PathX((Sprite.EaseTween.Progress)-1),Sprite.Pathfinder.PathY((Sprite.EaseTween.Progress)-1),Sprite.X,Sprite.Y))<180 ?"bang"&int(angle(Sprite.Pathfinder.PathX((Sprite.EaseTween.Progress)-1),Sprite.Pathfinder.PathY((Sprite.EaseTween.Progress)-1),Sprite.X,Sprite.Y)) :"tang"&int(angle(Sprite.X,Sprite.Y,Sprite.Pathfinder.PathX((Sprite.EaseTween.Progress)-1),Sprite.Pathfinder.PathY((Sprite.EaseTween.Progress)-1)))</code>
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Mon Jun 25, 2012 1:13 pm

Why not make two separate actions? Making one action which does two things is against the design of Construct 2, especially trying to insert newlines, which is never done by any official plugin or behavior.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Jun 25, 2012 3:35 pm

@Ashley

Uh, just a suggestion.
A very long description might not easy to read, even if it only do one action really.rexrainbow2012-06-25 15:47:32
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests