| 10-24-2005, 06:37 AM | #1 |
Hey all! What is the easiset way to cancel an upgrade that a unit is upgrading atm? An Order or through some kind of trigger? It doesn't need to be just the Upgrade that it is upgrading atm, just so I can cancel a specify upgrade that my unit upgrade. -Soultaker |
| 10-24-2005, 02:24 PM | #2 |
Code:
set UnitVar = (Whatever the unit is)
Custom Script call IssueImmediateOrderById(udg_UnitVar,851796) |
| 10-24-2005, 07:44 PM | #3 | |
Quote:
Hmmm, I can't get this to work... Have tried both with and without space before the call order, and using Researching Unit and Triggering Unit. You sure that, that code should work? -Soultaker |
| 10-24-2005, 10:13 PM | #4 |
Did you set the UnitVar first? Are you getting a compile error or is it simply not working? |
| 10-24-2005, 11:28 PM | #5 |
things in JASS are case sensitive by the way |
| 10-25-2005, 06:16 AM | #6 | |
Quote:
I did put the Set UnitVar First, and I did spell it case sensitively. It doesn't give an error, it just doesn't work.. Btw. Should there be a space before the Call? -Soultaker |
| 10-25-2005, 12:51 PM | #7 |
Simple answer: Doesnt Matter. |
| 10-25-2005, 08:46 PM | #8 |
Is the trigger disabled? you are using it for upgrade/building/trainning cancel , right? Cause it doesn't work for the other cancel are you using it correctly? (paste the damn trigger) |
| 10-26-2005, 07:17 AM | #9 | |
Quote:
Code:
Start Upgrade Copy
Events
Unit - A unit Begins research
Conditions
Actions
Game - Display to (Player group((Owner of (Triggering unit)))) for 3.00 seconds the text: You can't research ...
Set UnitVar = (Triggering unit)
Custom script: call IssueImmediateOrderById(udg_UnitVar,851796)Sorry, It's an research, not an upgrade... always getting confused by those 2 :P -Soultaker |
| 10-26-2005, 01:14 PM | #10 |
My bet is that there is no cancel button yet so you can't press it, add a 0 seconds wait before setting UnitVare |
| 10-27-2005, 08:17 AM | #11 | |
Quote:
I tried with a 0 second wait and a 1 second wait, neither worked... The Cancel button appears but nothing happens. I thought that I would give it a try with the order "Cancel". So I did, and all I had forgot was the wait order when I first started making the trigger. Here it is: Code:
Start Upgrade DEBUG
Events
Unit - A unit Begins research
Conditions
Actions
Game - Display to (Player group((Owner of (Triggering unit)))) for 3.00 seconds the text: Debug: Research Can...
Wait 0.25 seconds
Unit - Order (Triggering unit) to CancelWell, thanks for your help guys! -Soultaker |
