OK, so I'm really only modding to mess around with stuff in starcraft and I wanted to make some other units capable of casting spells. For example, carriers with yamato. I also gave corsairs storm, among other things. I used DatEdit and FIregraft to change the button sets and flags so my units could access and use these commands.
However when I tried out this mod, my corsairs could storm but my carriers would crash the game if they yamato'd. After some investigation I discovered that this had to do with the iscript's CastSpell action - since arbiters and sairs have these actions they can go about casting anything but carriers and scouts (among other things) do not have such an entry. When the game reaches for it to cast a spell it doesn't find one and it crashes. (That is how it works right?) But I was unable to find a tutorial on creating one. All I want is for the unit to stand still as the spell is performed - I don't need any animations like High Templars for example (when they cast they lean out and unleash that little ball of psi energy, like their attack animation). So my question boils down to this: how can I create a castspell entry so that the game stops crashing?
None.
Edit the unit's header and change the [NONE] next to CastSpell to <unitname>CastSpell (where <unitname> is the name of the unit). Then, add the following to the unit's iscript:
<unitname>CastSpell:
wait 1
castspell
sigorder 2
goto <whatever the unit uses for its idle animation - usually <unitname>GndAttkToIdle or <unitname>WalkingToIdle>
None.
Thanks!
If I can choose between walkingtoidle or gndattktoidle, should I make a preference?
None.
That will depend on what unit you are using. You will have to study the code for your unit to find out which is more suitable. For example, the Marine lowers his gun in his gndattktoidle animation. If your custom code raises the Marine's gun but does not lower it, you can jump straight to the gndattktoidle animation. If you use the code that TZ (the last user) gave you, walkingtoidle would most likely be appropriate.
Have fun modding.
OK, new question: When I spawn units with their current armor (at most about 12) units spawn normally. BUt if I take some upgradse and spawn units with significant amounts of armor (I don't have an exact number but at least 17 or something) they come out with less than full health. (All units regenerate but it is unsightly.) How do I solve this problem? Is it even solvable?
None.
This may be because your units train too quickly. Consider increasing the build time of your units to 10 ticks.
You should provide better information by providing more specific values rather than ambiguous ones.