rubberd91
02-07-2007, 10:09 PM
IceCC 1.3 tutorial
==========================================
Basic Installation
1. Install Java Runtime (latest is preferred)
2. Download IceCC 1.3
3. Unzip into anywhere.
4. Run "IceCCUI.BAT" to start IceCC GUI.
Part I
-------
Making a Dropship attack
Here, I'll teach you how to make a dropship (or any other unit that doesn't attack) attack.
The very first thing to do is to give the dropship a weapon to attack with in DatEdit. (if you don't know how to do this, please PM me)
1. In Units, select Dropship (or any unit you want to make attack).
2. Click "decompile", and then "open in editor". You should get something that looks like this if you opened the dropship:
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: **YOUR DATE AND TIME HERE**
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 223 Dropship (terran\dropship.grp)
.headerstart
IsId 68
Type 12
Init DropshipInit
Death DropshipDeath
GndAttkInit [NONE]
AirAttkInit [NONE]
Unused1 [NONE]
GndAttkRpt [NONE]
AirAttkRpt [NONE]
CastSpell [NONE]
GndAttkToIdle [NONE]
AirAttkToIdle [NONE]
Unused2 [NONE]
Walking DropshipWalking
WalkingToIdle DropshipWalkingToIdle
SpecialState1 [NONE]
.headerend
# ----------------------------------------------------------------------------- #
DropshipInit:
imgul 224 0 42 # DropshipShad (terran\dropship.grp)
playfram 0x00 # frame set 0
goto DropshipWalkingToIdle
DropshipWalkingToIdle:
setvertpos 1
waitrand 8 10
setvertpos 2
waitrand 8 10
setvertpos 1
waitrand 8 10
setvertpos 0
waitrand 8 10
goto DropshipWalkingToIdle
DropshipDeath:
playsnd 210 # Terran\DROPSHIP\TDrDth00.wav
imgol 332 0 0 # TerranBuildingExplosionsmall (thingy\tBangS.grp)
wait 3
end
DropshipWalking:
imgol 225 0 0 # DropshipGlow (thingy\tdrGlow.grp)
setvertpos 0
goto DropshipLocal00
DropshipLocal00:
wait 125
goto DropshipLocal00
3. The reason you can't just make an dropship attack in datedit, is because it doesn't have the iscript coding for attacking yet.
To make the attack script, just add in the things below:
Replace the "[NONE]" next to "GndAttkInit", "AirAttkInit", "GndAttkRpt", and "AirAttkRpt", with "DropshipAttkInit"
Replace the "[NONE]" next to "GndAttkToIdle" and "AirAttkToIdle" with "DropshipWalkingToIdle"
This tells that the dropship can attack without crashing.
Now, in between DropshipDeath and DropshipWalking (ON THE BOTTOM) put in the following code:
DropshipGndAttkInit:
attack
gotorepeatattk
goto DropshipGndAttkToIdle
This code tell what the dropship to do when it attacks. "attack" mean that the dropship should use its air attack on air units, and ground attack on ground units.
Say that you wanted to attack with two different weapons... You would make different air and ground attacks (in DatEdit) and the attack code (in IceCC) would look something like this:
DropshipGndAttkInit:
attackwith 1
wait 9
attackwith 2
gotorepeatattk
goto DropshipGndAttkToIdle
"attackwith 1" is telling the dropship to attack with the ground weapon, "attackwith 2" is telling it to attack with the air weapon.
You should check in DatEdit for it to harm both air and ground.
Now, your Iscript for the dropship should look like this:
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file '**FILE DECOMPILED**'
# created on: **YOUR TIME AND DATE HERE**
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 223 Dropship (terran\dropship.grp)
.headerstart
IsId 68
Type 12
Init DropshipInit
Death DropshipDeath
GndAttkInit DropshipGndAttkInit
AirAttkInit DropshipGndAttkInit
Unused1 [NONE]
GndAttkRpt DropshipGndAttkInit
AirAttkRpt DropshipGndAttkInit
CastSpell [NONE]
GndAttkToIdle DropshipGndAttkToIdle
AirAttkToIdle DropshipGndAttkToIdle
Unused2 [NONE]
Walking DropshipWalking
WalkingToIdle DropshipGndAttkToIdle
SpecialState1 [NONE]
.headerend
# ----------------------------------------------------------------------------- #
DropshipInit:
imgul 224 0 42 # DropshipShad (terran\dropship.grp)
playfram 0x00 # frame set 0
goto DropshipGndAttkToIdle
DropshipGndAttkToIdle:
setvertpos 1
waitrand 8 10
setvertpos 2
waitrand 8 10
setvertpos 1
waitrand 8 10
setvertpos 0
waitrand 8 10
goto DropshipGndAttkToIdle
DropshipDeath:
playsnd 210 # Terran\DROPSHIP\TDrDth00.wav
imgol 332 0 0 # TerranBuildingExplosionsmall (thingy\tBangS.grp)
wait 3
end
DropshipGndAttkInit:
attack
gotorepeatattk
goto DropshipGndAttkToIdle
DropshipWalking:
imgol 225 0 0 # DropshipGlow (thingy\tdrGlow.grp)
setvertpos 0
goto DropshipLocal00
DropshipLocal00:
wait 125
goto DropshipLocal0
4. Alright, now save the file, and in IceCC, click the Compiler tab, click "Add" then select "iscript.txt" (or whatever you saved it too) in your IceCC folder directory. Then, check "Display All Warnings" and then click "browse" next to "Save To:" and ALWAYS save it as "iscript.bin" DO NOT REPLACE THE ISCRIPT IN THE ICECC DIRECTORY! and click Compile and you're done with the Iscript!
Part II
-----------------------
Making Buildings Attack
Here, I'll teach you how to make a building attack.
1. The building's Iscript originally has no "...ToIdle" coding or "...AttkInit" Coding. You need to add these codings.
**If you don't know how to add code in please read Part I first**
2. Your coding for the CommandCenter Attacking should or be similar too, this:
The stuff you need to add will be underlined, italics, and bold!
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'I:\StarCraft modding\My Mods\Modcraft\scripts\Iscript.bin'
# created on: Wed Feb 07 22:55:38 2007
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 275 CommandCenter (terran\control.grp)
.headerstart
IsId 102
Type 20
Init CommandCenterInit
Death CommandCenterDeath
GndAttkInit CommandCenterGndAttkInit
AirAttkInit CommandCenterGndAttkInit
Unused1 [NONE]
GndAttkRpt CommandCenterGndAttkInit
AirAttkRpt CommandCenterGndAttkInit
CastSpell [NONE]
GndAttkToIdle CommandCenterWalking
AirAttkToIdle CommandCenterWalking
Unused2 [NONE]
Walking CommandCenterWalking
WalkingToIdle CommandCenterWalking
SpecialState1 CommandCenterSpecialState1
SpecialState2 [NONE]
AlmostBuilt CommandCenterAlmostBuilt
Built CommandCenterBuilt
Landing CommandCenterLanding
LiftOff CommandCenterLiftOff
IsWorking CommandCenterIsWorking
WorkingToIdle CommandCenterBuilt
WarpIn [NONE]
.headerend
# ----------------------------------------------------------------------------- #
CommandCenterInit:
imgul 277 0 0 # CommandCenterShad (terran\tccShad.grp)
CommandCenterBuilt:
playfram 0
goto CommandCenterWalking
CommandCenterWalking:
wait 125
goto CommandCenterWalking
CommandCenterDeath:
playsnd 7 # Misc\ExploLrg.wav
imgol 334 0 0 # TerranBuildingExplosionlarge (thingy\tBangX.grp)
wait 3
liftoffcondjmp CommandCenterLocal00
lowsprul 274 0 0 # TerranBuildingRubblelarge (thingy\RubbleL.grp)
wait 1
end
CommandCenterLocal00:
wait 1
end
CommandCenterGndAttkInit:
wait 1
attackwith 1
gotorepeatattk
goto CommandCenterWalking
CommandCenterSpecialState1:
playfram 4
goto CommandCenterWalking
CommandCenterAlmostBuilt:
playfram 1
goto CommandCenterWalking
CommandCenterLanding:
nobrkcodestart
wait 18
playsnd 472 # Misc\Land.WAV
playfram 4
wait 5
playfram 3
wait 5
playfram 2
wait 5
playfram 5
wait 5
playfram 0
sigorder 16
nobrkcodeend
goto CommandCenterWalking
CommandCenterLiftOff:
nobrkcodestart
playsnd 471 # Misc\LiftOff.WAV
playfram 5
wait 5
playfram 2
wait 5
playfram 3
wait 5
playfram 4
sigorder 16
nobrkcodeend
goto CommandCenterWalking
CommandCenterIsWorking:
imgol 276 0 0 # CommandCenterOverlay (terran\controlT.grp)
goto CommandCenterWalking
If you did a different building, where "CommandCenter" is where the the building you chose to do is. (If there is additional code, do not delete it)
You basically need to add ...ToIdle and ...AttkInit from the code into other building's code.
Part III
-----------------------
Making Ground Units Attack Air Too
In this section, I'll teach you how to make an tank to attack the ground and the air.
If you remember in Part I, attackwith 1 only shoots the ground weapon, and attackwith 2 only shoots with the air weapon.
The Goliath and the Siege Tank both have turrets to attack with. If you want to make a Siege Tank attack, you need to decompile the script for the turret. (keep in mind that the tank has two types of modes to attack with, Siege Mode and Tank Mode).
For this, I'll decompile the Siege Mode Tank.
It should look like this:
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: Tue Feb 13 18:00:00 2007
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 254 SiegeTankSiegeTurret (terran\stankt.grp)
.headerstart
IsId 93
Type 14
Init SiegeTank_Siege_TurretInit
Death SiegeTank_Siege_TurretDeath
GndAttkInit SiegeTank_Siege_TurretGndAttkInit
AirAttkInit [NONE]
Unused1 [NONE]
GndAttkRpt SiegeTank_Siege_TurretGndAttkInit
AirAttkRpt [NONE]
CastSpell [NONE]
GndAttkToIdle SiegeTank_Siege_TurretGndAttkToIdle
AirAttkToIdle [NONE]
Unused2 [NONE]
Walking [NONE]
WalkingToIdle SiegeTank_Siege_TurretGndAttkToIdle
SpecialState1 SiegeTank_Siege_TurretGndAttkToIdle
SpecialState2 SiegeTank_Siege_TurretSpecialState2
AlmostBuilt [NONE]
.headerend
# ----------------------------------------------------------------------------- #
SiegeTank_Siege_TurretInit:
playfram 0x11 # frame set 1
wait 1
nobrkcodestart
wait 38
playsnd 318 # Terran\TANK\TTaTra00.WAV
wait 3
playfram 0x22 # frame set 2
wait 3
playfram 0x33 # frame set 3
wait 3
playfram 0x44 # frame set 4
wait 3
playfram 0x55 # frame set 5
wait 3
setfldirect 28
playfram 0x00 # frame set 0
nobrkcodeend
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretGndAttkToIdle:
wait 125
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretDeath:
wait 1
end
SiegeTank_Siege_TurretGndAttkInit:
wait 1
nobrkcodestart
playsnd 96 # Bullet\TTaFi200.wav
imgoluselo 537 2 0 # Unknown537 (thingy\esiFire.grp)
wait 2
attackwith 1
wait 1
playfram 0x00 # frame set 0
nobrkcodeend
gotorepeatattk
ignorerest
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretSpecialState2:
setfldirect 12
playsnd 318 # Terran\TANK\TTaTra00.WAV
playfram 0x55 # frame set 5
wait 3
playfram 0x44 # frame set 4
wait 3
playfram 0x33 # frame set 3
wait 3
playfram 0x22 # frame set 2
wait 3
playfram 0x11 # frame set 1
goto SiegeTank_Siege_TurretGndAttkToIdle
You need to copy the "SiegeTank_Siege_TurretGndAttkInit" to the "AirAttkInit" and the "AirAttkRpt".
You also need to copy the "GndAttkToIdle" to the "AirAttkToIdle" as well.
Instead of "attackwith 1" in the "SiegeTank_Siege_TurretGndAttkInit" code on the bottom, put in "attack" (to attack with either air or ground, depending on the target).
If you want it to do two types of attacks, put in "attackwith 1" and "attack with 2".
Your code should now look like this (depending on which you did):
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: Tue Feb 13 18:00:00 2007
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 254 SiegeTankSiegeTurret (terran\stankt.grp)
.headerstart
IsId 93
Type 14
Init SiegeTank_Siege_TurretInit
Death SiegeTank_Siege_TurretDeath
GndAttkInit SiegeTank_Siege_TurretGndAttkInit
AirAttkInit SiegeTank_Siege_TurretGndAttkInit
Unused1 [NONE]
GndAttkRpt SiegeTank_Siege_TurretGndAttkInit
AirAttkRpt SiegeTank_Siege_TurretGndAttkInit
CastSpell [NONE]
GndAttkToIdle SiegeTank_Siege_TurretGndAttkToIdle
AirAttkToIdle SiegeTank_Siege_TurretGndAttkToIdle
Unused2 [NONE]
Walking [NONE]
WalkingToIdle SiegeTank_Siege_TurretGndAttkToIdle
SpecialState1 SiegeTank_Siege_TurretGndAttkToIdle
SpecialState2 SiegeTank_Siege_TurretSpecialState2
AlmostBuilt [NONE]
.headerend
# ----------------------------------------------------------------------------- #
SiegeTank_Siege_TurretInit:
playfram 0x11 # frame set 1
wait 1
nobrkcodestart
wait 38
playsnd 318 # Terran\TANK\TTaTra00.WAV
wait 3
playfram 0x22 # frame set 2
wait 3
playfram 0x33 # frame set 3
wait 3
playfram 0x44 # frame set 4
wait 3
playfram 0x55 # frame set 5
wait 3
setfldirect 28
playfram 0x00 # frame set 0
nobrkcodeend
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretGndAttkToIdle:
wait 125
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretDeath:
wait 1
end
SiegeTank_Siege_TurretGndAttkInit:
wait 1
nobrkcodestart
playsnd 96 # Bullet\TTaFi200.wav
imgoluselo 537 2 0 # Unknown537 (thingy\esiFire.grp)
wait 2
attack
wait 1
playfram 0x00 # frame set 0
nobrkcodeend
gotorepeatattk
ignorerest
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretSpecialState2:
setfldirect 12
playsnd 318 # Terran\TANK\TTaTra00.WAV
playfram 0x55 # frame set 5
wait 3
playfram 0x44 # frame set 4
wait 3
playfram 0x33 # frame set 3
wait 3
playfram 0x22 # frame set 2
wait 3
playfram 0x11 # frame set 1
goto SiegeTank_Siege_TurretGndAttkToIdle
You told that the AirAttk animation is the same as the GndAttk animation in the iscript. You also told it that the GndAttkToIdle is the same as the AirAttkToIdle.
That's all I'm doing for now... I'll post more later...
I'm always glad to help:) .
==========================================
Basic Installation
1. Install Java Runtime (latest is preferred)
2. Download IceCC 1.3
3. Unzip into anywhere.
4. Run "IceCCUI.BAT" to start IceCC GUI.
Part I
-------
Making a Dropship attack
Here, I'll teach you how to make a dropship (or any other unit that doesn't attack) attack.
The very first thing to do is to give the dropship a weapon to attack with in DatEdit. (if you don't know how to do this, please PM me)
1. In Units, select Dropship (or any unit you want to make attack).
2. Click "decompile", and then "open in editor". You should get something that looks like this if you opened the dropship:
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: **YOUR DATE AND TIME HERE**
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 223 Dropship (terran\dropship.grp)
.headerstart
IsId 68
Type 12
Init DropshipInit
Death DropshipDeath
GndAttkInit [NONE]
AirAttkInit [NONE]
Unused1 [NONE]
GndAttkRpt [NONE]
AirAttkRpt [NONE]
CastSpell [NONE]
GndAttkToIdle [NONE]
AirAttkToIdle [NONE]
Unused2 [NONE]
Walking DropshipWalking
WalkingToIdle DropshipWalkingToIdle
SpecialState1 [NONE]
.headerend
# ----------------------------------------------------------------------------- #
DropshipInit:
imgul 224 0 42 # DropshipShad (terran\dropship.grp)
playfram 0x00 # frame set 0
goto DropshipWalkingToIdle
DropshipWalkingToIdle:
setvertpos 1
waitrand 8 10
setvertpos 2
waitrand 8 10
setvertpos 1
waitrand 8 10
setvertpos 0
waitrand 8 10
goto DropshipWalkingToIdle
DropshipDeath:
playsnd 210 # Terran\DROPSHIP\TDrDth00.wav
imgol 332 0 0 # TerranBuildingExplosionsmall (thingy\tBangS.grp)
wait 3
end
DropshipWalking:
imgol 225 0 0 # DropshipGlow (thingy\tdrGlow.grp)
setvertpos 0
goto DropshipLocal00
DropshipLocal00:
wait 125
goto DropshipLocal00
3. The reason you can't just make an dropship attack in datedit, is because it doesn't have the iscript coding for attacking yet.
To make the attack script, just add in the things below:
Replace the "[NONE]" next to "GndAttkInit", "AirAttkInit", "GndAttkRpt", and "AirAttkRpt", with "DropshipAttkInit"
Replace the "[NONE]" next to "GndAttkToIdle" and "AirAttkToIdle" with "DropshipWalkingToIdle"
This tells that the dropship can attack without crashing.
Now, in between DropshipDeath and DropshipWalking (ON THE BOTTOM) put in the following code:
DropshipGndAttkInit:
attack
gotorepeatattk
goto DropshipGndAttkToIdle
This code tell what the dropship to do when it attacks. "attack" mean that the dropship should use its air attack on air units, and ground attack on ground units.
Say that you wanted to attack with two different weapons... You would make different air and ground attacks (in DatEdit) and the attack code (in IceCC) would look something like this:
DropshipGndAttkInit:
attackwith 1
wait 9
attackwith 2
gotorepeatattk
goto DropshipGndAttkToIdle
"attackwith 1" is telling the dropship to attack with the ground weapon, "attackwith 2" is telling it to attack with the air weapon.
You should check in DatEdit for it to harm both air and ground.
Now, your Iscript for the dropship should look like this:
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file '**FILE DECOMPILED**'
# created on: **YOUR TIME AND DATE HERE**
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 223 Dropship (terran\dropship.grp)
.headerstart
IsId 68
Type 12
Init DropshipInit
Death DropshipDeath
GndAttkInit DropshipGndAttkInit
AirAttkInit DropshipGndAttkInit
Unused1 [NONE]
GndAttkRpt DropshipGndAttkInit
AirAttkRpt DropshipGndAttkInit
CastSpell [NONE]
GndAttkToIdle DropshipGndAttkToIdle
AirAttkToIdle DropshipGndAttkToIdle
Unused2 [NONE]
Walking DropshipWalking
WalkingToIdle DropshipGndAttkToIdle
SpecialState1 [NONE]
.headerend
# ----------------------------------------------------------------------------- #
DropshipInit:
imgul 224 0 42 # DropshipShad (terran\dropship.grp)
playfram 0x00 # frame set 0
goto DropshipGndAttkToIdle
DropshipGndAttkToIdle:
setvertpos 1
waitrand 8 10
setvertpos 2
waitrand 8 10
setvertpos 1
waitrand 8 10
setvertpos 0
waitrand 8 10
goto DropshipGndAttkToIdle
DropshipDeath:
playsnd 210 # Terran\DROPSHIP\TDrDth00.wav
imgol 332 0 0 # TerranBuildingExplosionsmall (thingy\tBangS.grp)
wait 3
end
DropshipGndAttkInit:
attack
gotorepeatattk
goto DropshipGndAttkToIdle
DropshipWalking:
imgol 225 0 0 # DropshipGlow (thingy\tdrGlow.grp)
setvertpos 0
goto DropshipLocal00
DropshipLocal00:
wait 125
goto DropshipLocal0
4. Alright, now save the file, and in IceCC, click the Compiler tab, click "Add" then select "iscript.txt" (or whatever you saved it too) in your IceCC folder directory. Then, check "Display All Warnings" and then click "browse" next to "Save To:" and ALWAYS save it as "iscript.bin" DO NOT REPLACE THE ISCRIPT IN THE ICECC DIRECTORY! and click Compile and you're done with the Iscript!
Part II
-----------------------
Making Buildings Attack
Here, I'll teach you how to make a building attack.
1. The building's Iscript originally has no "...ToIdle" coding or "...AttkInit" Coding. You need to add these codings.
**If you don't know how to add code in please read Part I first**
2. Your coding for the CommandCenter Attacking should or be similar too, this:
The stuff you need to add will be underlined, italics, and bold!
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'I:\StarCraft modding\My Mods\Modcraft\scripts\Iscript.bin'
# created on: Wed Feb 07 22:55:38 2007
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 275 CommandCenter (terran\control.grp)
.headerstart
IsId 102
Type 20
Init CommandCenterInit
Death CommandCenterDeath
GndAttkInit CommandCenterGndAttkInit
AirAttkInit CommandCenterGndAttkInit
Unused1 [NONE]
GndAttkRpt CommandCenterGndAttkInit
AirAttkRpt CommandCenterGndAttkInit
CastSpell [NONE]
GndAttkToIdle CommandCenterWalking
AirAttkToIdle CommandCenterWalking
Unused2 [NONE]
Walking CommandCenterWalking
WalkingToIdle CommandCenterWalking
SpecialState1 CommandCenterSpecialState1
SpecialState2 [NONE]
AlmostBuilt CommandCenterAlmostBuilt
Built CommandCenterBuilt
Landing CommandCenterLanding
LiftOff CommandCenterLiftOff
IsWorking CommandCenterIsWorking
WorkingToIdle CommandCenterBuilt
WarpIn [NONE]
.headerend
# ----------------------------------------------------------------------------- #
CommandCenterInit:
imgul 277 0 0 # CommandCenterShad (terran\tccShad.grp)
CommandCenterBuilt:
playfram 0
goto CommandCenterWalking
CommandCenterWalking:
wait 125
goto CommandCenterWalking
CommandCenterDeath:
playsnd 7 # Misc\ExploLrg.wav
imgol 334 0 0 # TerranBuildingExplosionlarge (thingy\tBangX.grp)
wait 3
liftoffcondjmp CommandCenterLocal00
lowsprul 274 0 0 # TerranBuildingRubblelarge (thingy\RubbleL.grp)
wait 1
end
CommandCenterLocal00:
wait 1
end
CommandCenterGndAttkInit:
wait 1
attackwith 1
gotorepeatattk
goto CommandCenterWalking
CommandCenterSpecialState1:
playfram 4
goto CommandCenterWalking
CommandCenterAlmostBuilt:
playfram 1
goto CommandCenterWalking
CommandCenterLanding:
nobrkcodestart
wait 18
playsnd 472 # Misc\Land.WAV
playfram 4
wait 5
playfram 3
wait 5
playfram 2
wait 5
playfram 5
wait 5
playfram 0
sigorder 16
nobrkcodeend
goto CommandCenterWalking
CommandCenterLiftOff:
nobrkcodestart
playsnd 471 # Misc\LiftOff.WAV
playfram 5
wait 5
playfram 2
wait 5
playfram 3
wait 5
playfram 4
sigorder 16
nobrkcodeend
goto CommandCenterWalking
CommandCenterIsWorking:
imgol 276 0 0 # CommandCenterOverlay (terran\controlT.grp)
goto CommandCenterWalking
If you did a different building, where "CommandCenter" is where the the building you chose to do is. (If there is additional code, do not delete it)
You basically need to add ...ToIdle and ...AttkInit from the code into other building's code.
Part III
-----------------------
Making Ground Units Attack Air Too
In this section, I'll teach you how to make an tank to attack the ground and the air.
If you remember in Part I, attackwith 1 only shoots the ground weapon, and attackwith 2 only shoots with the air weapon.
The Goliath and the Siege Tank both have turrets to attack with. If you want to make a Siege Tank attack, you need to decompile the script for the turret. (keep in mind that the tank has two types of modes to attack with, Siege Mode and Tank Mode).
For this, I'll decompile the Siege Mode Tank.
It should look like this:
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: Tue Feb 13 18:00:00 2007
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 254 SiegeTankSiegeTurret (terran\stankt.grp)
.headerstart
IsId 93
Type 14
Init SiegeTank_Siege_TurretInit
Death SiegeTank_Siege_TurretDeath
GndAttkInit SiegeTank_Siege_TurretGndAttkInit
AirAttkInit [NONE]
Unused1 [NONE]
GndAttkRpt SiegeTank_Siege_TurretGndAttkInit
AirAttkRpt [NONE]
CastSpell [NONE]
GndAttkToIdle SiegeTank_Siege_TurretGndAttkToIdle
AirAttkToIdle [NONE]
Unused2 [NONE]
Walking [NONE]
WalkingToIdle SiegeTank_Siege_TurretGndAttkToIdle
SpecialState1 SiegeTank_Siege_TurretGndAttkToIdle
SpecialState2 SiegeTank_Siege_TurretSpecialState2
AlmostBuilt [NONE]
.headerend
# ----------------------------------------------------------------------------- #
SiegeTank_Siege_TurretInit:
playfram 0x11 # frame set 1
wait 1
nobrkcodestart
wait 38
playsnd 318 # Terran\TANK\TTaTra00.WAV
wait 3
playfram 0x22 # frame set 2
wait 3
playfram 0x33 # frame set 3
wait 3
playfram 0x44 # frame set 4
wait 3
playfram 0x55 # frame set 5
wait 3
setfldirect 28
playfram 0x00 # frame set 0
nobrkcodeend
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretGndAttkToIdle:
wait 125
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretDeath:
wait 1
end
SiegeTank_Siege_TurretGndAttkInit:
wait 1
nobrkcodestart
playsnd 96 # Bullet\TTaFi200.wav
imgoluselo 537 2 0 # Unknown537 (thingy\esiFire.grp)
wait 2
attackwith 1
wait 1
playfram 0x00 # frame set 0
nobrkcodeend
gotorepeatattk
ignorerest
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretSpecialState2:
setfldirect 12
playsnd 318 # Terran\TANK\TTaTra00.WAV
playfram 0x55 # frame set 5
wait 3
playfram 0x44 # frame set 4
wait 3
playfram 0x33 # frame set 3
wait 3
playfram 0x22 # frame set 2
wait 3
playfram 0x11 # frame set 1
goto SiegeTank_Siege_TurretGndAttkToIdle
You need to copy the "SiegeTank_Siege_TurretGndAttkInit" to the "AirAttkInit" and the "AirAttkRpt".
You also need to copy the "GndAttkToIdle" to the "AirAttkToIdle" as well.
Instead of "attackwith 1" in the "SiegeTank_Siege_TurretGndAttkInit" code on the bottom, put in "attack" (to attack with either air or ground, depending on the target).
If you want it to do two types of attacks, put in "attackwith 1" and "attack with 2".
Your code should now look like this (depending on which you did):
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: Tue Feb 13 18:00:00 2007
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 254 SiegeTankSiegeTurret (terran\stankt.grp)
.headerstart
IsId 93
Type 14
Init SiegeTank_Siege_TurretInit
Death SiegeTank_Siege_TurretDeath
GndAttkInit SiegeTank_Siege_TurretGndAttkInit
AirAttkInit SiegeTank_Siege_TurretGndAttkInit
Unused1 [NONE]
GndAttkRpt SiegeTank_Siege_TurretGndAttkInit
AirAttkRpt SiegeTank_Siege_TurretGndAttkInit
CastSpell [NONE]
GndAttkToIdle SiegeTank_Siege_TurretGndAttkToIdle
AirAttkToIdle SiegeTank_Siege_TurretGndAttkToIdle
Unused2 [NONE]
Walking [NONE]
WalkingToIdle SiegeTank_Siege_TurretGndAttkToIdle
SpecialState1 SiegeTank_Siege_TurretGndAttkToIdle
SpecialState2 SiegeTank_Siege_TurretSpecialState2
AlmostBuilt [NONE]
.headerend
# ----------------------------------------------------------------------------- #
SiegeTank_Siege_TurretInit:
playfram 0x11 # frame set 1
wait 1
nobrkcodestart
wait 38
playsnd 318 # Terran\TANK\TTaTra00.WAV
wait 3
playfram 0x22 # frame set 2
wait 3
playfram 0x33 # frame set 3
wait 3
playfram 0x44 # frame set 4
wait 3
playfram 0x55 # frame set 5
wait 3
setfldirect 28
playfram 0x00 # frame set 0
nobrkcodeend
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretGndAttkToIdle:
wait 125
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretDeath:
wait 1
end
SiegeTank_Siege_TurretGndAttkInit:
wait 1
nobrkcodestart
playsnd 96 # Bullet\TTaFi200.wav
imgoluselo 537 2 0 # Unknown537 (thingy\esiFire.grp)
wait 2
attack
wait 1
playfram 0x00 # frame set 0
nobrkcodeend
gotorepeatattk
ignorerest
goto SiegeTank_Siege_TurretGndAttkToIdle
SiegeTank_Siege_TurretSpecialState2:
setfldirect 12
playsnd 318 # Terran\TANK\TTaTra00.WAV
playfram 0x55 # frame set 5
wait 3
playfram 0x44 # frame set 4
wait 3
playfram 0x33 # frame set 3
wait 3
playfram 0x22 # frame set 2
wait 3
playfram 0x11 # frame set 1
goto SiegeTank_Siege_TurretGndAttkToIdle
You told that the AirAttk animation is the same as the GndAttk animation in the iscript. You also told it that the GndAttkToIdle is the same as the AirAttkToIdle.
That's all I'm doing for now... I'll post more later...
I'm always glad to help:) .