Jump to content
3DCoat Forums

Picking paths and randomisation


ajz3d
 Share

Recommended Posts

  • Contributor

Hello guys. I'm kind of stuck writing my script because of the two things below. I'd be grateful if someone (Andrew perhaps?) could answer them.

  1. What's the best way of retrieving a chosen path from Save Dialog and passing it to some other automated Save Dialogs later in the script? I suspect this could have something to do with string GetFilePath( string &in s), but SaveDialog returns a boolean, not a string, so I have no clue how to pass the path from it to GetFilePath function. Documentation provides no information about file path management routines.
  2. Are there any C++'s integer/floating point randomisation functions in AngelScript?
Link to comment
Share on other sites

  • 5 months later...

Yes, here is Andrew's answer:

 

 

1. Use

bool OpenDialog(string &in extensions,string &out result)

result will be in "result".

2. Yes, read general AngelScript math doc -

http://angelcode.com/angelscript/sdk/docs/manual/doc_addon_math.html

Random numbers may be generated with

int rand(int min,int max);

float randF(float min,float max);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...