adding events/actions to triggers via actions in another trigger, +rep for help

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
I am making a damage display/global crit system that uses a few global data options that can be edited from the map initialization trigger, i wanted to make it so that it adds events/actions based on what the person wanted the display to look like, so is there a way to add actions to a trigger via actions in another trigger?

IE:
Trigger:
  • Init
    • Events
      • Map Initialization
    • Local Variables
    • Conditions
    • Actions
      • Trigger - Add action (unit - cause damage source to damage triggering unit equal to 0.6 x damage taken) to Damage Display <gen>
 

Dave312

Censored for your safe viewing
Reaction score
269
You can add events to triggers (tutorial), however I doubt you would be able to add actions since you would also need to control where the actions is added in the list. As an alternative, you could use if/then/else or switch statements to determine which actions should be executed in a given trigger based on variables set at map initialization.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i was thinking you could do something like add x actions and have a list of actions, or maybe make a whole new trigger and choose what was in it
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I still think you're going about this the wrong way. Although what you're suggesting MIGHT be possible, just making a simple swap would be the easiest. Let's say the user picks what to display with a dialog. In the trigger that triggers from when the user picks a certain option, you have a switch like:
Trigger:
  • General - Switch (Actions) depending on (Used dialog item)
    • Cases
      • General - If *Option 1*
        • Actions
          • * Display it as option 1*
      • General - If *Option 2*
        • Actions
          • * Display it as option 2*
      • General - If *Option 3*
        • Actions
          • * Display it as option 3*
    • Default
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
that could work, basically my damage display system has settings, not so much yes/no but you get to choose the size/speed/fade time/max time/etc of the text, whether they have crit chances, whether crit chance is global or mui, how crits are displayed, with a popping text effect, an exclamation point and a size increase, etc, whether there are misses and whether they are global or mui as well, how they are displayed, all of this should be chooseable and not change another setting in and of itself
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top