View Full Version : Help with Carrier
Akuma
08-11-2004, 10:46 AM
I'm trying to give the Carrier's graphics to the Khaydarin Crystal and allow an attack animation (no Interceptors) that shows a Yamato Gun power-up twice before firing. I copied all of the Carriers iscript routines in IceCC and added a GndAttkInit that's a direct copy of the Battlecruiser's SpAbility2. I also rnamed all of the functions to work properly with the Khaydarin Crystal.
My problem: It won't attack. When directed to attack, it moves into range, waits about 5 seconds and then crashes the game - regardless of whether or not it's on screen at the time. Can anyone suggest why this might be/ways to fix it?
King_Templar
08-11-2004, 10:57 AM
Well, to start off, if you made the attack an EXACT copy of the Battlecruisers special ability code, you don't have an attack command in there. That would screw things up. So replace castspell with an attack25 or attack26. And give the Crystal the Yamato gun as it's weapon (either by copy or directly). If what you are doing is what i think, hopefully that should fix it.
Akuma
08-11-2004, 12:08 PM
The Crystal has a new weapon that uses the projectile graphic of the Yamato Gun but has a Nuke explosion. And I removed castspell and added a goto local00, which contains the attack25 along with repeatattk etc.
King_Templar
08-11-2004, 12:16 PM
Code please. It's kinda hard to work on this without seeing what is getting worked on.
StealthyDeath
08-11-2004, 3:47 PM
Make sure the images.dat is correct. Also since you have the powerup animation you need to have the overlay number in one of the overlay slots. You can look at the Battlecrusiers and check to see what the overlays are and copy them to your unit.
Sikawtic
08-11-2004, 3:50 PM
SD is back :D (or at least at a compy)[/off topic]
StealthyDeath
08-11-2004, 3:56 PM
Only at a internet cafe for a couple minutes.
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 959 KhalisCrystal (neutral\Khalis.grp)
# 958 UrajCrystal (neutral\Uraj.grp)
# 396 KhadarinCrystal (neutral\KhChunk.grp)
.headerstart
IsId 219
Type 21
Init KhadarinCrystalInit
Death KhadarinCrystalDeath
GndAttkInit KhadarinCrystalGndAttkInit
AirAttkInit [NONE]
SpAbility1 [NONE]
GndAttkRpt KhadarinCrystalGndAttkInit
AirAttkRpt [NONE]
SpAbility2 [NONE]
GndAttkToIdle KhadarinCrystalGndAttkToIdle
AirAttkToIdle [NONE]
SpAbility3 [NONE]
Walking KhadarinCrystalWalking
Other KhadarinCrystalOther
BurrowInit [NONE]
ConstrctHarvst [NONE]
IsWorking [NONE]
Landing [NONE]
LiftOff [NONE]
Unknown18 [NONE]
Unknown19 [NONE]
Unknown20 [NONE]
Unknown21 KhadarinCrystalUnknown21
.headerend
# ----------------------------------------------------------------------------- #
KhadarinCrystalInit:
__3d 10752
playfram 0x00 # frame set 0
goto KhadarinCrystalOther
KhadarinCrystalGndAttkInit:
imgol0a 543 # Unknown543 (thingy\eycBlast.grp)
imgol0a 543 # Unknown543 (thingy\eycBlast.grp)
goto local00
local00:
wait 1
attack25 1
gotorepeatattk
goto KhadarinCrystalGndAttkToIdle
KhadarinCrystalOther:
shvertpos 1
waitrand 8 10
shvertpos 2
waitrand 8 10
shvertpos 1
waitrand 8 10
shvertpos 0
waitrand 8 10
goto KhadarinCrystalOther
KhadarinCrystalDeath:
shvertpos 1
wait 2
shvertpos 1
wait 2
shvertpos 1
wait 1
shvertpos 1
playsndbtwn 595 596 # Protoss\Carrier\PCaDth00.WAV, Protoss\Carrier\PCaDth01.WAV
imgol08 214 0 0 # ProtossBuildingExplosionMedium (thingy\tBangL.grp)
wait 3
end
KhadarinCrystalGndAttkToIdle:
wait 125
goto KhadarinCrystalGndAttkToIdle
KhadarinCrystalWalking:
imgol08 114 0 0 # CarrierGlow (thingy\pcaGlow.grp)
goto local02
local02:
wait 125
goto local02
KhadarinCrystalUnknown21:
imgol08 115 0 0 # Unknown115 (protoss\carrier.grp)
goto local02
King_Templar
08-11-2004, 4:43 PM
Hrm, i don't see anything wrong...Lets see. You gave it buttons, enabled attack in Arsenal III, etc. right?
Buttons: not as yet...I can, but I was hoping to save that until later. What are SD's suggestions exactly? In Arsenal I gave it the Carrier .grp and the Attack Unit AI command.
King_Templar
08-11-2004, 5:41 PM
How do you get the unit to attack without buttons?
As long as its Attack Unit AI is set through Arsenal and it has a weapon, right-clicking on an enemy unit sets it to attack that unit. It worked with my other edited unit (which has a lot less problems that this one.)
King_Templar
08-11-2004, 6:01 PM
Well, i'm stumped. Oh, wait...did you give the khydarian crystal the Carrier sprite via Arsenal? Cause if you did, you would need to modify the Carrier Iscript, not the Khydarian crystals.
You-->:twak:<--Me
Good point...now, if I inserted the Carrier's .grp in my .mpq and renamed it to act as the Khaydarin Crystal, do you think the Crystal's own script would work? Because I'd like to preserve the original Carrier as well.
King_Templar
08-11-2004, 9:03 PM
Actually, if you give an attack animation to the carrier, it won't change anything to they way it works, since it doesn't use it by default. but yes, you could hunt down and replace the graphic for the Khydarin Crystal. (If you want proof of that carrier thing, then goto my website, www.freewebs.com/king-templar/index.htm, and goto the lost fleet page and download The Lost Fleet. I have that sort of set up with one regular carrier and one that attacks. They use the same iscript.)
Really? Excellent...time to go back and scrap about half of that...thanks.
By the way, any idea on how I could use attkprojangle to cause multiple shots in different directions simultaneously? So far all I've got is them firing off in order after cooldown.
King_Templar
08-11-2004, 9:14 PM
As i learned from BST and others (such as SD), it is inpossible to make an attack that attacks to all sides of a unit at once. Also, apparently, attackprojangle doesn't work that way. It attacks from a unit to the...err, gives the lurker spines damage effect to an attack, from the unit to the end of the length designated (16 for every 1 in Arsenal III range, so 32 for every actual range).
I think i've got that right.
Damn. I was hoping for kind of an arc spread. Oh well.
BTW, the Gantrithor likes to crash as much as the Khaydarin Crystal did. The only difference I've seen is that I can hear the power-up sound before the game crashes. Any suggestions?
King_Templar
08-12-2004, 11:11 AM
if you switched units to the gantrithor, then you need to give it weapons, etc. If it is ok with you, i would like to look at it (the mod) since that would help me to better understand what is going on.
Absolutely. I'm just going to see if I can submit it to SC.org; if not, please PM me your e-mail address (one that can take 1.5MB files.)
King_Templar
08-12-2004, 1:17 PM
Ok, but what is the mod called?
ChronZerg
08-12-2004, 2:10 PM
dude, did you change the units.dat files so it will have an attack like that...
The upload failed; I'm going to have to send it via email.
ChronoZerg: I used units.dat and weapons.dat to create and enable the weapon. I'm attempting to modify the iscript so that it will fire to my liking.
StealthyDeath
08-13-2004, 7:15 AM
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 959 KhalisCrystal (neutral\Khalis.grp)
# 958 UrajCrystal (neutral\Uraj.grp)
# 396 KhadarinCrystal (neutral\KhChunk.grp)
.headerstart
IsId 219
Type 21
Init KhadarinCrystalInit
Death KhadarinCrystalDeath
GndAttkInit KhadarinCrystalGndAttkInit
AirAttkInit [NONE]
SpAbility1 [NONE]
GndAttkRpt KhadarinCrystalGndAttkInit
AirAttkRpt [NONE]
SpAbility2 [NONE]
GndAttkToIdle KhadarinCrystalGndAttkToIdle
AirAttkToIdle [NONE]
SpAbility3 [NONE]
Walking KhadarinCrystalWalking
Other KhadarinCrystalOther
BurrowInit [NONE]
ConstrctHarvst [NONE]
IsWorking [NONE]
Landing [NONE]
LiftOff [NONE]
Unknown18 [NONE]
Unknown19 [NONE]
Unknown20 [NONE]
Unknown21 KhadarinCrystalUnknown21
.headerend
# ----------------------------------------------------------------------------- #
KhadarinCrystalInit:
__3d 10752
playfram 0x00 # frame set 0
goto KhadarinCrystalOther
KhadarinCrystalGndAttkInit:
imgol0a 543 # Unknown543 (thingy\eycBlast.grp)
imgol0a 543 # Unknown543 (thingy\eycBlast.grp)
goto local00
local00:
wait 1
attack25 1
gotorepeatattk
goto KhadarinCrystalGndAttkToIdle
KhadarinCrystalOther:
shvertpos 1
waitrand 8 10
shvertpos 2
waitrand 8 10
shvertpos 1
waitrand 8 10
shvertpos 0
waitrand 8 10
goto KhadarinCrystalOther
KhadarinCrystalDeath:
shvertpos 1
wait 2
shvertpos 1
wait 2
shvertpos 1
wait 1
shvertpos 1
playsndbtwn 595 596 # Protoss\Carrier\PCaDth00.WAV, Protoss\Carrier\PCaDth01.WAV
imgol08 214 0 0 # ProtossBuildingExplosionMedium (thingy\tBangL.grp)
wait 3
end
KhadarinCrystalGndAttkToIdle:
wait 125
goto KhadarinCrystalGndAttkToIdle
KhadarinCrystalWalking:
imgol08 114 0 0 # CarrierGlow (thingy\pcaGlow.grp)
goto local02
local02:
wait 125
goto local02
KhadarinCrystalUnknown21:
imgol08 115 0 0 # Unknown115 (protoss\carrier.grp)
goto local02
The script does have some slight flaw in it. The bold part is not needed as the unit has already be destroyed. You should also add a wait between each imgol0a 543 # Unknown543 (thingy\eycBlast.grp)
Also as I mentioned eariler you need to edit the images.dat too. Use Arsenal Zero to do it since Arsenal III corrupts the file.
In Arsenal Zero under the crystal you should also have GFX, shadow, unknown, and floats set to one. The overlays 2-6 should also be the same as the battlecruisers. The reason why you need them is because using imgol0a requires using LO? files. The LO? file basically points to where the graphic will show up. Since you didn't put a number which points to a LO? the game would crash because it doesn't know where to spawn the powerup animation.
Wow, I actually DID add the waits. Maybe I'm getting better at this...
So you think I should keep using the Khaydarin Crystal with the Carrier's graphics ass opposed to the Gantrithor? OK, I'll give it a try. Thanks again.
Edit: Still not working...I've inserted the Khaydarin Crystal iscript and removed the Carrier one, added the modified images.dat and now it won't even make the powerup noise before the game crashes. Any thoughts?
King_Templar
08-13-2004, 8:31 AM
Well, i think that it would be easier if you went with the gantrithor. Also, check your pms, i gave you my email address. Also, correct that as spelling error. ;)
Anyway, like i said, i'll take a look at it.
I got your message and I sent the file.
I'll go back and retry using the Carrier's images.dat entry instead; hope it works better.
Victory! It works! Now all I have to do is extend the waits and remove the Interceptors.
King_Templar
08-13-2004, 10:00 AM
err, you can't remove that interceptor button thing as far as stats though. At least, i don't think so. (I'm talking about the thing that tells you how many interceptors you have, and what the interceptors' attack is. But you can remove the build interceptors button.)
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.