Code
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 221 Civilian (neutral\civilian.grp)
.headerstart
IsId 67
Type 12
Init CivilianInit
Death CivilianDeath
GndAttkInit CivilianGndAttkInit
AirAttkInit [NONE]
Unused1 [NONE]
GndAttkRpt CivilianGndAttkRpt
AirAttkRpt [NONE]
CastSpell CivilianCastSpell
GndAttkToIdle CivilianGndAttkToIdle
AirAttkToIdle [NONE]
Unused2 [NONE]
Walking CivilianWalking
WalkingToIdle CivilianWalkingToIdle
SpecialState1 [NONE]
.headerend
# ----------------------------------------------------------------------------- #
CivilianInit:
imgul 222 0 0 # Civilian Shadow (neutral\nciShad.grp)
CivilianWalkingToIdle:
playfram 0x77 # Frame set 7
CivilianLocal00:
waitrand 63 75
randcondjmp 128 CivilianLocal01
goto CivilianLocal00
CivilianLocal01:
turnrand 3
goto CivilianWalkingToIdle
CivilianDeath:
playsndbtwn 276 277 # Terran\MARINE\TMaDth00.WAV | Terran\MARINE\TMaDth01.WAV
imgol 242 0 0 # Marine Death (terran\marine.grp)
wait 1
end
CivilianCastSpell:
nobrkcodestart
playfram 0x88
wait 1
playsnd 240 # Terran\GHOST\TGhLkd00.wav
castspell
playfram 0x99
wait 2
nobrkcodeend
gotorepeatattk
sigorder 2
goto CivilianGndAttkToIdle
CivilianGndAttkInit:
playfram 0x88
wait 1
playfram 0x99
CivilianGndAttkRpt:
wait 1
nobrkcodestart
playfram 0x88
wait 1
playsnd 69 # Bullet\TMaFir00.wav
attackwith 1
playfram 0x99
nobrkcodeend
gotorepeatattk
ignorerest
CivilianGndAttkToIdle:
wait 1
playfram 0x88
wait 1
goto CivilianWalkingToIdle
CivilianWalking:
move 4
wait 1
playfram 0x00 # Frame set 0
move 4
wait 1
playfram 0x11 # Frame set 1
move 4
wait 1
playfram 0x22 # Frame set 2
move 4
wait 1
playfram 0x33 # Frame set 3
move 4
wait 1
playfram 0x44 # Frame set 4
move 4
wait 1
playfram 0x55 # Frame set 5
move 4
wait 1
playfram 0x66 # Frame set 6
move 4
wait 1
playfram 0x77 # Frame set 7
goto CivilianWalking
# This header is used by images.dat entries:
# 221 Civilian (neutral\civilian.grp)
.headerstart
IsId 67
Type 12
Init CivilianInit
Death CivilianDeath
GndAttkInit CivilianGndAttkInit
AirAttkInit [NONE]
Unused1 [NONE]
GndAttkRpt CivilianGndAttkRpt
AirAttkRpt [NONE]
CastSpell CivilianCastSpell
GndAttkToIdle CivilianGndAttkToIdle
AirAttkToIdle [NONE]
Unused2 [NONE]
Walking CivilianWalking
WalkingToIdle CivilianWalkingToIdle
SpecialState1 [NONE]
.headerend
# ----------------------------------------------------------------------------- #
CivilianInit:
imgul 222 0 0 # Civilian Shadow (neutral\nciShad.grp)
CivilianWalkingToIdle:
playfram 0x77 # Frame set 7
CivilianLocal00:
waitrand 63 75
randcondjmp 128 CivilianLocal01
goto CivilianLocal00
CivilianLocal01:
turnrand 3
goto CivilianWalkingToIdle
CivilianDeath:
playsndbtwn 276 277 # Terran\MARINE\TMaDth00.WAV | Terran\MARINE\TMaDth01.WAV
imgol 242 0 0 # Marine Death (terran\marine.grp)
wait 1
end
CivilianCastSpell:
nobrkcodestart
playfram 0x88
wait 1
playsnd 240 # Terran\GHOST\TGhLkd00.wav
castspell
playfram 0x99
wait 2
nobrkcodeend
gotorepeatattk
sigorder 2
goto CivilianGndAttkToIdle
CivilianGndAttkInit:
playfram 0x88
wait 1
playfram 0x99
CivilianGndAttkRpt:
wait 1
nobrkcodestart
playfram 0x88
wait 1
playsnd 69 # Bullet\TMaFir00.wav
attackwith 1
playfram 0x99
nobrkcodeend
gotorepeatattk
ignorerest
CivilianGndAttkToIdle:
wait 1
playfram 0x88
wait 1
goto CivilianWalkingToIdle
CivilianWalking:
move 4
wait 1
playfram 0x00 # Frame set 0
move 4
wait 1
playfram 0x11 # Frame set 1
move 4
wait 1
playfram 0x22 # Frame set 2
move 4
wait 1
playfram 0x33 # Frame set 3
move 4
wait 1
playfram 0x44 # Frame set 4
move 4
wait 1
playfram 0x55 # Frame set 5
move 4
wait 1
playfram 0x66 # Frame set 6
move 4
wait 1
playfram 0x77 # Frame set 7
goto CivilianWalking
I made the needed .dat changes and such, but when it attacks, it crashes.
Edit: It will attack one unit, then when stopped and told to attack another, crash.
Halp?
Post has been edited 1 time(s), last time on Mar 7 2009, 12:50 am by Andrew Jackson.
SEN Global Moderator and Resident Zealot
-------------------------
The sword and the faith.
Sector 12
My stream, live PC building and tech discussion.