# VCode Function

A VCode function is a script written in using block programming and attached to a virtual object. This action allows you to play the script.&#x20;

Entity: The virtual object containing the script to run

VCode Function: The function to run. (**Note:** Currently only 1 VCode function can be attached to an virtual object and will be titled **Default VCode Function**).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.siminsights.com/authoring-a-simulation/state-machine/actions/vcode-function.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
