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.
[06:37 pm]
Zoan -- MTiger156
MTiger156 shouted: I'd try to spell "WOB" with wobs, but that would require 5 uninterrupted lines and probably a ban >_<
do it
[05:11 pm]
MTiger156 -- I'd try to spell "WOB" with wobs, but that would require 5 uninterrupted lines and probably a ban >_<
[02:30 pm]
MTiger156 -- I used that joke already :P
[01:08 am]
Oh_Man -- They see me wobbing... they hating...
[10:45 pm]
RIVE -- Using the Search box is enough to crash the site. Do your worst.
[2019-11-14. : 8:15 pm]
MTiger156 -- I calculate that it is possible to fill a shoutbox page with 1125 wobs. Is that enough GIF power to crash the server?
[2019-11-14. : 8:09 pm]
MTiger156 -- :wob: :wob: :wob: :wob: :wob: :wob: :wob: :wob: :wob: :wob: :wob: :wob: :wob: :wob: :wob:
[2019-11-14. : 7:22 pm]
NudeRaider -- KrayZee
KrayZee shouted: I have discord but I'd rather use the shoutbox since I'm old fashioned that way.
Ultraviolet
Ultraviolet shouted: Discord doesn't feel the same to me, I don't really like it
I agree. But I have no idea why.
[2019-11-14. : 6:55 pm]
Ultraviolet -- :wob:
[2019-11-14. : 6:55 pm]
Ultraviolet -- Discord doesn't feel the same to me, I don't really like it
Please log in to shout.


Members Online: Roy, Generalpie, MTiger156, GGmano