Showing quotation marks in a string parameter

Get help using Construct 2

Post » Wed Jul 31, 2013 9:52 am

Suppose I have a function that passes multiple parameters, with one of them being a string:



In the function itself, it will display these parameters:



However, I want quotation marks to be visible around the string text that is shown. How would I accomplish this?
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,234

Post » Wed Jul 31, 2013 10:06 am

You can use a double quote as escape character.

So if you want the quotation marks to be visible you should use 2 "" evertime you want to display it.

e.g.

set text to """Damage:"" " & Function.Param(1) & newline & """MaxSpace:"" " etc.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Jul 31, 2013 10:16 am

I mean in the function command to display the parameters, I want to be able to add visible quotation marks around Function.Param(4) as opposed to adding them to the function call itself (and passing in the quotation marks as part of the parameters).

Is it possible to do this?
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,234

Post » Wed Jul 31, 2013 1:17 pm

Double quotes can be used as an escape character in any string, including function parameters. Setting parameter 4 to """Medium Range Remover""" should work fine.
B
64
S
19
G
8
Posts: 341
Reputation: 12,185

Post » Wed Jul 31, 2013 1:27 pm

[QUOTE=Excal] I mean in the function command to display the parameters, I want to be able to add visible quotation marks around Function.Param(4) as opposed to adding them to the function call itself (and passing in the quotation marks as part of the parameters).

Is it possible to do this?[/QUOTE]

Yes you just have to use the escape character as i mentioned.

Something like this

.....newline & """" Function.Param(4) """"

Made a small .capx

Was that what you are looking for?
B
20
S
6
G
4
Posts: 347
Reputation: 4,451


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests