Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I can create an Action with parameters using an Actiondefintion.

enter image description here

But how can I create an Eventdefinition ? I'd like to make an Event that is 'called' when a Unit, that is saved in a variable, dies. Like an Event called 'My unit dies'.

enter image description here

The desired behavior is the following:

  • Called when a unit defined in a variable dies
  • the deceased unit should be returned by 'Triggering Unit()'
  • the owning player of the deceased unit should be returned by 'Triggering Player()'

I hope you get my point, Thanks

share|improve this question
add comment

1 Answer

It's not possible to create useful Event Definitions for this purpose. Creating a custom event definition basically requires custom scripting and you should probably avoid it.

What I think you want to do is create a Trigger that uses the Unit Dies event. Right click in the trigger list and select New -> New Trigger (Ctrl+T). Then right click Events in the trigger pane and select New Event (Ctrl+E). This should bring up a dialog that lets you pick the Unit Dies event.

After adding the Unit Dies event you can hook it up to only trigger when your hero dies by double clicking the Unit: Any Unit item and choosing your hero unit.

Then you can add any actions you want to this trigger that will be run when your hero dies.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.