Some kind of external actions and external conditions

My idea is having seperate external actions and conditions.
Sometimes an action should be used in several situations with different conditions. Or even some conditions that should be repeated in different situations and scenes.
External actions could be used as normal functions in programming.

I think functions are already planned to come.
However, if you want, you can put a bunch of actions in to an external event with empty conditions to perform a certain task and then call the external event as a sub-event. This way you can call and execute only the actions multiple places under different conditions without lot of editing. And if you want to change certain parameters for the action in case of different conditions, you can use a scene variable to do it. For example to change the speed value used inside your external event, use a scene variable like so:

If this is true : Do = 100 to Variable Speed
--------Include events from ExternalEvent

If something else is true: Do = 200 to Variable Speed
--------Include events from ExternalEvent

Obviously use the Speed variable inside the External event to have any effect and get different result based on what condition was true.

The biggest limitation is that some parameters aren’t dynamic, you can’t change the objects used by the external events for example :confused:

Yeah. In case you want to use the same action on different object on different scenes, you can put the object in to a group and use the group name instead and if you want to apply the action on different objects in the same scene, can use object variable to flag the object meant to be effected by the external event and design the event to take this flag in to an account. Could be complicated and messy but in case need something dynamic could work until we get functions :stuck_out_tongue:

1 Like

Oh, right, nice workaround :smiley: :

ObjectGroup ObjectA Variable "name" = "ObjectA" // An expression to get the object name would be cool! ObjectB Variable "name" = "ObjectB" ObjectC Variable "name" = "ObjectC"

External event “Delete these objects”:

Conditions: Text of variable "name" of ObjectGroup is = VriableString(object_name) Actions: Delete object ObjectGroup

Scene events:

[code]Conditions: X key is pressed
Actions: Do = “ObjectC” to the text of variable “object_name”
Link to external event “Delete these objects”

Conditions: Z key is pressed
Actions: Do = “ObjectB” to the text of variable “object_name”
Link to external event “Delete these objects”[/code]

EDIT: There is already an expression to get the object name since April :blush:
So you don’t need the “name” object variables and you can change the external event to:

For each ObjectGroup: Conditions: Text of variable "object_name" is = ObjectGroup.ObjectName() Actions: Delete object ObjectGroup

Very good points. Thank you.