Page 1 of 1

Number less than 1

Posted: Tue Feb 23, 2016 12:11 pm
by Stern
I have a question, how to create usable numeric value for script that is smaller than 1 ?
I made the sky to spin to create moving clouds in Ardennes2coop but its spinning too fast with value "1".

Some parts of the script:
-----
Frame Item1; FRM_FindFrame(Item1,"m_ad1_sky_");

Label spin:
FRM_RotateY(Item1, -360, 1);
goto spin;
-----

0.1 and 1/10 doesnt work, and it doesnt work if used with variable:

Integer nr1=0.1;
FRM_RotateY(Item1, -360, nr1);


Maybe its not possible or this Rotate function does not work with values less than 1...

Re: Number less than 1

Posted: Wed Feb 24, 2016 6:10 pm
by betteryouthanme
Hey,

1 in your example means 1 degree/s (taken from script_tokens.txt <<link>>)

Guess it does not work with float numbers. Though you can try using "," instead of ".", if you have not yet.
But it seems that scripts do simply not work with float numbers.

However if you could make it somehow, FRM_RotateY would still not work on dedicated server just like e.g all the formation commands and lots more.

Code: Select all

Integer nr1=0.1;
is defined wrong, you try to store a float number (0.1) into an integer variable (nr1)

Re: Number less than 1

Posted: Wed Feb 24, 2016 7:09 pm
by Stern
1 means speed (slowest), -360 means degrees(negative), if i put positive 360 it rotates other way.
If its looping then even 1 degree will work.

I selected Integer because it means numeric value.
As i see now, float doesnt exist in hd2exe, Enum, String, Bool, Real and Integer can be used, so i guess that float numbers cannot be used in HD2 scripts.