PlayMaker Help & Tips > PlayMaker Help

Can an Int value = a particular string value?

(1/1)

derkoi:
Hi all,

I'm wondering if I can have an int value of "0" = a string value of "R", an int value of "1" = a string value of "N".

It's for a car game i'm working on and the gears are int values with 0 being reverse, 1 neutral and 2 upwards 1st gear upwards. I need to convert the int values to displayed strings.

Can anyone help please?

jeanfabre:
Hi,

 Several possibilities:


1: you make some simply switch states that trigger specific events for each gear

or

2: you use ArrayMaker, and create a hashtable referencing each gear string with the actual integer and poll within that hashtable to know what gear's string equals as int.

bye,

 Jean

Navigation

[0] Message Index

Go to full version