Staredit Network

Staredit Network -> Modding Assistance -> How Do You Add A Weapon Icon Through Iscripts?
Report, edit, etc...Posted by Darktossgen(MM) on 2006-01-14 at 18:37:23
I have seen BSTRhino do this, take the marines. they have 2 weapons merged into one icon. but he has a third icon that represents the Random Grenade. My question is, how did he do that? I am making the photon cannon have a trgtrangecondjump and I want to add an icon. Please help smile.gif
Report, edit, etc...Posted by petphot on 2006-01-14 at 20:21:00
umm if u want a random attack then i would use __1e_condjmp <1-250 randomizer value> <local##>

BSTRhino and Holocaust explained to me here

im guessing he equipped the marie with the grenade to get the icon... but never got the marine to use it direcly...
Report, edit, etc...Posted by Darktossgen(MM) on 2006-01-15 at 09:48:36
I never said I Wanted a random attack, I said I wanted the icon because my cannon uses Edmund Dukes attack at close range, and I want to show them that so they are not like '' This cannon is same, lets move on. '' Got that? but thanks for your help, petphot.
Report, edit, etc...Posted by DiscipleOfAdun on 2006-01-15 at 11:10:53
He actually has the answer in his post.

QUOTE(petphot @ Jan 14 2006, 07:21 PM)

im guessing he equipped the marie with the grenade to get the icon... but never got the marine to use it direcly...

[right][snapback]405897[/snapback][/right]

Weapon icons will show up in the display bar if they are set to either the ground or air weapon in units.dat. Also, some weapons, like spider mines and interceptors and scarabs, show up when a unit has at least 1 of them. Even though a unit has it as the air weapon, you can iscript it to not attack with that weapon.
Report, edit, etc...Posted by Darktossgen(MM) on 2006-01-15 at 11:30:17
QUOTE(DiscipleOfAdun @ Jan 15 2006, 12:10 PM)
He actually has the answer in his post.
Weapon icons will show up in the display bar if they are set to either the ground or air weapon in units.dat.  Also, some weapons, like spider mines and interceptors and scarabs, show up when a unit has at least 1 of them.  Even though a unit has it as the air weapon, you can iscript it to not attack with that weapon.

[right][snapback]406454[/snapback][/right]


So how do I iscript it to do that?
Make the air attack lead to ground attack init?
Report, edit, etc...Posted by Voyager7456(MM) on 2006-01-15 at 11:32:11
You could script its air attack to use it's ground weapon by way of attack25. Or that would work.
Report, edit, etc...Posted by Darktossgen(MM) on 2006-01-15 at 11:35:33
Just 1 problem. I'm gonna test this, but it seems that its already looped into the ground attack. interesting...
Report, edit, etc...Posted by DiscipleOfAdun on 2006-01-15 at 11:42:27
Don't let the air attack scripts have a script. Then, the ground script should have the jumps based on range and use the attack25 to choose the weapon. If you were useing the useweapon command, that is why the icon didn't show up.
Report, edit, etc...Posted by Darktossgen(MM) on 2006-01-15 at 11:48:01
QUOTE(DiscipleOfAdun @ Jan 15 2006, 12:42 PM)
Don't let the air attack scripts have a script.  Then, the ground script should have the jumps based on range and use the attack25 to choose the weapon.  If you were useing the useweapon command, that is why the icon didn't show up.
[right][snapback]406492[/snapback][/right]

I cant quite understand. If Im correct, your trying to remove the air attack script? that would cause the air attack to crash... I'm confused by this. mad.gif And I was using that.. I'll post my Photon Cannon script up:
CODE
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 183 PhotonCannon (protoss\photon.grp)
.headerstart
IsId            179
Type            27
Init            PhotonCannonInit2
Death           PhotonCannonDeath2
GndAttkInit     PhotonCannonGndAttkInit2
AirAttkInit     PhotonCannonGndAttkInit2
SpAbility1      [NONE]
GndAttkRpt      PhotonCannonGndAttkRpt
AirAttkRpt      PhotonCannonGndAttkRpt
SpAbility2      [NONE]
GndAttkToIdle   PhotonCannonGndAttkToIdle
AirAttkToIdle   PhotonCannonGndAttkToIdle
SpAbility3      [NONE]
Walking         PhotonCannonLanding
Other           [NONE]
BurrowInit      [NONE]
ConstrctHarvst  [NONE]
IsWorking       [NONE]
Landing         PhotonCannonLanding
LiftOff         [NONE]
Unknown18       [NONE]
Unknown19       PhotonCannonLanding
Unknown20       PhotonCannonLanding
Unknown21       PhotonCannonUnknown21
Unknown22       PhotonCannonUnknown22
Unknown23       PhotonCannonUnknown23
Unknown24       PhotonCannonLanding
Burrow          [NONE]
UnBurrow        [NONE]
Unknown27       PhotonCannonLanding
.headerend
# ----------------------------------------------------------------------------- #

PhotonCannonInit2:
imgul09         184 0 0 # PhotonCannonShad (protoss\ppbShad.grp)
local235:
playfram        0
goto            PhotonCannonLanding

PhotonCannonLanding:
wait            125
goto            PhotonCannonLanding

PhotonCannonDeath2:
playsnd         7 # Misc\ExploLrg.wav
imgol08         215 0 0 # ProtossBuildingExplosionLarge (thingy\tBangX.grp)
wait            3
sprul11         223 0 0 # ProtossBuildingRubbleSmall (thingy\PRubbleS.grp)
wait            1
end            

PhotonCannonGndAttkInit2:
     trgtrangecondjmp  40      PhotonCannonUnknown23
playfram        2
wait            2
playfram        1
wait            2
playfram        3
wait            2
PhotonCannonGndAttkRpt:
wait            1
attack26        
     __1e_condjmp      150       PhotonCannonUnknown22
gotorepeatattk  
ignorerest      
PhotonCannonGndAttkToIdle:
playfram        1
wait            2
playfram        2
wait            2
goto            local235

PhotonCannonUnknown21:
imgol08         185 0 0 # PhotonCannonWarpFlash (protoss\photon.grp)
goto            PhotonCannonLanding

PhotonCannonUnknown23:
playfram        2
wait            2
playfram        1
wait            2
playfram        3
wait            2
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
     wait              10
     useweapon         28 #ArcliteShockCannon
PhotonCannonUnknown22:
playfram        2
wait            2
playfram        1
wait            2
playfram        3
wait            2
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
     attack26          
     wait              1
gotorepeatattk  
ignorerest      





Darkness Cannon
Report, edit, etc...Posted by DiscipleOfAdun on 2006-01-16 at 00:48:39
Okay, I'm not sure if it will work, but change the attack26's to attack25's, add the air weapon. The flags in weapons.dat will tell it what it can and can't attack. Just because it has the weapon doesn't mean the script has to use it. If you still have the default photon weapon that might attack both air and ground, you might want to rename and allow it to attack both air and ground. Up to you, but that might work. Maybe if I knew more, I could be more specific, but that is what I've got right now.
Report, edit, etc...Posted by Darktossgen(MM) on 2006-01-16 at 12:25:18
Ok, Screw it. I removed The Edmund Duke shot and added a detection blast... but I did get it to show the icon, but it wouldnt attack air XP
Now another problem... how do you close topics?!?!?!?!
Next Page (1)