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
21
S
3
Posts: 53
Reputation: 1,100

Post » Thu Apr 27, 2017 4:13 pm

check out jerementors gun video it includes a capx!
Image
B
30
S
16
G
12
Posts: 318
Reputation: 9,829

Post » Thu Apr 27, 2017 4:14 pm

ImageImageImage
B
71
S
22
G
257
Posts: 3,791
Reputation: 142,698

Post » Thu Apr 27, 2017 7:40 pm

@blackhornet Thanks. I figured there was a simple way.
B
21
S
3
Posts: 53
Reputation: 1,100

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
21
S
3
Posts: 53
Reputation: 1,100

Post » Fri Apr 28, 2017 5:51 am

Sorry for the confusion !
Image
B
30
S
16
G
12
Posts: 318
Reputation: 9,829


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests