Staredit Network > Forums > Modding Assistance > Topic: Wraith semi-ignoring Iscript?
Wraith semi-ignoring Iscript?
Apr 28 2014, 7:50 pm
By: Pandut  

Apr 28 2014, 7:50 pm Pandut Post #1

I'm just a fish

Not sure how else to describe the problem. But in a gist, I've made an alternate frameset for the Wraith, one that includes an attack overlay for it's Laser. However, upon changing the Iscript to display the attack frameset in-game, the Wraith seems to ignore it.

Code
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 243 Wraith (terran\phoenix.grp)
.headerstart
IsId               82
Type               12
Init               WraithInit
Death             WraithDeath
GndAttkInit       WraithGndAttkInit
AirAttkInit       WraithAirAttkInit
Unused1           [NONE]
GndAttkRpt         WraithGndAttkInit
AirAttkRpt         WraithAirAttkInit
CastSpell         [NONE]
GndAttkToIdle     WraithGndAttkToIdle
AirAttkToIdle     WraithGndAttkToIdle
Unused2           [NONE]
Walking           WraithWalking
WalkingToIdle     WraithWalkingToIdle
SpecialState1     [NONE]
.headerend
# ----------------------------------------------------------------------------- #

WraithInit:
    imgul                 244 0 42     # Wraith Shadow (terran\phoenix.grp)
WraithGndAttkToIdle:
    playfram               0x00     # Frame set 0
    goto                   WraithWalkingToIdle

WraithWalkingToIdle:
    setvertpos             1
    waitrand               8 10
    setvertpos             2
    waitrand               8 10
    setvertpos             1
    waitrand               8 10
    setvertpos             0
    waitrand               8 10
    goto                   WraithGndAttkToIdle

WraithDeath:
    playsnd               257     # Terran\PHOENIX\TPhDth00.WAV
    imgol                 332 0 0     # Explosion2 (Small) (thingy\tBangS.grp)
    wait                   1
    end

WraithGndAttkInit:
    playfram               0x11     # Frame set 1
    wait                   1
    attackwith             1
    playfram               0x00     # Frame set 0
    wait                   1
    gotorepeatattk
    goto                   WraithLocal00

WraithLocal00:
    wait                   125
    goto                   WraithLocal00

WraithAirAttkInit:
    randcondjmp           124 WraithLocal01
    wait                   1
    attackwith             2
    wait                   1
    gotorepeatattk
    goto                   WraithLocal00

WraithLocal01:
    playfram               0x11     # Frame set 1
    wait                   1
    attackwith             1
    playfram               0x00     # Frame set 0
    wait                   4
    attackwith             2
    wait                   1
    gotorepeatattk
    goto                   WraithLocal00

WraithWalking:
    imgol                 245 0 0     # Wraith Engines (thingy\tphGlow.grp)
    setvertpos             0
    goto                   WraithLocal00

The file pathway is correct in the MPQ, Unit\Terran\Phoenix.grp. I even tested the new GRP out on the scout since the scripts are identical and it worked flawlessly. Just for some reason the Wraith does not want to display the new frames. Maybe I'm just a complete moron but I don't really see any reason why the script shouldn't be working. I thought it was just the GRP file at first but as it worked completely well with the Scout, it seems to be an Iscript issue or something.



None.

Apr 29 2014, 12:11 am Sand Wraith Post #2

she/her

One debug idea: add a playsnd opcode in the Local01 block to see if the block is actually being activated occasionally by the randcondjmp opcode.

One solution idea: go to the ground weapon that the Wraith uses in weapons.dat and make sure the weapon has the "Air" flag checked.




Apr 29 2014, 3:46 am Pandut Post #3

I'm just a fish

Ground weapon has the Air flag checked for the randconjmp attack in the Iscript (Wraith attacking air units with both lasers and rockets).

Debug worked kind of; I had the GndAttk play sound 257 (Wraith death sound) and it played the sound every attack, but not the attack frames lol. This is quite bizarre. I've given the Wraith an attack overlay frame with success before in the past, not sure why it's suddenly decided to stop working.

EDIT: Okay lol. More debugging; I replaced all the "Playfram 0x00 # Frame Set 0" with "Playfram 0x11 # Frame Set 1" which worked in displaying the attacking frames albeit permanently. Then changed only the GndAttkToIdle one back to normal which also worked. The wraith permanently displayed the attack frames when attacking. Though the second I changed it back to this;
Code
WraithGndAttkInit:
   playfram               0x11     # Frame set 1
   wait                   1
   attackwith             1
   playfram               0x00     # Frame set 0
   wait                   1
   gotorepeatattk
   goto                   WraithLocal00

It stopped working again lol. So it could just be the style of the attack coding or some such. Monday Migraine is kicking my ass tonight I can't think.

Post has been edited 1 time(s), last time on Apr 29 2014, 3:58 am by Pandut.



None.

Apr 29 2014, 6:32 pm Sand Wraith Post #4

she/her

Code
WraithGndAttkInit:
  wait 1 # ADDED
  playfram               0x11     # Frame set 1
  wait                   1
  attackwith             1
  playfram               0x00     # Frame set 0
  wait                   1
  gotorepeatattk
  goto                   WraithLocal00


try that.

Also try:

Code
WraithAirAttkInit:
   randcondjmp           124 WraithLocal01
   wait                   1
   attackwith             2
   wait                   1
   gotorepeatattk
   goto                   WraithLocal00

WraithLocal01:
   wait 1 # May not be necessary
   playfram               0x11     # Frame set 1
   playsnd               257     # Terran\PHOENIX\TPhDth00.WAV # debugging
   wait                   1
   attackwith             1
   playfram               0x00     # Frame set 0
   wait                   4
   attackwith             2
   wait                   1
   gotorepeatattk
   goto                   WraithLocal00


This is slightly modified from the original iscript in the OP. I read your post but I can't quite tell if what you tried was in line with what I was thinking, so I decided to explicitly add the modifications myself -- if the above is what you did, and the problem still persists, then I have no idea.




Apr 29 2014, 8:30 pm Pandut Post #5

I'm just a fish

Ah, okay. That did it. Followed both of those. All it needed was a "wait 1" at the start lol. The overlay now properly displays in-game. Always funny when a string of coding giving you so much hassle is fixed with one simple line XD. Thanks again for the help, you're a very helpful fellow :).



None.

Apr 30 2014, 3:22 am Sand Wraith Post #6

she/her

No problem. I suspect I am one of the few remaining experienced modders active, so I try my best. (Even so, I've never done heavy editing for a lot of other things, like dialog boxes and interfaces modifications.)




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
Please log in to shout.


Members Online: Roy