Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 14th, 2024, 11:19 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Capturing user input to create script parameters
PostPosted: June 23rd, 2006, 5:22 pm 
Offline

Joined: December 6th, 2005, 6:18 pm
Posts: 23
Trying to make interactive mathematics pub and want to allow users to rotate objects through degrees chosen by them. How can I capture user input into the parameters of opus script? Or achieve the same result by another method?

e.g. SetRotation(Angle - user choice, direction, time,wait)

Anyone with a working example who feels like forwarding, bring it on!!

Thanks

Peter


Top
 Profile  
 
 Post subject:
PostPosted: June 23rd, 2006, 11:49 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Peter

I've attached a sample.

It was created as follows:

Set up a text input box in which the viewer can enter a number for the rotation angle, using the store input in a (new) variable. We can, for example, call the variable "angle." An advanced trigger like key press, any key and a store to text (.txt) file action with TEMP directory checked will save the number's value in the variable, angle. Then a button to rotate a vector object called Vector1 can read the text file for variable, angle, and be scripted as

Vector1.SetRotation(angle, true)

The viewer enters a number, clicks the button and the vector rotates to the angle they entered.

Variations on this design can be created given Opus's extraordinary versatility.

Hope this helps.

Kind Regards,


You do not have the required permissions to view the files attached to this post.

_________________
Stephen


Last edited by Stephen on June 27th, 2006, 3:26 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Hip Hip
PostPosted: June 26th, 2006, 10:26 am 
Offline

Joined: December 6th, 2005, 6:18 pm
Posts: 23
Stephen

Thanks for taking the time to do this. It's exactly what I'm looking for and another step on the ladder of me getting my head completely around this scripting lark.

Peter


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group