# CallActivity

### Introduction

The CallActivity property on an object determines if the object will have its CustomActivity (custom code) and Activity (generated code) methods called. This value defaults to true, which means that objects will have their Activity (and CustomActivity) called automatically.

![](/files/2zETIytF21LIBWVJFeLc)

### CallActivity as False

CallActivity can be set to false to prevent generated code from automatically calling Activity on an object. This might be useful in a number of situations:

* If a Screen has multiple lists of the same type (such as EnemyList), and if instances may exist in both lists. The primary list should have CallActivity set to true, while other lists should have this value set to false to prevent Activity from being called twice per frame.
* If activity is never needed on an entity, and a large number of entities exist. Omitting activity calls may provide a small performance boost.
* If entity activity is optional. This scenario is considered advanced, and is not recommended for most games. However, the flexibility exists.

### CallsActivity and Lists (PositionedObjectList)

PositionedObjectLists which are contained in Screens and Entities will call Activity on all contained instances. Setting CallActivity to false will disable this functionality.


---

# 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.flatredball.com/flatredball/glue-reference/objects/glue-reference-callactivity.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.
