top of page
検索
  • 執筆者の写真稲村JIN

Hint

更新日:2020年9月1日

Usage of Random Values

To Add you a random value to your macro, you can use the random library of python. You can replace any value of the macro with a function of the random library.

Examples

You can add a random value to the location of an object by replacing the (X, Y, Z)-values of the location.

To input integers you can use the randrange function by writing random.randrange(startvalue, endvalue)

In the example we get back a random integer value between 0 and 10. The location of the object could be (2,4,0) or (3,8,6) and so on. To add a random floating point number you can use the uniform function by writing random.uniform

In the example we get back a random value between -5 and 5. The location of the object could be (3.01,-2.366,0.398) or (-1.801,4.222,-5) and so on.

閲覧数:707回0件のコメント

最新記事

すべて表示

Action Recorder Update's

V3.4.1 August 28, 2020 Bug fix Import "ActionRecorderButtons.zip" is not working Global Actions disappear V3.4.0 August 27, 2020 Bug fix Multiple Global Action buttons have been selected Global Ac

Bug Report

メールは必ず件名に「ActRec_Bugs」とご記入ください 返答出来ない可能性があります Please be sure to put "ActRec_Bugs" in the subject line I may not be able to respond to you. magic.inamura.jin@gmail.com Twitterアカウントをお持ちのユーザーはこちらから For u

Hint & Help

ヒント (日本語) Hint (English)

記事: Blog2_Post
bottom of page