Staredit Network > Forums > Modding Assistance > Topic: Attacking Building?
Attacking Building?
May 27 2013, 6:21 am
By: NickClegg  

May 27 2013, 6:21 am NickClegg Post #1



So! It's summer and I felt like going back to make an attack ion cannon. Sadly, it doesn't work...

Quote
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: Mon May 27 00:24:17 2013
# ----------------------------------------------------------------------------- #

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 292 IonCannon (neutral\ion.grp)
.headerstart
IsId 116
Type 20
Init IonCannonInit
Death IonCannonDeath
GndAttkInit IonCannonGndAttkInit
AirAttkInit IonCannonGndAttkInit
Unused1 [NONE]
GndAttkRpt IonCannonGndAttkInit
AirAttkRpt IonCannonGndAttkInit
CastSpell [NONE]
GndAttkToIdle IonCannonInit
AirAttkToIdle IonCannonInit
Unused2 [NONE]
Walking [NONE]
WalkingToIdle [NONE]
SpecialState1 [NONE]
SpecialState2 [NONE]
AlmostBuilt IonCannonAlmostBuilt
Built IonCannonBuilt
Landing [NONE]
LiftOff [NONE]
IsWorking [NONE]
WorkingToIdle [NONE]
WarpIn [NONE]
.headerend
# ----------------------------------------------------------------------------- #

IonCannonInit:
playfram 0x00 # frame set 0
wait 1
goto IonCannonInit

IonCannonGndAttkInit:
playfram 0x00 # frame set 2
wait 1
playfram 0x11 # frame set 3
wait 1
playfram 0x00 # frame set 4
wait 1
playfram 0x11 # frame set 5
wait 1
playfram 0x00 # frame set 6
wait 1
playfram 0x11 # frame set 7
wait 1
attackwith 1
gotorepeatattk
goto IonCannonInit


IonCannonDeath:
playsnd 7 # Misc\ExploLrg.wav
imgol 334 0 0 # TerranBuildingExplosionlarge (thingy\tBangX.grp)
wait 3
liftoffcondjmp IonCannonLocal00
lowsprul 274 0 0 # TerranBuildingRubblelarge (thingy\RubbleL.grp)
wait 1
end

IonCannonLocal00:
wait 1
end

IonCannonAlmostBuilt:
playfram 119
goto IonCannonAlmostBuilt

IonCannonBuilt:
playfram 0
goto IonCannonInit
Here's the code, and since it's been a year since I touched this, I'm POSITIVE something is missing.



None.

May 28 2013, 9:50 am Sand Wraith Post #2

she/her

what is the problem?

Make sure all your frames exist. Maybe you need to wait 1 frame after your attackwith?

I dunno what could be wrong. I feel like I'm missing the necessary context to help.




May 28 2013, 3:52 pm O)FaRTy1billion[MM] Post #3

👻 👾 👽 💪

Based on the AlmostBuilt section, it looks like you need at least 119 frames in your GRP ...



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

May 29 2013, 12:38 am NickClegg Post #4



Quote from Sand Wraith
what is the problem?

Make sure all your frames exist. Maybe you need to wait 1 frame after your attackwith?

I dunno what could be wrong. I feel like I'm missing the necessary context to help.

It wouldn't move and turn, it wouldn't attack. it just sits there. I also went into the datedit and made the adjustments, but no bueno :(

Quote from O)FaRTy1billion[MM]
Based on the AlmostBuilt section, it looks like you need at least 119 frames in your GRP ...
I have that. It's exactly 119. the first 118 are moving and attacking animation. the 119th is the half-constructed one.



None.

May 29 2013, 3:30 am Sand Wraith Post #5

she/her

Check AI Actions in units.dat and that the graphic can turn (probably in images.dat).

Also consider making sure, in images.dat, that the image uses the correct iscript ID.




May 29 2013, 4:40 am NickClegg Post #6



Quote from Sand Wraith
Check AI Actions in units.dat and that the graphic can turn (probably in images.dat).

Also consider making sure, in images.dat, that the image uses the correct iscript ID.
all of that has been taken cared of. still no bueno. Should I upload a mod of it as an example?



None.

May 30 2013, 10:45 am JimRaynor187 Post #7



I have succeed this in my mod, you can check the Ion Cannon out in my mod, download it here: http://www.staredit.net/topic/15935/

Buildings can't attack without turrets, like Missile Turret, you also can see in my mod too

Good luck!



None.

May 30 2013, 7:04 pm NickClegg Post #8



Quote from JimRaynor187
I have succeed this in my mod, you can check the Ion Cannon out in my mod, download it here: http://www.staredit.net/topic/15935/

Buildings can't attack without turrets, like Missile Turret, you also can see in my mod too

Good luck!
Ick! Like tanks and goliaths?! I'll work on that. I got the mod, and I have to say very nice on the graphics and all. Loved the Thor. Although... I tried building the Ion Cannon/Arbiter Tribunal and nothing warped :/



