Im trying to put a trigger; Issue Order.
I want to cloak a Spectre with this Trigger, but it didn't work.
Here's my trigger :
Order PlayerUnit[Triggering Player] to (Spectre - Cloak (Spectre)) (After Existing Order)
I tested my conditions, and it works.
I tested the launching, and it works.
The problem is really in the trigger, but I don't understand why it didn't work.
my best guess is that it is something wrong with the issue order event in one of 2 places. try placing a spectre on the map and instead of "player unit (triggering player)" try putting the placed spectre in as the one being ordered to cloak. if the spectre cloaks then the issue is probably that the trigger cant find the specified unit through the variable, so you may have to look at how the unit is being connected to the variable "playerunit". also as a thought have you tried setting it to "replace existing orders" instead of "after existing orders"?
I know this has been said already, but you really should consider just directly applying the behavior, it works better anyways from a playability standpoint. Issuing orders like that can go screwy easily, and at best it will simply cause existing orders to stop causing annoyance for the player. I sure wouldn't be happy if I was moving into an area, decided to cloak, and my ghost stopped completely.
Anyways, adding a behavior is pretty easy, just use:
Add Behavior (Player)
Add (Triggering player) Spectre - Cloak to Unit from player (Triggering player) .
If that isn't working, chances are good you aren't assigning your variable right, or that you went and forgot to give your unit energy (the behavior requires energy to continue working).
The variable is tested, and there's no problem here. I didn't look at the energy, but the spectre have the ability to cloak, and it is the good cloak. I'll take a look for the energy and i tried for the bahavior (2nd screenshot); it didn't work...
That was nothing about all your suggestions. I just added an action "wait 2 game time seconds" before the "stop all instances of current trigger". Seriously, i don't know why that was the problem, because, like I set, the trigger is supposed to stop because of the "stop all instances". I think that it skipped this action to read the next one which is Decloak. So, I needed to add a waiting action before it, and the trigger read it.
However, the problem is solved, thanks for all the help !
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi everybody,
Im trying to put a trigger; Issue Order. I want to cloak a Spectre with this Trigger, but it didn't work. Here's my trigger : Order PlayerUnit[Triggering Player] to (Spectre - Cloak (Spectre)) (After Existing Order)
I tested my conditions, and it works. I tested the launching, and it works.
The problem is really in the trigger, but I don't understand why it didn't work.
Thanks for the help
Bump?
Here's a ScreenShot.
The sound is played, so the problem isn't the condition...
Why not add the behavior cloak? You can add and remove the behavior from the unit easily.
It didn't work too. Unless if it's me that I didn't do it correctly.
Could you send me a picture or even the map if you are desperate.
A picture of what ? The trigger with the behavior thing ?
Yes, of the trigger.
Ok, then...
Are you declaring PlayerUnit variable right? That is all the help I can give without more information.
Yes, the variable "PlayerUnit" is a unit (the spectre)
I can't really see what's wrong.
This is why im asking help...
my best guess is that it is something wrong with the issue order event in one of 2 places. try placing a spectre on the map and instead of "player unit (triggering player)" try putting the placed spectre in as the one being ordered to cloak. if the spectre cloaks then the issue is probably that the trigger cant find the specified unit through the variable, so you may have to look at how the unit is being connected to the variable "playerunit". also as a thought have you tried setting it to "replace existing orders" instead of "after existing orders"?
@reelie: Go
I know this has been said already, but you really should consider just directly applying the behavior, it works better anyways from a playability standpoint. Issuing orders like that can go screwy easily, and at best it will simply cause existing orders to stop causing annoyance for the player. I sure wouldn't be happy if I was moving into an area, decided to cloak, and my ghost stopped completely.
Anyways, adding a behavior is pretty easy, just use:
Add Behavior (Player)
Add (Triggering player) Spectre - Cloak to Unit from player (Triggering player) .
If that isn't working, chances are good you aren't assigning your variable right, or that you went and forgot to give your unit energy (the behavior requires energy to continue working).
The variable is tested, and there's no problem here. I didn't look at the energy, but the spectre have the ability to cloak, and it is the good cloak. I'll take a look for the energy and i tried for the bahavior (2nd screenshot); it didn't work...
Ok, the problem is solved ! =)
That was nothing about all your suggestions. I just added an action "wait 2 game time seconds" before the "stop all instances of current trigger". Seriously, i don't know why that was the problem, because, like I set, the trigger is supposed to stop because of the "stop all instances". I think that it skipped this action to read the next one which is Decloak. So, I needed to add a waiting action before it, and the trigger read it.
However, the problem is solved, thanks for all the help !