View Issue Details

IDProjectCategoryView StatusLast Update
0005105The Dark ModScript/Defpublic26.12.2020 16:52
ReporterDragofer Assigned ToDragofer  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionno change required 
Product VersionTDM 2.07 
Summary0005105: Allow entities to pass self when calling script functions
DescriptionEntities like atdm:target_callscriptfunction or most trigger brushes currently don't seem to be able to pass variables when they call script functions. This makes them unsuitable for calling script functions with variable parameters. An example would be: void reusable_script(entity mover, entity speaker, entity button). Scriptobjects may already do this, but are more difficult for mappers to learn and use.

As an alternative to a similar ticket I opened for this issue, I'd like to suggest that scriptfunctions can be passed "self" to refer to the entity from which they were called, similar to scriptobjects. This would allow the mapper to store variables on the calling entity as spawnargs, enhancing the mapper's ability to achieve diverse scripted effects.
TagsNo tags attached.

Activities

Dragofer

Dragofer

03.01.2020 15:52

developer   ~0012047

Related ticket: 0005103 Allow script functions to be called with parameters
Dragofer

Dragofer

26.12.2020 16:48

developer   ~0013263

Callscriptfunction entities can pass certain parameters if the spawnarg "foreach" "1" is enabled. Counterintuitive, but sufficient.

These parameters can be passed:
one target at a time, the entity that activated the callscriptfunction, the callscriptfunction itself.

Issue History

Date Modified Username Field Change
03.01.2020 13:22 Dragofer New Issue
03.01.2020 15:52 Dragofer Note Added: 0012047
26.12.2020 16:48 Dragofer Note Added: 0013263
26.12.2020 16:52 Dragofer Assigned To => Dragofer
26.12.2020 16:52 Dragofer Status new => closed
26.12.2020 16:52 Dragofer Resolution open => no change required