None.

May 30 2013, 11:40 pm JimRaynor187 Post #9



Place Ion Cannon in any map you want, then try it in the game. It's Ion Cannon with turret overlay on it, and Arbiter Tribunal is the turret, I used "imgol" opcode

Here the codes:
Quote
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 292 Ion Cannon (neutral\ion.grp)
.headerstart
IsId 116
Type 20
Init IonCannonInit
Death IonCannonDeath
GndAttkInit IonCannonGndAttkInit
AirAttkInit IonCannonGndAttkInit
Unused1 [NONE]
GndAttkRpt IonCannonGndAttkInit
AirAttkRpt IonCannonGndAttkInit
CastSpell [NONE]
GndAttkToIdle IonCannonGndAttkInit
AirAttkToIdle IonCannonGndAttkInit
Unused2 [NONE]
Walking [NONE]
WalkingToIdle [NONE]
SpecialState1 [NONE]
SpecialState2 [NONE]
AlmostBuilt IonCannonAlmostBuilt
Built IonCannonBuilt
Landing [NONE]
LiftOff [NONE]
IsWorking IonCannonGndAttkInit
WorkingToIdle IonCannonWorkingToIdle
WarpIn [NONE]
.headerend
# ----------------------------------------------------------------------------- #

IonCannonInit:
playfram 0x00 # Frame set 0
goto IonCannonGndAttkInit

IonCannonGndAttkInit:
wait 125
goto IonCannonGndAttkInit

IonCannonDeath:
playsnd 7 # Misc\ExploLrg.wav
imgol 334 0 0 # Building Explosion (Large) (thingy\tBangX.grp)
wait 3
liftoffcondjmp IonCannonLocal00
lowsprul 273 0 0 # Terran Building Rubble (Small) (thingy\RubbleS.grp)
wait 1
end

IonCannonLocal00:
wait 1
end

IonCannonAlmostBuilt:
playfram 1 # Frame set 0, direction 1
goto IonCannonGndAttkInit

IonCannonBuilt:
imgol 186 0 0 # Arbiter Tribunal (protoss\prism.grp)
IonCannonWorkingToIdle:
playfram 2 # Frame set 0, direction 2
goto IonCannonGndAttkInit

and
Quote
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 186 Arbiter Tribunal (protoss\prism.grp)
.headerstart
IsId 180
Type 27
Init ArbiterTribunalInit
Death ArbiterTribunalDeath
GndAttkInit ArbiterTribunalGndAttkInit
AirAttkInit ArbiterTribunalGndAttkInit
Unused1 [NONE]
GndAttkRpt ArbiterTribunalGndAttkInit
AirAttkRpt ArbiterTribunalGndAttkInit
CastSpell [NONE]
GndAttkToIdle ArbiterTribunalGndAttkToIdle
AirAttkToIdle ArbiterTribunalGndAttkToIdle
Unused2 [NONE]
Walking [NONE]
WalkingToIdle [NONE]
SpecialState1 [NONE]
SpecialState2 [NONE]
AlmostBuilt ArbiterTribunalAlmostBuilt
Built ArbiterTribunalBuilt
Landing [NONE]
LiftOff [NONE]
IsWorking ArbiterTribunalBuilt
WorkingToIdle ArbiterTribunalBuilt
WarpIn [NONE]
Unused3 [NONE]
StarEditInit [NONE]
Disable ArbiterTribunalAlmostBuilt
Burrow [NONE]
UnBurrow [NONE]
Enable [NONE]
.headerend
# ----------------------------------------------------------------------------- #

ArbiterTribunalInit:
playfram 0x00 # Frame set 0
ArbiterTribunalBuilt:
wait 1
goto ArbiterTribunalBuilt

ArbiterTribunalDeath:
wait 1
end

ArbiterTribunalGndAttkInit:
wait 1
attack
gotorepeatattk
sigorder 1
wait 13
ignorerest
ArbiterTribunalGndAttkToIdle:
goto ArbiterTribunalBuilt

ArbiterTribunalAlmostBuilt:
wait 125
goto ArbiterTribunalAlmostBuilt

If you need anything more, ask here :clap: :cheers:



None.

May 31 2013, 2:36 am ShadowFlare Post #10



Quote from NickClegg
Quote from O)FaRTy1billion[MM]
Based on the AlmostBuilt section, it looks like you need at least 119 frames in your GRP ...
I have that. It's exactly 119. the first 118 are moving and attacking animation. the 119th is the half-constructed one.
Just so you know, frame #119 is actually the 120th frame in the file, since it starts at 0 when referencing the frames. Rather than that it has 119 frames, if you really mean that the last frame of your grp is actually numbered 119, then that is fine.

Quote from JimRaynor187
Buildings can't attack without turrets, like Missile Turret, you also can see in my mod too
That is false in two ways:

