Number less than 1

This is the place to talk about everything and anything.
Stern
Sergeant
Posts: 74
Joined: Sun Nov 09, 2014 11:44 am

Number less than 1

Unread post by Stern » Tue Feb 23, 2016 12:11 pm

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...

User avatar
betteryouthanme
Lieutenant
Posts: 116
Joined: Thu Jun 12, 2008 1:37 pm
Location: Germany
Contact:

Re: Number less than 1

Unread post by betteryouthanme » Wed Feb 24, 2016 6:10 pm

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)

Stern
Sergeant
Posts: 74
Joined: Sun Nov 09, 2014 11:44 am

Re: Number less than 1

Unread post by Stern » Wed Feb 24, 2016 7:09 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests