View Issue Details

IDProjectCategoryView StatusLast Update
0004209The Dark ModFeature proposalpublic15.02.2017 04:38
ReporterVanishedOne Assigned To 
PrioritynormalSeveritynormalReproducibilityN/A
Status newResolutionopen 
Summary0004209: Add _SOURCE as an available entity for response effect scripts
DescriptionSuppose I want to write e.g. a response effect Look At, to make AI look at an entity when stimmed. An obvious use case is to have them look at the entity that stimmed them. However, the effect script would have to treat that as a special case because getTargetEntity(string targetEntityStr, entity self) doesn't test for it. I suggest adding _SOURCE as a complement to _SELF and changing getTargetEntity(string targetEntityStr, entity self) to getTargetEntity(string targetEntityStr, entity self, entity source).
Additional InformationA revised tdm_response_effects.script is attached. If any published mission has ever included a custom response effect script then a compatibility fix would be required.

_SOURCE won't appear in the S/R editor's menus without a change to DR.
TagsNo tags attached.

Activities

VanishedOne

VanishedOne

02.09.2015 17:15

developer  

VanishedOne

VanishedOne

02.09.2015 17:15

developer   ~0007752

Uploaded an updated .script after seeing http://forums.thedarkmod.com/topic/11058-things-that-could-be-improved/?p=376629
SteveL

SteveL

06.09.2015 13:22

developer   ~0007753

No published maps have included a custom tdm_response_effects.script, or have overridden getTargetEntity(), if that's the potential compatibility problem.

Trying to get my head around this. I'm not very familiar with the S/R system. Does _SELF mean that the entity that receives the stim is target of the response effect? And a named entity will make that the target of the response effect. So _SOURCE would make the stimming entity the parameter of the effect.

Sounds like a useful option.
VanishedOne

VanishedOne

06.09.2015 13:46

developer   ~0007755

Yes, that's right. For example, AI tend to inherit a damage response which tells them to react to STIM_DAMAGE by taking some damage. _SELF is used to do that.

(I wish I understood S/R better myself, then I could offer to improve its documentation. Some of the built-in stim types leave me wondering whether they're even used anywhere or just reserved for possible future use.)

Issue History

Date Modified Username Field Change
02.09.2015 16:17 VanishedOne New Issue
02.09.2015 16:17 VanishedOne File Added: tdm_response_effects.script
02.09.2015 17:15 VanishedOne File Added: tdm_response_effectsUPDATED.script
02.09.2015 17:15 VanishedOne Note Added: 0007752
06.09.2015 13:22 SteveL Note Added: 0007753
06.09.2015 13:46 VanishedOne Note Added: 0007755
03.10.2015 13:28 SteveL File Deleted: tdm_response_effects.script
08.10.2015 21:45 SteveL Assigned To => SteveL
08.10.2015 21:45 SteveL Status new => assigned
15.02.2017 04:38 grayman Assigned To SteveL =>
15.02.2017 04:38 grayman Status assigned => new