Cancelled Unit Event Response?

Status
Not open for further replies.
wait a sec. there is a reference from cancels.

The point is that it is not a unit. The unit is not created so it has no id.
The thing you want is a unit-type.
Make a new action "create unit" and go to the unit type. There you can see the event response "Trained Unit-Type"
(I bet that you dont want to create the unit but just to show you where it is.)
 
Okay I think I get it. I first used the event 'a unit is issued an order with no target' and then put in the condition that the given order is a unit type converted to a string. If yes, then I used a variable and set an integer to 1. In another trigger which starts with 'unit cancels training a unit' the condition is 'if integer is equal to 1'. Then the integer is set back to 0.
 
UnitType convert to a string?

Also your idea sounds acceptable for only one or few units. May I ask what exactly you want to achieve with checking the canceling?

The canceling is done through a separate trigger that refers to the integer variable and resets it. 'unit cancels producing a unit', 'triggering unit is equal to (your building)', 'if integer equals 1 then revert effects of the starting of unit production'.

I cannot reference the 'cancelled unit' or the 'training unit' because no such event responses exist. Thus, I resort to using the production of a particular unit type as an order and set an integer to a particular value which is what I use to reference the cancelling unit (since cancelling a unit is not an order like producing a unit).
 
cannot reference the 'cancelled unit' or the 'training unit' because no such event responses exist.

"Trained Unit-Type" not "Trained Unit"

When you order the barracks to recruit a unit.
That unit is not yet created, so it has no id, no location, no owner, no nothing.
You cannot kill nothing, give nothing an ability, set nothing's health or let nothing do an order.
That is why they respond to Unit-Type rather than Unit.

The barracks sets his training value to that unit type.
Unit-Type is the event response.
 
"Trained Unit-Type" not "Trained Unit"

When you order the barracks to recruit a unit.
That unit is not yet created, so it has no id, no location, no owner, no nothing.
You cannot kill nothing, give nothing an ability, set nothing's health or let nothing do an order.
That is why they respond to Unit-Type rather than Unit.

The barracks sets his training value to that unit type.
Unit-Type is the event response.

I really don't understand what you mean. When I go the condition 'unit-type comparison' I can set a unit responding to an event e.g. triggering unit to be a certain unit type. Without an event response to the training of the unit I cannot make use of that comparison.

If you mean to say that using the comparison 'Unit type of (trained unit) equals to 'some unit'' actually works you are wrong. I just tried it now again to make sure and it does not work. It references the unit type of the trained unit, not the training unit, and responds to the event 'a unit finishes training' rather than 'a unit begins training'.
 
'Unit type of (trained unit) equals to 'some unit'

You really don't understand the difference between Unit and Unit-Type do you?

"Trained Unit-Type" not "Trained Unit"
That is why they respond to Unit-Type rather than Unit.
Unit-Type is the event response.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Cancels training a unit
    • Conditions
      • (Trained unit-type) Equal to Footman
    • Actions
      • -------- Do something --------
Not "Unit type of (Unit)" but "Event Response - Trained unit-type"
 
Status
Not open for further replies.
Back
Top