Staredit Network > Forums > Modding Assistance > Topic: enabling noncasters to cast
enabling noncasters to cast
Jan 5 2010, 10:10 pm
By: tummychow  

Jan 5 2010, 10:10 pm tummychow Post #1



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.

Jan 5 2010, 10:23 pm Biophysicist Post #2



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.

Jan 5 2010, 10:34 pm tummychow Post #3



Thanks!
If I can choose between walkingtoidle or gndattktoidle, should I make a preference?



None.

Jan 5 2010, 11:50 pm Sand Wraith Post #4

she/her

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.




Jan 6 2010, 3:47 pm tummychow Post #5



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.

Jan 6 2010, 10:05 pm Sand Wraith Post #6

she/her

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.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-4-26. : 1:58 pm]
lil-Inferno -- ya
[2026-4-25. : 11:50 pm]
JamaL -- Glad to see SEN will never die. Kudos to whoever is paying the hosting fees these days!
[2026-4-25. : 3:37 pm]
NudeRaider -- (-.-,)
[2026-4-25. : 3:35 pm]
Zoan -- ;o I thought that was a monkey emote
[2026-4-25. : 3:34 pm]
Zoan -- :mods:
[2026-4-25. : 3:34 pm]
Zoan -- :mods"
[2026-4-25. : 3:20 pm]
NudeRaider -- Vrael
Vrael shouted: moderation? on SEN? in 2026? completely localized in anoeth47's topic? at this time of year?
boy, if you're not careful I'll moderate your sorry ass too!
[2026-4-25. : 3:06 pm]
RIVE -- Yyyes. Don't you see it?
[2026-4-25. : 2:11 pm]
Vrael -- moderation? on SEN? in 2026? completely localized in anoeth47's topic? at this time of year?
[2026-4-25. : 1:39 pm]
NudeRaider -- anoeth47
anoeth47 shouted: Can I get a moderator/lord of the forum to clean up my topics - delete posts not really part of the topic.
send me the links of the posts you want deleted via pm
Please log in to shout.


Members Online: RIVE