View Issue Details

IDProjectCategoryView StatusLast Update
0005103The Dark ModScript/Defpublic26.12.2020 16:55
ReporterDragofer Assigned ToDragofer  
PrioritynormalSeveritynormalReproducibilityN/A
Status closedResolutionno change required 
Product VersionTDM 2.07 
Summary0005103: Allow script functions to be called with parameters
DescriptionMethods for calling script functions with parameters from ingame entities are few and usually require defining scriptobjects, which have a steeper learning curve than plain script functions.

This makes it more difficult to reuse a scripted setup because many spawnargs, entity names and script functions need to be renumbered by hand. An example for the kind of script I'd like to reuse is:
void reusable_script(entity mover, entity speaker, entity button).

I'd like to propose adding new spawnargs to atdm:target_callscriptfunction and various trigger brushes. They get passed when the script is called:
param1
param2
param3 etc.

In the above example, I could point param1 to the func_mover, param2 to the speaker and param3 to the button.
Ideally I'd like to be able to clone the whole setup and have the param spawnargs updated to the new entity names.
TagsNo tags attached.

Activities

Dragofer

Dragofer

03.01.2020 10:57

developer   ~0012039

Please send me a PM if you'd like me to construct a test map.
Dragofer

Dragofer

03.01.2020 15:53

developer   ~0012048

Related ticket: 0005105 Allow entities to pass self when calling script functions
Dragofer

Dragofer

26.12.2020 16:55

developer   ~0013264

Most entities that can call scripts can pass their own names. This allows the script to read spawnargs on that entity, basically achieving the same result as what this ticket is asking for but via a different route. Closing.

Issue History

Date Modified Username Field Change
03.01.2020 10:55 Dragofer New Issue
03.01.2020 10:57 Dragofer Note Added: 0012039
03.01.2020 15:53 Dragofer Note Added: 0012048
26.12.2020 16:55 Dragofer Assigned To => Dragofer
26.12.2020 16:55 Dragofer Status new => closed
26.12.2020 16:55 Dragofer Resolution open => no change required
26.12.2020 16:55 Dragofer Note Added: 0013264