Staredit Network

Staredit Network -> Modding Assistance -> Two questions about...
Report, edit, etc...Posted by TheStrategist on 2006-09-24 at 20:22:32
I've been playing around with DatEdit and IceCC to change an interceptor into a warhead-type weapon. I've made the interceptor suicidal and do splash damage, but there are two things I havn't figured out yet, and I'm wondering if its possible... Anyways, here are my questions:

1. How do you stop the interceptors from flying around the place? Does it involve changing the AI Actions in the unit properties?

2. How do you make the interceptors blow up like a nuclear missile? (as in the graphics of a nuclear explosion)
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-09-24 at 20:27:07
1) No clue...probably that's it.

2) Add this line to the Interceptor's death script:
CODE

sprol0f         267 0 214


If you use ICECC. I don't know what that translates to in ICE, but I imagine it's not too different.
Report, edit, etc...Posted by TheStrategist on 2006-09-24 at 21:04:03
That was one of the first things I tried. The interceptor just wont explode like a nuke does sad.gif Hmm... I must be doing something wrong or something.

I could post the code if you want...
Report, edit, etc...Posted by Lord_Agamemnon(MM) on 2006-09-24 at 21:37:23
That would be very good. And did you use sprol0f? imgol08 wouldn't do it right.
Report, edit, etc...Posted by Kookster on 2006-09-25 at 00:03:16
1)Im pretty sure its the AI features in the units.dat, but i think i tried changing it once and it crashed, but i didnt try very hard.

2)What you can do is add the nuke explosion to its weapons animation and then make sure that there are enough clicks in the death for the graphic to complete otherwise it wont show it all.
Report, edit, etc...Posted by BSTRhino on 2006-09-25 at 00:16:37
QUOTE(kookster @ Sep 25 2006, 05:02 PM)
2)What you can do is add the nuke explosion to its weapons animation and then make sure that there are enough clicks in the death for the graphic to complete otherwise it wont show it all.
[right][snapback]567668[/snapback][/right]


Actually that only applies when you're using a suicide weapon because it forceably removes all image overlays, including explosion image overlays. If you just create a regular image overlay using imgol08 in a death animation, it will always continue until completion because the end command in the unit graphic image overlay will only remove the unit graphic image overlay. Also in this case, the nuclear explosion is actually a sprite overlay, so because it's in a separate sprite from the unit, it can continue to exist independent of a unit, even if the unit did use a suicide weapon.

It would be really good if you could post your code. Unless 267 is the wrong sprite ID, I can't see why you won't at least get a nuclear explosion even if it isn't being displayed properly.
Report, edit, etc...Posted by Kookster on 2006-09-25 at 02:06:59
QUOTE
I've made the interceptor suicidal and do splash damage

he said he was using a suicide attack or in a way.

QUOTE
Actually that only applies when you're using a suicide weapon because it forceably removes all image overlays, including explosion image overlays.

it also removes attack overlays too unless you give the death remove enough clicks before ending the animation, atleast that is an issue i ran into once. huh.gif
Report, edit, etc...Posted by TheStrategist on 2006-09-25 at 07:26:35
CODE
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: Mon Sep 25 16:34:03 2006
# ----------------------------------------------------------------------------- #

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 116 Interceptor (protoss\Intercep.grp)
.headerstart
IsId            155
Type            12
Init            InterceptorInit
Death           InterceptorDeath
GndAttkInit     InterceptorGndAttkInit
AirAttkInit     InterceptorGndAttkInit
SpAbility1      [NONE]
GndAttkRpt      InterceptorGndAttkInit
AirAttkRpt      InterceptorGndAttkInit
SpAbility2      [NONE]
GndAttkToIdle   InterceptorGndAttkToIdle
AirAttkToIdle   InterceptorGndAttkToIdle
SpAbility3      [NONE]
Walking         InterceptorWalking
Other           InterceptorOther
BurrowInit      [NONE]
.headerend
# ----------------------------------------------------------------------------- #

InterceptorInit:
imgul09         117 0 42 # InterceptorShad (protoss\Intercep.grp)
playfram        0x00 # frame set 0
goto            InterceptorOther

InterceptorOther:
shvertpos       1
waitrand        8 10
shvertpos       2
waitrand        8 10
shvertpos       1
waitrand        8 10
shvertpos       0
waitrand        8 10
goto            InterceptorOther

InterceptorDeath:
playsnd         8 # Misc\ExploMed.wav
imgol08         213 0 0 # ProtossBuildingExplosionSmall (thingy\tBangS.grp)
sprol0f         267 0 214
wait            3
end            

InterceptorGndAttkInit:
wait            1
attack25        1
playfram        0x11 # frame set 1
wait            1
playfram        0x00 # frame set 0
gotorepeatattk  
goto            InterceptorGndAttkToIdle

InterceptorGndAttkToIdle:
wait            125
goto            InterceptorGndAttkToIdle

InterceptorWalking:
playfram        0x00 # frame set 0
shvertpos       0
goto            InterceptorGndAttkToIdle


Also, the pulse cannon for the interceptor is set to suicide in the graphic properties in weapons.dat.
Report, edit, etc...Posted by BSTRhino on 2006-09-25 at 17:21:18
Oh right, he is using a suicide weapon gotcha.

Put the sprol0f command above attack25 and you'll get a nuke explosion. Suicide weapons don't call the death animation, it was kinda like I said before, they suicide weapons just forceably remove the unit and all its image overlays right there and then, so all of the commands following the attack25 won't execute because the unit graphic image overlay will be gone (for those who are more advanced, I think the suicide happens on the wait command which could mean some commands could execute after the attack, but that doesn't really change a lot).
Report, edit, etc...Posted by TheStrategist on 2006-09-25 at 18:27:58
EDIT: Ok... I must be doing something wrong, because I managed to create the explosion once and only once. I'm still using Suicide as the weapon behaviour.

CODE
InterceptorGndAttkInit:
wait            1
sprol0f         267 0 214 # NuclearExplosion (thingy\NukeHit.grp)
attack25        1
playfram        0x11 # frame set 1
wait            1
playfram        0x00 # frame set 0
gotorepeatattk  
goto            InterceptorGndAttkToIdle


EDIT2: I've managed to create the nuclear explosion using the Appears on Target behaviour. Though, it does no damage now.

EDIT3: Now the code works... Problem solved... I guess...

I don't think I'll change the movement behaviour of interceptors, since they will either not move or cause the game to crash. Thanks for the help.
Report, edit, etc...Posted by TERRAINFIGHTER on 2006-09-25 at 21:04:54
1. Change the first 3 AI the unit's set to use to Guard, and test it to see if it worked.

2. I guess they've already solved this, sorry. sad.gif
Next Page (1)