I am having some problems at converting the corsair into a carrier stiled ship. I just want to make it to look like a carrier, and use a custom attack. I've become familiar with DatEdit. I have a custom grp file named corsair.grp, and my units, weapons, flingy, sprites and images.dat file. I've put them into an mpq file, then made a self-executing stuff from it. After thousands of tryings and crashes, I've realized that I may need more than DatEdit, and run into IceCC and iscript.bin. I've modified it for my needs, but every time when I want to attack with the ship, it just attacks once, then stops, but then it's still have the attack button highlighted, and keeps following it's target without actually shooting it. After some time the game crashes. Also note that the missile doesn't show up.
iscript code:
Spoiler
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 929 Corsair (protoss\corsair.grp)
.headerstart
IsId 369
Type 21
Init CorsairInit
Death CorsairDeath
GndAttkInit CorsairGndAttkInit
AirAttkInit CorsairAirAttkInit
Unused1 [NONE]
GndAttkRpt CorsairGndAttkRpt
AirAttkRpt CorsairAirAttkRpt
CastSpell CorsairCastSpell
GndAttkToIdle CorsairGndAttkToIdle
AirAttkToIdle CorsairGndAttkToIdle
Unused2 [NONE]
Walking CorsairWalking
WalkingToIdle CorsairGndAttkToIdle
SpecialState1 [NONE]
SpecialState2 [NONE]
AlmostBuilt [NONE]
Built [NONE]
Landing [NONE]
LiftOff [NONE]
IsWorking [NONE]
WorkingToIdle [NONE]
WarpIn CorsairWarpIn
.headerend
# ----------------------------------------------------------------------------- #
CorsairInit:
imgul 930 0 42 # CorsairShad (protoss\corsair.grp)
CorsairGndAttkToIdle:
playfram 0x00 # frame set 0
goto CorsairLocal00
CorsairLocal00:
playfram 0x11 # frame set 1
setvertpos 1
waitrand 8 10
playfram 0x22 # frame set 2
setvertpos 2
waitrand 8 10
setvertpos 1
playfram 0x11 # frame set 1
waitrand 8 10
setvertpos 0
playfram 0x00 # frame set 0
waitrand 8 10
goto CorsairLocal00
CorsairDeath:
playsnd 533 # Protoss\Scout\PScDth00.WAV
imgol 215 0 0 # ProtossBuildingExplosionLarge (thingy\tBangX.grp)
wait 5
end
CorsairGndAttkInit:
playfram 0x11 # frame set 1
wait 1
playfram 0x22 # frame set 2
CorsairGndAttkRpt:
playsnd 1060 # Protoss\Corsair\PCorlasr2.wav
attackwith 2
wait 2
attackwith 1
attackwith 1
wait 2
attackwith 1
attackwith 2
attackwith 1
wait 5
attackwith 1
attackwith 2
wait 1
playfram 0x11 # frame set 1
gotorepeatattk
goto CorsairGndAttkToIdle
CorsairAirAttkInit:
playfram 0x11 # frame set 1
wait 1
playfram 0x22 # frame set 2
CorsairAirAttkRpt:
playsnd 1060 # Protoss\Corsair\PCorlasr2.wav
attackwith 2
wait 2
attackwith 1
attackwith 1
wait 2
attackwith 1
attackwith 2
attackwith 1
wait 5
attackwith 1
attackwith 2
wait 1
playfram 0x11 # frame set 1
gotorepeatattk
goto CorsairGndAttkToIdle
CorsairCastSpell:
playfram 0x00 # frame set 0
nobrkcodestart
wait 1
playfram 0x00 # frame set 0
wait 1
playsnd 1059 # Protoss\Corsair\PCorWeb1.wav
castspell
nobrkcodeend
gotorepeatattk
sigorder 2
goto CorsairGndAttkToIdle
CorsairWalking:
imgol 114 0 0 # CarrierGlow (thingy\pcaGlow.grp)
playfram 0x00 # frame set 0
setvertpos 0
goto CorsairLocal01
CorsairLocal01:
wait 125
goto CorsairLocal01
CorsairWarpIn:
imgol 143 0 0 # Unknown143 (protoss\scout.grp)
goto CorsairLocal01
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 929 Corsair (protoss\corsair.grp)
.headerstart
IsId 369
Type 21
Init CorsairInit
Death CorsairDeath
GndAttkInit CorsairGndAttkInit
AirAttkInit CorsairAirAttkInit
Unused1 [NONE]
GndAttkRpt CorsairGndAttkRpt
AirAttkRpt CorsairAirAttkRpt
CastSpell CorsairCastSpell
GndAttkToIdle CorsairGndAttkToIdle
AirAttkToIdle CorsairGndAttkToIdle
Unused2 [NONE]
Walking CorsairWalking
WalkingToIdle CorsairGndAttkToIdle
SpecialState1 [NONE]
SpecialState2 [NONE]
AlmostBuilt [NONE]
Built [NONE]
Landing [NONE]
LiftOff [NONE]
IsWorking [NONE]
WorkingToIdle [NONE]
WarpIn CorsairWarpIn
.headerend
# ----------------------------------------------------------------------------- #
CorsairInit:
imgul 930 0 42 # CorsairShad (protoss\corsair.grp)
CorsairGndAttkToIdle:
playfram 0x00 # frame set 0
goto CorsairLocal00
CorsairLocal00:
playfram 0x11 # frame set 1
setvertpos 1
waitrand 8 10
playfram 0x22 # frame set 2
setvertpos 2
waitrand 8 10
setvertpos 1
playfram 0x11 # frame set 1
waitrand 8 10
setvertpos 0
playfram 0x00 # frame set 0
waitrand 8 10
goto CorsairLocal00
CorsairDeath:
playsnd 533 # Protoss\Scout\PScDth00.WAV
imgol 215 0 0 # ProtossBuildingExplosionLarge (thingy\tBangX.grp)
wait 5
end
CorsairGndAttkInit:
playfram 0x11 # frame set 1
wait 1
playfram 0x22 # frame set 2
CorsairGndAttkRpt:
playsnd 1060 # Protoss\Corsair\PCorlasr2.wav
attackwith 2
wait 2
attackwith 1
attackwith 1
wait 2
attackwith 1
attackwith 2
attackwith 1
wait 5
attackwith 1
attackwith 2
wait 1
playfram 0x11 # frame set 1
gotorepeatattk
goto CorsairGndAttkToIdle
CorsairAirAttkInit:
playfram 0x11 # frame set 1
wait 1
playfram 0x22 # frame set 2
CorsairAirAttkRpt:
playsnd 1060 # Protoss\Corsair\PCorlasr2.wav
attackwith 2
wait 2
attackwith 1
attackwith 1
wait 2
attackwith 1
attackwith 2
attackwith 1
wait 5
attackwith 1
attackwith 2
wait 1
playfram 0x11 # frame set 1
gotorepeatattk
goto CorsairGndAttkToIdle
CorsairCastSpell:
playfram 0x00 # frame set 0
nobrkcodestart
wait 1
playfram 0x00 # frame set 0
wait 1
playsnd 1059 # Protoss\Corsair\PCorWeb1.wav
castspell
nobrkcodeend
gotorepeatattk
sigorder 2
goto CorsairGndAttkToIdle
CorsairWalking:
imgol 114 0 0 # CarrierGlow (thingy\pcaGlow.grp)
playfram 0x00 # frame set 0
setvertpos 0
goto CorsairLocal01
CorsairLocal01:
wait 125
goto CorsairLocal01
CorsairWarpIn:
imgol 143 0 0 # Unknown143 (protoss\scout.grp)
goto CorsairLocal01
# ----------------------------------------------------------------------------- #