How do I interpret a text ?

Get help using Construct 2

Post » Fri Jun 16, 2017 7:42 pm

I have : 0#1#1#5

I would like to have:
variable1 : 0
variable2 : 1
variable3 : 5

This is just an example, because I have 51 variables in total, not only 3

Can you help me please
B
6
S
1
Posts: 5
Reputation: 455

Post » Fri Jun 16, 2017 7:50 pm

You are looking for the tokenat() system expression. Here is the manual entry:

https://www.scirra.com/manual/126/system-expressions
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
52
S
17
G
26
Posts: 432
Reputation: 18,084

Post » Fri Jun 16, 2017 8:10 pm

thanks I found what I was looking for :

tokenat ("0|1|5", 2, "|")

it returns me 5
B
6
S
1
Posts: 5
Reputation: 455


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests