Staredit Network

Staredit Network -> Modding Assistance -> [IceCC] Big explosion...
Report, edit, etc...Posted by Pie_Sniper on 2006-09-16 at 19:39:48
When you click Siege Mode, you immediately enter this section of the iscript. I have edited this section of the iscript to immediately set off a large explosion and then kill the unit. The problem is, after the explosion happens, it crashes.

I think it may have something to do with the base and turret dying at different times, but I don't understand how the turret knows when to die so I'm not sure.

Here is the code for the tank base and turret:
CODE
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'C:\Program Files (x86)\Starcraft\Exiles' Return\MPQ\scripts\iscript.bin'
# created on: Sat Sep 16 16:16:18 2006
# ----------------------------------------------------------------------------- #

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 253 SiegeTankSiegeBase (terran\stank.grp)
.headerstart
IsId            92
Type            23
Init            SiegeTankSiegeBaseInit
Death           [NONE]
GndAttkInit     [NONE]
AirAttkInit     [NONE]
SpAbility1      [NONE]
GndAttkRpt      [NONE]
AirAttkRpt      [NONE]
SpAbility2      [NONE]
GndAttkToIdle   [NONE]
AirAttkToIdle   [NONE]
SpAbility3      [NONE]
Walking         [NONE]
Other           [NONE]
BurrowInit      [NONE]
ConstrctHarvst  [NONE]
IsWorking       [NONE]
Landing         [NONE]
LiftOff         [NONE]
Unknown18       [NONE]
Unknown19       [NONE]
Unknown20       [NONE]
Unknown21       [NONE]
Unknown22       [NONE]
Unknown23       [NONE]
.headerend
# ----------------------------------------------------------------------------- #

SiegeTankSiegeBaseInit:
playsnd         317 # Terran\TANK\TTaDth00.WAV
imgol08         333 0 0 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 -50 -50 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 -50 0 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 -50 50 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 0 -50 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 0 50 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 50 -50 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 50 0 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 50 50 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            3
end            


# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 254 SiegeTankSiegeTurret (terran\stankt.grp)
.headerstart
IsId            93
Type            14
Init            SiegeTankSiegeTurretInit
Death           [NONE]
GndAttkInit     [NONE]
AirAttkInit     [NONE]
SpAbility1      [NONE]
GndAttkRpt      [NONE]
AirAttkRpt      [NONE]
SpAbility2      [NONE]
GndAttkToIdle   [NONE]
AirAttkToIdle   [NONE]
SpAbility3      [NONE]
Walking         [NONE]
Other           [NONE]
BurrowInit      [NONE]
ConstrctHarvst  [NONE]
IsWorking       [NONE]
.headerend
# ----------------------------------------------------------------------------- #

SiegeTankSiegeTurretInit:
imgol08         333 0 0 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 -50 0 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 0 -50 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 0 50 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            1
imgol08         333 50 0 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait            3
end            
Report, edit, etc...Posted by Voyager7456(MM) on 2006-09-16 at 20:06:12
I think instead of using the end opcode, I'd have it use a useweapon opcode that points to a weapon with the Suicide behavior. End just gets rid of the graphic, it doesn't actually kill the unit.
Report, edit, etc...Posted by Pie_Sniper on 2006-09-16 at 20:11:48
Interesting... So the Death header doesn't kill the unit (it's already dead) but it removes the sprite?

:: Edit
I added "useweapon 54" (Suicide (Infested Terran)) before "end" and it still crashes. IceCC complains if there is no "end" command in the script.
Report, edit, etc...Posted by BSTRhino on 2006-09-16 at 20:23:59
That's right. End simply removes the current image overlay. The sprite gets removed when all the image overlays are gone. However, a suicide weapon removes the sprite (with all its image overlays) in one go, so the explosion image overlays won't play in full unless you wait the full 10 ticks or how ever long they last. I don't remember how long they last, check that one out.

Edit: Just saw your new issue. Don't end, just go into an endless wait loop. It's a good idea to keep repeating the useweapon suicide command because if the sprite limit is hit, the useweapon command might fail.
Report, edit, etc...Posted by Pie_Sniper on 2006-09-16 at 20:52:06
Good thing there is a useweapon, because now I can just add a big splash range for the explosion damage. I thought your solution didn't work, but I just realised IceCC decided not to compile my iscript... blink.gif

:: Edit
Okay, I got around to remaking the iscript. I did the same thing except like this:
CODE
...
   imgol08      333 50 50 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
   wait         10
local00:                  # Why local00? I seem to see it a lot used like this
   useweapon    54        # Suicide (Infested Terran)
   wait         35        # Why 35? I seem to see 35 a lot...
   goto         local00

So, I build a tank and detonate it. The explosion goes off, and the tank sits there inifinitely doing suicide damage to everything that comes near it. Suicide is not doing any damage to itself. If I put to tanks right next to eachother and detonate them at the same time, the explosion goes off, then they deal damage to eachother and die and the sprites stay behind with the explosions half way through a second round... I have a screenshot on my computer with the mod on it, which happens to not be this one. So the main problem is that suicide is not killing themselves. Does the name "local00" signify anything? Is the wait time imperative to success?
Report, edit, etc...Posted by Kookster on 2006-09-19 at 22:08:46
maby if you killed the turret or removed it, it might work. By making the siege turret initial the attack so as soon as it is loaded which is when you push the button it goes BOOM.

turn that around since your doing it to the turret try to kill it when it changes units maby aka the tank body

ADDITION:
Ok i succesfully did it, so this is what you need to do:
So on the siege turret initial make it use its weapon but it must be atleast 4 clicks before it does its attack
give it a wait of however many clicks you need after the weapon

now the attack i did it like this:
type: explosion
explosion:splash(radial)
behavior:suicide
Graphic:unknown147 (now this graphic you need to set it so it does all the iscript stuff you want)

and that should do it
i think that covers everything i am including my work so you can see how it was done
note: i did my iscript editing in icexp so you wont be able to open that

if you want i can post later what i did exactly to the tank iscript i did it to the turret but i did a bit to the tank too
Report, edit, etc...Posted by BSTRhino on 2006-09-20 at 17:11:14
Oh yeah, I forgot to say that the Infested Terran suicide isn't what we mean when we say "suicide weapon." We actually mean the scourge suicide or something like that - the weapon has got to have its behaviour set to "suicide" and the Infested Terran suicide has it set to "normal hit." The Infested Terran is killed by an order (see the AI/orders tab for it in units.dat) and so it works slightly differently. The scourge is usually the unit I model my suicide units off, and that was the model we were suggesting here.

Edit: I also just wanted to add a bit more explanation. Any weapon that has its behaviour set to suicide makes the whole unit (including all its component image overlays including explosions) just disappear as soon as its used, whereas normal hit just applies damage.

Edit 2: Thought it'd be more helpful if I was more explicit. So if all you do is switch to the scourge suicide, or make your own suicide weapon, then the problem will be fixed.
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-09-20 at 17:23:52
Yeah. I've made my own suicide weapons for Ex Machina, and it works fine. You might have a problem, however, since--I think--you need a target to use the useweapon opcode. And "local00" does not signify anything. Scripts that don't need to be included in headers, such as the bored Marine/Ghost animations or various others, are decompiled simply with the name "localxx" where xx is the number of scripts like this before them in the same decompile. So if you decompile only the tank, it'll get the label local00, but if you decompile, say, the Scourge and the tank, the Scourge will get local00 since it has a lower unit ID and the tank will get local01. In full unit decompiles (which is what I always do) they shoot up into the 200s.
Report, edit, etc...Posted by Pie_Sniper on 2006-09-21 at 19:51:08
Okay, problem solved. Right now I just need to go adjust the tick count for the explosions so they finish.
Report, edit, etc...Posted by Pyro-Fire on 2006-09-21 at 20:19:13
or why dont you just remove the iscripting from the turret head, because, it isnt supposed to die. leave that one as the default script, it should die with the tank body. if you understand my point...
Report, edit, etc...Posted by Pie_Sniper on 2006-09-21 at 21:11:13
Okay. By the way, any idea why making unit\terran\stank.grp, unit\terran\stankt.grp, and unit\terran\tstshad.grp blank images would make this happen?

user posted image
Report, edit, etc...Posted by BSTRhino on 2006-09-21 at 21:13:29
I noticed you asking how many ticks a tank explosion is. From memory, explosions last around 11 ticks, but the way to find out for sure is to decompile the iscripts of the explosions. Like for the medium explosion which is made from the line "imgol08 333" go along a decompile image 333. Then if you count the number of tick waits between the Init block start and the end command you'll be able to find out how many ticks the explosion lasts.

Edit: Oh hey, new question. I don't really know about the transparency thing, I would've expected the boxes to be centered where the unit is.

If you want the tank base or turret not to be displayed, the easiest way (and most space efficient way) is to just write "tmprmgraphicstart" at the start of the init block for their iscripts.
Report, edit, etc...Posted by Pie_Sniper on 2006-09-21 at 21:15:04
I ended up having "wait 25" before local00. It might be a tick or two too long but it doesn't matter much.

:: Edit
Oh yeah, I read about that command once. Didn't stick in my memory, I guess.
Report, edit, etc...Posted by BSTRhino on 2006-09-21 at 21:16:39
I edited in a new answer in my post above which you might not have seen. I'll copy it here as well:

If you want the tank base or turret not to be displayed, the easiest way (and most space efficient way) is to just write "tmprmgraphicstart" at the start of the init block for their iscripts.
Report, edit, etc...Posted by Pie_Sniper on 2006-09-21 at 21:35:35
It's exactly 20 ticks if anyone cares.
Next Page (1)