Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 5,875 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
inkey for integers/floats? #238045
11/24/08 14:35
11/24/08 14:35
Joined: Jul 2007
Posts: 48
M
MattyTheG Offline OP
Newbie
MattyTheG  Offline OP
Newbie
M

Joined: Jul 2007
Posts: 48
Hey guys, I'm working on a game where I want the user to be able to enter a launch angle, which will then be set to the objects tilt. Is there any type of function that is like inkey() but for numbers instead of strings? I tried using inkey and just entering numbers into the string but it didn't seem to do anything. I'm using lite-C by the way. I know how to do it in C++ but not everything else so I chose lite-c hah.

Thanks in advance for the help.

Re: inkey for integers/floats? [Re: MattyTheG] #238050
11/24/08 15:43
11/24/08 15:43
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline
Member
heinekenbottle  Offline
Member

Joined: Oct 2008
Posts: 218
Nashua NH
Try str_to_num, str_to_float and str_to_int

These three functions turn a string into a var, float and int respectively.

So you'd use inkey to get the string from the player, and then use one of the above instructions

Last edited by heinekenbottle; 11/24/08 15:44.

I was once Anonymous_Alcoholic.

Code Breakpoint;

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1