HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

The Order ID/String for the Build Tiny Building abilities

10-20-2004, 04:37 AM#1
zotax
Hi,

Im trying to find out the order string for the build tiny abilities, basically so I can force a unit to use them via triggers. I need a value to input into this:

call IssueImmediateOrderBJ( GetTriggerUnit(), "ID_GOES_HERE" )

ie other values are things like 'lavamonster' or 'militia'
10-20-2004, 06:47 PM#2
Anitarf
Wouldn't those spells be ordered to target a point, rather than with the immediateorder action?

Anyway, this trigger will give you the orderID of any spell that is cast. All you have to do is modify those abilities into unit abilities so you can cast them manually and then write down the orderID.

Code:
Events
  A unit is issued an order targeting a point
  A unit is issued an order targeting an object
  A unit is issued an order with no target
Conditions
Actions:
  Custom SCript: call BJDebugMsg(I2S(GetIssuedOrderId()))
10-21-2004, 04:21 AM#3
zotax
Question: how would I detect this order ID, as it comes out as a number (852619).

Ie If (Issued order = (852619))
Then game text Messager to player 1....
Else

Whats the condition that I use? (I assume jass is needed).
10-21-2004, 06:45 AM#4
Panto
If you want a text order, there's a GUI action to spit that out, but I think it more or less just echoes the order you can read by viewing the ability.

I'd always thought that Build Tiny abilities use the ordercode of the name of the unit they're making, but I've never investigated it at all.
10-22-2004, 03:23 AM#5
zotax
It seems that they build tiny abilities dont have a text order string, as my trigger fires and displays correctly with other abilities, but when a use tiny building abilitiy is used the trigger fires but the string comes up as blank.

This is why I need to be able to detect the number version of the string as its the only one that seems to exist. Also i dont think they use the ID of the building their creating, as diff buildings still have the same code.
10-22-2004, 09:54 PM#6
Anitarf
I don't know how to do a condition with OrderID (it would probably be an integer comparison turned into custom text and then with the proper function put in, but I don't know what that function would be), but you could just give the unit some other ability that you can detect and compare with orderstrings and then order dummy casters to cast tinybarracksability at the target point of the ability being cast (because I do know the function to issue a order with orderID). But it's probably simpler if you wait for someone to tell you the condition function (because that's the only way you can get the building's pathing displayed as you place it, if the unit itself has the ability).

Anyway, why do you need to detect the order? Maybe you could detect when the building comes into play?
10-23-2004, 01:15 AM#7
zotax
I have multiple buildings with these abilities, and ideally need to be able to detect the caster, which is why I need to use a ability event instead of a construction events. I also need to use this ability because of the pathing effects (only on blight) and its a lot better when you can see the building splat squares.

Im using this for a sort of advanced building type method. The building has a set of Charge Gold abilities, each for a differerent building option. When one of these is used, my trigger detects which one it is, removes all the other abilities, then adds a Cancel and a Build ability. The Build ability is the build tiny building ability, and the unit constructed depends on which Charge Gold ability you selected. The Cancel button is there if you want to get a refund before building.

What I want to happen is to streamline the interface, so you select the building you want (via the charge building ability). Then ideally it will work so that the ability will auto initate (so u dont have to click the tiny building ability. Ive tried doing this by forcing hotkeys, but it doesnt seem to work (do item abilities hotkeys work?).

After the player has started constructed the building, I want the Build and Cancel abilities to be removed, and the building to be returned to normal, ready to build something different. This is sorta like a command and conquer type system, just thought illd give you some background incase you have alternative solutions.