-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbge.types.SCA_PythonController.html
More file actions
346 lines (319 loc) · 28.2 KB
/
bge.types.SCA_PythonController.html
File metadata and controls
346 lines (319 loc) · 28.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SCA_PythonController(SCA_IController) — UPBGE/Blender Python API</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=9edc463e" />
<link rel="stylesheet" type="text/css" href="_static/css/theme_overrides_upbge.css?v=3436ad75" />
<link rel="shortcut icon" href="_static/upbge_favicon.png"/>
<link rel="canonical" href="https://upbge.org/docs/latest/api/bge.types.SCA_PythonController.html" />
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=aa05bc33"></script>
<script src="_static/doctools.js?v=fd6eb6e6"></script>
<script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
<script src="_static/js/theme.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="Search within UPBGE/Blender Python API"
href="_static/opensearch.xml"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="SCA_PythonJoystick(EXP_PyObjectPlus)" href="bge.types.SCA_PythonJoystick.html" />
<link rel="prev" title="SCA_PropertySensor(SCA_ISensor)" href="bge.types.SCA_PropertySensor.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home">
UPBGE 0.5x & Blender 5.2.0 Alpha Python API
<img src="_static/upbge_logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Documentation</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="info_quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="info_overview.html">API Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="info_api_reference.html">API Reference Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="info_best_practice.html">Best Practice</a></li>
<li class="toctree-l1"><a class="reference internal" href="info_tips_and_tricks.html">Tips and Tricks</a></li>
<li class="toctree-l1"><a class="reference internal" href="info_gotcha.html">Gotchas</a></li>
<li class="toctree-l1"><a class="reference internal" href="info_advanced.html">Advanced</a></li>
<li class="toctree-l1"><a class="reference internal" href="change_log.html">Change Log</a></li>
<li class="toctree-l1"><a class="reference internal" href="info_contributing.html">Contribute Documentation</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Application Modules</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="bpy.context.html">Context Access (bpy.context)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bpy.data.html">Data Access (bpy.data)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bpy.msgbus.html">Message Bus (bpy.msgbus)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bpy.ops.html">Operators (bpy.ops)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bpy.types.html">Types (bpy.types)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bpy.utils.html">Utilities (bpy.utils)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bpy.path.html">Path Utilities (bpy.path)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bpy.app.html">Application Data (bpy.app)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bpy.props.html">Property Definitions (bpy.props)</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Game Engine Modules</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="bge.types.html">Game Types (bge.types)</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="bge.types.html#introduction">Introduction</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="bge.types.html#types">Types</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="bge.types.BL_ArmatureBone.html">BL_ArmatureBone(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.BL_ArmatureChannel.html">BL_ArmatureChannel(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.BL_ArmatureConstraint.html">BL_ArmatureConstraint(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.BL_ArmatureObject.html">BL_ArmatureObject(KX_GameObject)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.BL_Shader.html">BL_Shader(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.BL_Texture.html">BL_Texture(EXP_Value)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.EXP_ListValue.html">EXP_ListValue(EXP_PropValue)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.EXP_PropValue.html">EXP_PropValue(EXP_Value)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.EXP_PyObjectPlus.html">EXP_PyObjectPlus</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.EXP_Value.html">EXP_Value(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_2DFilter.html">KX_2DFilter(BL_Shader)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_2DFilterFrameBuffer.html">KX_2DFilterOffScreen(EXP_Value)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_2DFilterManager.html">KX_2DFilterManager(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_BlenderMaterial.html">KX_BlenderMaterial(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_Camera.html">KX_Camera(KX_GameObject)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_CharacterWrapper.html">KX_CharacterWrapper(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_CollisionContactPoint.html">KX_CollisionContactPoint(EXP_Value)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_ConstraintWrapper.html">KX_ConstraintWrapper(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_FontObject.html">KX_FontObject(KX_GameObject)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_GameObject.html">KX_GameObject(SCA_IObject)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_LibLoadStatus.html">KX_LibLoadStatus(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_LightObject.html">KX_LightObject(KX_GameObject)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_LodLevel.html">KX_LodLevel(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_LodManager.html">KX_LodManager(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_MeshProxy.html">KX_MeshProxy(EXP_Value)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_NavMeshObject.html">KX_NavMeshObject(KX_GameObject)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_PolyProxy.html">KX_PolyProxy(SCA_IObject)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_PythonComponent.html">KX_PythonComponent(EXP_Value)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_Scene.html">KX_Scene(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_VehicleWrapper.html">KX_VehicleWrapper(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.KX_VertexProxy.html">KX_VertexProxy(SCA_IObject)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_2DFilterActuator.html">SCA_2DFilterActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ANDController.html">SCA_ANDController(SCA_IController)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ActionActuator.html">SCA_ActionActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ActuatorSensor.html">SCA_ActuatorSensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_AddObjectActuator.html">SCA_AddObjectActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_AlwaysSensor.html">SCA_AlwaysSensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ArmatureActuator.html">SCA_ArmatureActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ArmatureSensor.html">SCA_ArmatureSensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_CameraActuator.html">SCA_CameraActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_CollisionSensor.html">SCA_CollisionSensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ConstraintActuator.html">SCA_ConstraintActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_DelaySensor.html">SCA_DelaySensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_DynamicActuator.html">SCA_DynamicActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_EndObjectActuator.html">SCA_EndObjectActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_GameActuator.html">SCA_GameActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_IActuator.html">SCA_IActuator(SCA_ILogicBrick)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_IController.html">SCA_IController(SCA_ILogicBrick)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ILogicBrick.html">SCA_ILogicBrick(EXP_Value)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_IObject.html">SCA_IObject(EXP_Value)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ISensor.html">SCA_ISensor(SCA_ILogicBrick)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_InputEvent.html">SCA_InputEvent(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_JoystickSensor.html">SCA_JoystickSensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_KeyboardSensor.html">SCA_KeyboardSensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_MouseActuator.html">SCA_MouseActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_MouseFocusSensor.html">SCA_MouseFocusSensor(SCA_MouseSensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_MouseSensor.html">SCA_MouseSensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_NANDController.html">SCA_NANDController(SCA_IController)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_NORController.html">SCA_NORController(SCA_IController)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_NearSensor.html">SCA_NearSensor(KX_CollisionSensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_NetworkMessageActuator.html">SCA_NetworkMessageActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_NetworkMessageSensor.html">SCA_NetworkMessageSensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ORController.html">SCA_ORController(SCA_IController)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ObjectActuator.html">SCA_ObjectActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ParentActuator.html">SCA_ParentActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_PropertyActuator.html">SCA_PropertyActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_PropertySensor.html">SCA_PropertySensor(SCA_ISensor)</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">SCA_PythonController(SCA_IController)</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#bge.types.SCA_PythonController"><code class="docutils literal notranslate"><span class="pre">SCA_PythonController</span></code></a><ul>
<li class="toctree-l5"><a class="reference internal" href="#bge.types.SCA_PythonController.owner"><code class="docutils literal notranslate"><span class="pre">SCA_PythonController.owner</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#bge.types.SCA_PythonController.script"><code class="docutils literal notranslate"><span class="pre">SCA_PythonController.script</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#bge.types.SCA_PythonController.mode"><code class="docutils literal notranslate"><span class="pre">SCA_PythonController.mode</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#bge.types.SCA_PythonController.activate"><code class="docutils literal notranslate"><span class="pre">SCA_PythonController.activate()</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#bge.types.SCA_PythonController.deactivate"><code class="docutils literal notranslate"><span class="pre">SCA_PythonController.deactivate()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_PythonJoystick.html">SCA_PythonJoystick(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_PythonKeyboard.html">SCA_PythonKeyboard(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_PythonMouse.html">SCA_PythonMouse(EXP_PyObjectPlus)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_RadarSensor.html">SCA_RadarSensor(SCA_NearSensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_RandomActuator.html">SCA_RandomActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_RandomSensor.html">SCA_RandomSensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_RaySensor.html">SCA_RaySensor(SCA_ISensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_ReplaceMeshActuator.html">SCA_ReplaceMeshActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_SceneActuator.html">SCA_SceneActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_SoundActuator.html">SCA_SoundActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_StateActuator.html">SCA_StateActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_SteeringActuator.html">SCA_SteeringActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_TrackToActuator.html">SCA_TrackToActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_VibrationActuator.html">SCA_VibrationActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_VisibilityActuator.html">SCA_VisibilityActuator(SCA_IActuator)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_XNORController.html">SCA_XNORController(SCA_IController)</a></li>
<li class="toctree-l3"><a class="reference internal" href="bge.types.SCA_XORController.html">SCA_XORController(SCA_IController)</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="bge.logic.html">Game Logic (bge.logic)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bge.render.html">Rasterizer (bge.render)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bge.texture.html">Video Texture (bge.texture)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bge.texture.html#ffmpeg-video-and-image-status">FFmpeg Video and Image Status</a></li>
<li class="toctree-l1"><a class="reference internal" href="bge.texture.html#image-blending-modes">Image Blending Modes</a></li>
<li class="toctree-l1"><a class="reference internal" href="bge.events.html">Game Keys (bge.events)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bge.constraints.html">Physics Constraints (bge.constraints)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bge.app.html">Application Data (bge.app)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bgui.html">Game GUI (bgui)</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Standalone Modules</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="aud.html">Audio System (aud)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bl_math.html">Additional Math Functions (bl_math)</a></li>
<li class="toctree-l1"><a class="reference internal" href="blf.html">Font Drawing (blf)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bmesh.html">BMesh Module (bmesh)</a></li>
<li class="toctree-l1"><a class="reference internal" href="bpy_extras.html">Extra Utilities (bpy_extras)</a></li>
<li class="toctree-l1"><a class="reference internal" href="freestyle.html">Freestyle Module (freestyle)</a></li>
<li class="toctree-l1"><a class="reference internal" href="gpu.html">GPU Module (gpu)</a></li>
<li class="toctree-l1"><a class="reference internal" href="gpu_extras.html">GPU Utilities (gpu_extras)</a></li>
<li class="toctree-l1"><a class="reference internal" href="idprop.html">ID Properties Module (idprop)</a></li>
<li class="toctree-l1"><a class="reference internal" href="imbuf.html">Image Buffer (imbuf)</a></li>
<li class="toctree-l1"><a class="reference internal" href="mathutils.html">Math Types & Utilities (mathutils)</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">UPBGE 0.5x & Blender 5.2.0 Alpha Python API</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="bge.types.html">Game Types (bge.types)</a></li>
<li class="breadcrumb-item active">SCA_PythonController(SCA_IController)</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="sca-pythoncontroller-sca-icontroller">
<h1>SCA_PythonController(SCA_IController)<a class="headerlink" href="#sca-pythoncontroller-sca-icontroller" title="Link to this heading"></a></h1>
<p>base class — <a class="reference internal" href="bge.types.SCA_IController.html#bge.types.SCA_IController" title="bge.types.SCA_IController"><code class="xref py py-class docutils literal notranslate"><span class="pre">SCA_IController</span></code></a></p>
<dl class="py class">
<dt class="sig sig-object py" id="bge.types.SCA_PythonController">
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">bge.types.</span></span><span class="sig-name descname"><span class="pre">SCA_PythonController</span></span><a class="headerlink" href="#bge.types.SCA_PythonController" title="Link to this definition"></a></dt>
<dd><p>A Python controller uses a Python script to activate it’s actuators,
based on it’s sensors.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="bge.types.SCA_PythonController.owner">
<span class="sig-name descname"><span class="pre">owner</span></span><a class="headerlink" href="#bge.types.SCA_PythonController.owner" title="Link to this definition"></a></dt>
<dd><p>The object the controller is attached to.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="bge.types.KX_GameObject.html#bge.types.KX_GameObject" title="bge.types.KX_GameObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">KX_GameObject</span></code></a></p>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="bge.types.SCA_PythonController.script">
<span class="sig-name descname"><span class="pre">script</span></span><a class="headerlink" href="#bge.types.SCA_PythonController.script" title="Link to this definition"></a></dt>
<dd><p>The value of this variable depends on the execution method.</p>
<ul class="simple">
<li><p>When ‘Script’ execution mode is set this value contains the entire python script as a single string (not the script name as you might expect) which can be modified to run different scripts.</p></li>
<li><p>When ‘Module’ execution mode is set this value will contain a single line string - module name and function “module.func” or “package.module.func” where the module names are python textblocks or external scripts.</p></li>
</ul>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>string</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Once this is set the script name given for warnings will remain unchanged.</p>
</div>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="bge.types.SCA_PythonController.mode">
<span class="sig-name descname"><span class="pre">mode</span></span><a class="headerlink" href="#bge.types.SCA_PythonController.mode" title="Link to this definition"></a></dt>
<dd><p>the execution mode for this controller (read-only).</p>
<ul class="simple">
<li><p>Script: 0, Execite the <a class="reference internal" href="#bge.types.SCA_PythonController.script" title="bge.types.SCA_PythonController.script"><code class="xref py py-attr docutils literal notranslate"><span class="pre">script</span></code></a> as a python code.</p></li>
<li><p>Module: 1, Execite the <a class="reference internal" href="#bge.types.SCA_PythonController.script" title="bge.types.SCA_PythonController.script"><code class="xref py py-attr docutils literal notranslate"><span class="pre">script</span></code></a> as a module and function.</p></li>
</ul>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>integer</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="bge.types.SCA_PythonController.activate">
<span class="sig-name descname"><span class="pre">activate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">actuator</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#bge.types.SCA_PythonController.activate" title="Link to this definition"></a></dt>
<dd><p>Activates an actuator attached to this controller.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>actuator</strong> (<a class="reference internal" href="bge.types.SCA_IActuator.html#bge.types.SCA_IActuator" title="bge.types.SCA_IActuator"><code class="xref py py-class docutils literal notranslate"><span class="pre">SCA_IActuator</span></code></a> or string) – The actuator to operate on. Expects either an actuator instance or its name.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="bge.types.SCA_PythonController.deactivate">
<span class="sig-name descname"><span class="pre">deactivate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">actuator</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#bge.types.SCA_PythonController.deactivate" title="Link to this definition"></a></dt>
<dd><p>Deactivates an actuator attached to this controller.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>actuator</strong> (<a class="reference internal" href="bge.types.SCA_IActuator.html#bge.types.SCA_IActuator" title="bge.types.SCA_IActuator"><code class="xref py py-class docutils literal notranslate"><span class="pre">SCA_IActuator</span></code></a> or string) – The actuator to operate on. Expects either an actuator instance or its name.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="bge.types.SCA_PropertySensor.html" class="btn btn-neutral float-left" title="SCA_PropertySensor(SCA_ISensor)" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="bge.types.SCA_PythonJoystick.html" class="btn btn-neutral float-right" title="SCA_PythonJoystick(EXP_PyObjectPlus)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright UPBGE & Blender Authors.
<span class="commit">Revision <code><a href=https://projects.blender.org/blender/blender/commit/ae256f9b2b33>ae256f9b2b33</a> - 28/02/2026</code>.
</span></p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<div class="footer-contribute">
<ul>
<li>
<a href="https://projects.blender.org/blender/blender/issues/new?template=.gitea/issue_template/api_docs.yaml&field:body=%2A%2APage+Information%2A%2A%0D%0AFile%3A+%60bge.types.SCA_PythonController.rst%60%0D%0ABlender+Version%3A+%605.2%60%0D%0A%5BPermanent+Link%5D%28https%3A%2F%2Fdocs.blender.org%2Fapi%2F5.2%2Fbge.types.SCA_PythonController.html%29%0D%0A%0D%0A%2A%2AShort+description+of+error%2A%2A%0D%0A%5BPlease+fill+out+a+short+description+of+the+error+here%5D%0D%0A" class="fa fa-bug"> Report issue
on this page</a>
</li>
</ul>
</div>
</body>
</html>