Script Editor Introduction

From Computing and Software Wiki

Jump to: navigation, search

The Script Editor is a tool provided by the C4 engine. As the psychologists, it will be with this script editor that all the magic behind an experiment will happen. Creating pictures and placing them at specific places on the screen for specific set amount of times will all be done here. The script editor can be accessed through the world editor and attached to triggers and objects or just about any type of node that can take a controller. As such, it will most likely be attached with a trigger so that when the player or some object triggers it, it will cause the events of the script to occur.

To access the script editor, first choose a node to attach the script to by going to the menu select Node > Get Info or by short-cut key (CTRL + I)

Image:disptext1.jpg

Select the Controller tab and choose the 'Script'. A couple options appears on the right settings side.

  • Execute script upon load - Loads the script to start execution as soon as the world is loaded
  • Loop script continuously - Once the script has completed its full execution, it will continually to loop indefinately
  • Allow concurrent runs - Lets several versions of the script to run on different objects (?)
  • Requires unique concurrent activators - An activator must be used in order to have concurrent runs (?)

Image:disptext2.jpg

Selecting "Edit Script" will bring you to the following screen. Here is the basic layout of the script editor with all the methods along the left side, the tree diagram of the script, and settings for the methods on the right side.

Image:disptext3.jpg

Click and drag a method from the method list and dropping it on the Root node will display the following screen. An example of the settings for the Display Text method is shown with the settings of a string representing what should be displayed on the feedback textbox in the center of the screen.

Image:disptext4.jpg

A note should be taken that simultaneous methods can be called at the same time, simply by dropping more methods on its parent node (the node directly before the method you want to call). This allows for total control of how the experiment will run. An example of one is shown below.

Image:sampleexp.jpg

Return to RCaragogo

Personal tools