odd_value_convert¶
Syntax¶
odd_value_convert(value, type)
Returns¶
Value: A new Value, that will be the value you pass in, but converted. See the possible conversions here.
Description¶
This function will convert any Value into another type, converting the GameMaker value it holds as well.
Warning
If the conversion is not listed on the specification, then it is likely the game will crash.
Example¶
var value = odd_create_value(odd_type_int32, 21);
var newValue = odd_value_convert(value, odd_type_string);
show_debug_message(odd_value_val(newValue));
// ...
This would print “21” to the console, without using string(), because the value would already be converted.