Is it possible to get a number from text?

Get help using Construct 2

Post » Thu Apr 27, 2017 4:03 pm

I am trying to make a gun system in my game, that is extremely mod friendly. To do this, I plan to access a text file via the AJAX plugin, and then have the text in the file effect the properties of the gun.
For example you could put "BulletBounceFalse,CanAimTrue,ShootPhysicsObjFalse" Ect. (I Hope that made since)
I have already made a functioning prototype, that works pretty well. But I have ran into a problem that I cannot find a solution for. Pretty much I would like you to be able to put (for example) "Damage10,Accuracy5,Kick7" Ect. I simply cannot find anyway to convert text into a number. I do not know if this is even possible in C2, and I would appreciate any help the anyone could provide.
B
18
S
3
Posts: 52
Reputation: 1,023

Post » Thu Apr 27, 2017 4:13 pm

check out jerementors gun video it includes a capx!
Image
B
20
S
10
G
10
Posts: 229
Reputation: 7,624

Post » Thu Apr 27, 2017 4:14 pm

ImageImageImage
B
71
S
21
G
221
Posts: 3,650
Reputation: 124,229

Post » Thu Apr 27, 2017 7:40 pm

@blackhornet Thanks. I figured there was a simple way.
B
18
S
3
Posts: 52
Reputation: 1,023

Post » Thu Apr 27, 2017 7:53 pm

@LaurenceBedford I think you misunderstood my question. I was not really asking about how to make weapon system, I was just using that to explain my problem. I really needed help with converting text to a integer. But thanks anyway.
B
18
S
3
Posts: 52
Reputation: 1,023

Post » Fri Apr 28, 2017 5:51 am

Sorry for the confusion !
Image
B
20
S
10
G
10
Posts: 229
Reputation: 7,624


Return to How do I....?

Who is online

Users browsing this forum: alextro, Ryan Kocourek, Yahoo [Bot] and 7 guests