PDA

View Full Version : Damaging explosions


coolpotatoes
06-02-2007, 9:21 PM
My idea is to cause the pylon to create a big explosion damaging everything around it when it dies. I modified gausserifle1 in weapons.dat to make it explosive. Then gave the pylon an attack iscript without any attack commands. Then modified the death script. One of 3 things happens
1. It works (so far only when I kill the comps pylon):D
2. The pylon explodes with the emp shockwave graphic without hurting anything (usually when I kill my own plylon):rolleyes:
3. The game crashes (only happened 1X):cry:
Here is the iscript (imgol 555,556 is the emp shockwave, 117 is gaussrifle1)
# This header is used by images.dat entries:
# 189 Pylon (protoss\pylon.grp)
.headerstart
IsId 181
Type 21
Init PylonInit
Death PylonDeath
GndAttkInit PylonGndAttkInit
AirAttkInit PylonGndAttkInit
SpAbility1 [NONE]
GndAttkRpt PylonGndAttkInit
AirAttkRpt PylonGndAttkInit
SpAbility2 [NONE]
GndAttkToIdle PylonGndAttkToIdle
AirAttkToIdle PylonGndAttkToIdle
SpAbility3 [NONE]
Walking [NONE]
Other [NONE]
BurrowInit [NONE]
ConstrctHarvst [NONE]
IsWorking [NONE]
Landing PylonLanding
LiftOff [NONE]
Unknown18 [NONE]
Unknown19 PylonUnknown19
Unknown20 PylonUnknown19
Unknown21 PylonUnknown21
.headerend
# ----------------------------------------------------------------------------- #

PylonInit:
imgul09 191 0 0 # PylonShad (protoss\ppyShad.grp)
PylonLanding:
playfram 0
goto PylonUnknown19

PylonUnknown19:
wait 125
goto PylonUnknown19

PylonDeath:
playsnd 7 # Misc\ExploLrg.wav
imgol08 555 0 0
wait 1
imgol08 556 0 0
useweapon 117
imgol08 215 0 0 # ProtossBuildingExplosionLarge (thingy\tBangX.grp)
wait 3
end

PylonGndAttkInit:
wait 1
goto PylonGndAttkInit

PylonGndAttkToIdle:
wait 1
goto PylonInit

PylonUnknown21:
imgol08 190 0 0 # PylonWarpFlash (protoss\pylon.grp)
goto PylonUnknown19

Can someone plz help me fix it so that it always explodes and hurts everything around it

matefkr
06-03-2007, 9:37 AM
You should replace the goto pylongndattkinit with gotorepeatattk (or something like that). Also, the use weapon only works if there are some enemy in the range (that is why only enemy pylons hurt you). You may can do it with the usage of the sigorder (i meant i can only see possiblities in that, couz i don't know what it exactly does). You may can use the nuclear missile damage properties and/or iscript. I will try.