PDA

View Full Version : Basic IceCC help


Fundofundo
06-01-2007, 2:53 AM
How to give a dropship an attack?

matefkr
06-01-2007, 2:45 PM
At least, give it a weapon, then set the attack unit and attak move ai propperly, then write that:

DshipGndAttk:
wait 1
attack26
gotorepeatattk
goto long02
Then WRite the above label to gndattkinit, airattkinit, Gndattkrepeat, airattkrepeat, and write long02 to gndattktoidle and airattktoidle. If you use the old version it should work (im too lazy to download the newest).

Fundofundo
06-02-2007, 12:45 AM
By "the above label" do you mean all of this:

DshipGndAttk:
wait 1
attack26
gotorepeatattk
goto long02

What do you mean by this as well:

"Then WRite the above label to gndattkinit, airattkinit, Gndattkrepeat, airattkrepeat, and write long02 to gndattktoidle and airattktoidle."

Holocaust
06-02-2007, 6:57 AM
Q: "How do I give a unit that doesn't have an attack without crashing Starcraft?"

A: You would have to give it attack and returning to idle after attack animations. In this example, we're going to give the Dropship an air and ground attack. First off, at the top of the script, you should see a list that comprises of the Dropship's animations such as DropshipDeath. In the GndAttkInit/AirAttkInit/Gnd/AirAttkRpt replace the none with something like DropshipGndAttkInit and in the Gnd/AirAttkToIdle replace the none with something like DropshipGndAttkToIdle. Now the script will have something to work with when it attacks a unit, but we're not done yet. Now, create new headers that correspond with the headers listed in the list of animations.

First off, we want the Dropship to have an attack animation, so we create a new header that matches the header name in the animation list. We're going to keep it simple for now and use only one attack animation for the air and ground. We'll just use a couple of waits and an attack26, followed by a gotorepeatattk. Now here, we're using attack26 instead of attack25 1. Why you might ask? attack26 commands the unit to use the appropriate weapon when faced with each enemy (Ground attack for ground units etc.) This also shortens a script and doesn't allow seperate animations for the air and ground attacks, but since we're keeping it simple, that shouldn't matter. Since the GndAttkInit is placed in the RptAttk corresponding list and the attack animation ends with gotorepeatattk, the dropship's new animation will continuously loop back to the start until the enemy is gone.

Now for the Returning to idle animations. If you're not up to creating your own idle animations just yet, just replace whatever you put in the Dropship's AttkToIdle slots to DropshipOther. As you can see in the DropshipOther animation, it's just a bunch of shvertpos and wait codes. Shvertpos stands for Shift vertical position, so the Dropship, in this animation just hovers up and down like it does when idle.

http://www.warboards.org/showthread.php?t=19125

Is my IceCC FAQ thread THAT hard to see?

matefkr
06-02-2007, 12:08 PM
I post one text wich should work.

# This header is used by images.dat entries:
# 223 Dropship (terran\dropship.grp)
.headerstart
IsId 68
Type 12
Init DropshipInit
Death DropshipDeath
GndAttkInit DshipGndAttk
AirAttkInit DshipGndAttk
SpAbility1 [NONE]
GndAttkRpt DshipGndAttk
AirAttkRpt DshipGndAttk
SpAbility2 [NONE]
GndAttkToIdle long02
AirAttkToIdle long02
SpAbility3 [NONE]
Walking DropshipWalking
Other long02
BurrowInit [NONE]
.headerend
# ----------------------------------------------------------------------------- #

DropshipInit:
imgul09 224 0 42 # DropshipShad (terran\dropship.grp)
playfram 0x00 # frame set 0
goto long02

DropshipDeath:
playsnd 210 # Terran\DROPSHIP\TDrDth00.wav
imgol08 332 0 0 # TerranBuildingExplosionsmall (thingy\tBangS.grp)
useweapon 94
wait 3
end

DropshipWalking:
imgol08 225 0 0 # DropshipGlow (thingy\tdrGlow.grp)
shvertpos 0
goto long00

DshipGndAttk:
wait 1
attack26
gotorepeatattk
goto long02




After you replaced the original script with that and recompiled that (and you have set weapons for dropship) it should work.

A good advise: read through the help file, you can learn much enough from it.