1) Buildings do not need turrets to attack. NickClegg's issue is likely that either the flingy entry for the building graphic has turning disabled - I don't recall which value, but a certain turning speed disables turning completely (images.dat turning is only for if you want graphics for it to look like it is turning and has nothing to do with whether the unit is able to change direction to fire or move at a different angle) or the firing angle for the weapon is set too low (if it is high enough, the building doesn't even need to change direction to fire at any angle). Changing either of these to an appropriate value will allow it to fire at things on any side of the building. I'm guessing that right now your building can only fire at things about directly north of it.

2) Technically the missile turret does not have a turret. An image overlay does not count as a turret, if you mean like the siege tank/goliath. Those and the hero versions are the only units that technically have a turret in the default data. And don't argue that those use an image overlay command in the iscript as well, as that is in the special StarEdit-only animation, which StarCraft does not use ever.



None.

May 31 2013, 6:27 am JimRaynor187 Post #11



Quote from ShadowFlare
Quote from NickClegg
Quote from O)FaRTy1billion[MM]
Based on the AlmostBuilt section, it looks like you need at least 119 frames in your GRP ...
I have that. It's exactly 119. the first 118 are moving and attacking animation. the 119th is the half-constructed one.
Just so you know, frame #119 is actually the 120th frame in the file, since it starts at 0 when referencing the frames. Rather than that it has 119 frames, if you really mean that the last frame of your grp is actually numbered 119, then that is fine.

Quote from JimRaynor187
Buildings can't attack without turrets, like Missile Turret, you also can see in my mod too
That is false in two ways:

1) Buildings do not need turrets to attack. NickClegg's issue is likely that either the flingy entry for the building graphic has turning disabled - I don't recall which value, but a certain turning speed disables turning completely (images.dat turning is only for if you want graphics for it to look like it is turning and has nothing to do with whether the unit is able to change direction to fire or move at a different angle) or the firing angle for the weapon is set too low (if it is high enough, the building doesn't even need to change direction to fire at any angle). Changing either of these to an appropriate value will allow it to fire at things on any side of the building. I'm guessing that right now your building can only fire at things about directly north of it.

2) Technically the missile turret does not have a turret. An image overlay does not count as a turret, if you mean like the siege tank/goliath. Those and the hero versions are the only units that technically have a turret in the default data. And don't argue that those use an image overlay command in the iscript as well, as that is in the special StarEdit-only animation, which StarCraft does not use ever.

I didn't mean like Siege Tank and Goliath, I thought it's like Missile Turret, the overlay turns and attacks but actually the base attacks, I thought attacking buildings always need turret overlay



None.

May 31 2013, 8:17 pm ShadowFlare Post #12



Technically the base turns as well (the internal direction that Starcraft says it is facing), just that the image isn't set to have different graphics for facing other directions. This gives the illusion of the overlay being an independent turret. Also, image overlays are allowed to have any iscript animations that the base image is allowed to have, including opcodes for attacking. In fact, I think it is allowed to end the base image even before the unit dies if there is an active overlay that has the required animations. I suppose this could be used to trigger some kind of change in the appearance and iscript behavior of a unit when some condition occurs by spawning a new image overlay and afterward using the end command in the original image's iscript.



None.

Jun 3 2013, 4:05 am NickClegg Post #13



Hey everyone, I got it to work after using another building as a turret. It didn't at first but the turn speed of the ion cannon as base was the thing that held it up. I think I'll go back and deal with it, but as for the time being, thanks for all the input so far :)



None.

Jun 5 2013, 6:56 am JimRaynor187 Post #14



Quote from NickClegg
Hey everyone, I got it to work after using another building as a turret. It didn't at first but the turn speed of the ion cannon as base was the thing that held it up. I think I'll go back and deal with it, but as for the time being, thanks for all the input so far :)

Glad to hear that :D good luck with your mod :rolleyes:



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- there are some real members mixed in those latter pages, but the *vast* majority are spam accounts
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- there are almost 3k pages
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- the real members stop around page 250
[2024-4-14. : 9:20 pm]
O)FaRTy1billion[MM] -- look at the members list
[2024-4-12. : 12:52 pm]
Oh_Man -- da real donwano
da real donwano shouted: This is the first time I've seen spam bots like this on SEN. But then again, for the last 15 years I haven't been very active.
it's pretty common
[2024-4-11. : 9:53 pm]
da real donwano -- This is the first time I've seen spam bots like this on SEN. But then again, for the last 15 years I haven't been very active.
[2024-4-11. : 4:18 pm]
IlyaSnopchenko -- still better than "Pakistani hookers in Sharjah" that I've seen advertised in another forum
[2024-4-11. : 4:07 pm]
Ultraviolet -- These guys are hella persistent
[2024-4-11. : 3:29 pm]
Vrael -- You know, the outdoors is overrated. Got any indoor gym and fitness equipment?
[2024-4-10. : 8:11 am]
Sylph-Of-Space -- Hello!
Please log in to shout.


Members Online: Roy, Oh_Man