Is spellcasting for buildings hardcoded to the Shield Battery and Comsat Station? Whenever I've tried giving another ability to a building (such as giving the Shield Battery Recall) it doesn't work. I know you're going to tell me "Check your requirements." Here are the requirements for that instance:
Must be enabled and current unit must be hero
OR
Must have technology
Current unit must be
Danimoth (Arbiter)
OR
Current unit must be
Protoss Arbiter
OR
Current unit must be
Protoss Shield Battery
The button seems fine: it looks right, can be pressed, comes online when the tech is researched, and checks for energy. It even targets properly. But when I press it and then select the target, nothing happens. Absolutely nothing. Energy doesn't even go down. I figure the order must be getting lost somewhere in there, so I changed the order requirements for "Teleport" and "Teleport to Location" to what you see above, also. Something's messing up the order, and I bet is has to do with buildings. What do you say?
Actually, the first thing I'd ask you is did you add a spellcasting animation to the Shield Battery?
Yep. Although, interestingly enough, Recall doesn't use one. I made Recall use SpAbility2, which ran like this:
imgol08 (something--the shield battery overlay thing) 0 0
wait 1
castspell
goto (something)
It is just a wild guess, but look around orders.dat entries for Scanner and Recharge Shield. Maybe there is a flag that works as "Can be used by buildings"?
Hm...doesn't look like it. "Place Scanner," which uses the tech, has unknowns 3, 4, and 7 checked, and "Can be interrupted." There are three (o_O) Shield Battery commands, and none of them uses a tech..."Recharge Shields 1" has 3, 7, 8, 10, and "Can be interrupted," "Recharge Shields 2" has 3, 10 and Interrupted, and Shield Battery has 2, 3, and 10. 3, 7, and 10 are all over the place and definitely not related to buildings.
EDIT: I'm pretty sure that it's the order part that's responsible. The button clicks fine and checks for energy, but never removes it or places the sprite associated with the spell.
copy the recall animation from the arb and remove the playframs (unless u want them)
If you are scared that your eyes will hurt from reading this useful info... read the short part:
add
CODE
sigorder 2
(yeh im not sure if its the rite number but i think it is)
if you have already done this, then i apologize if you feel in any way flamed by me.
Although a sigorder 2 command is needed during spell casting animations, it does not allow a unit/building to cast. It tells the spell order that the unit has casted the spell, so it would do no good.
Some spells are hardcoded to the order. Seeing as how you changed every Dat Requirement related to recall, I would assume that it is coded to units only...just like it can affect units only.
I don't think that's the case... in Incursion I had a Hatchery cast Recall... and all I did there was change the tech requirements and add a spellcasting animation.
Hmmm. I stand corrected. Why not post the mem file, so we can look at it. And what you did for the iscript would be helpful.
Was that to me or Agamemnon? Or both?
Well here are mine:
CODE
OvermindwshellSpAbility2:
castspell
wait 2
sigorder 2
goto OvermindwshellUnknown19
My animation is the same as his, except with sigorder2...
Did you edit this line?
CODE
SpAbility2 [NONE]
I believe I did, but I didn't think of adding sigorder. Let me try that and get back to you...
EDIT: Do I need to change the animation in orders,dat? If so, for "Teleport Units" or "Teleport Units to Location?" Or both?
EDIT: So I set the animations used by "Teleport" and "Teleport to Location" to "SpAbility2," added sigorder 2 as the last line of my script, and checked my requirements, and then clicked the button. It targetted fine and checked for energy, and then did nothing when I actually clicked...