Staredit Network > Forums > Modding Assistance > Topic: How NOT to iscript.
How NOT to iscript.
May 21 2008, 8:54 pm
By: HailFire
Pages: < 1 2 3
 

May 31 2008, 9:14 pm HailFire Post #41



Quote from A_of-s_t
It supposed to go to a wait block:

Code
NexusIsWorking:
playfram 0
wait 3
playfram 2
wait 3
playfram 3
wait 3
playfram 4
wait 3
playfram 3
wait 3
playfram 2
wait 3
goto NexusLocal00


But, yeah, making protoss emulate terran buildings are a pain. Or hell, editting protoss buildings in general.

Where NexusLocal00 = ?



None.

May 31 2008, 9:19 pm A_of-s_t Post #42

aka idmontie

Quote from HailFire
Where NexusLocal00 = ?

Its any wait block. It usually looks like this:

Code
ZOMGIMAWAITBLOCK:
wait    125
goto ZOMGIMAWAITBLOCK




Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

May 31 2008, 9:28 pm HailFire Post #43



Quote from A_of-s_t
Quote from HailFire
Where NexusLocal00 = ?

Its any wait block. It usually looks like this:

Code
ZOMGIMAWAITBLOCK:
wait    125
goto ZOMGIMAWAITBLOCK

I already tried that (Wherein waitblock = NexusWalking)

Here's the current full Nexus iscript:

Code
#

------------------------------------------------------

----------------------- #
# This header is used by images.dat entries:
# 179 Nexus (protoss\nexus.grp)
.headerstart
IsId               177
Type               21
Init               NexusInit
Death               NexusDeath
GndAttkInit         [NONE]
AirAttkInit         [NONE]
Unused1             [NONE]
GndAttkRpt         [NONE]
AirAttkRpt         [NONE]
CastSpell           [NONE]
GndAttkToIdle       [NONE]
AirAttkToIdle       [NONE]
Unused2             [NONE]
Walking             NexusWalking
WalkingToIdle       [NONE]
SpecialState1       [NONE]
SpecialState2       [NONE]
AlmostBuilt         [NONE]
Built               NexusBuilt
Landing             [NONE]
LiftOff             [NONE]
IsWorking           NexusIsWorking
WorkingToIdle       NexusIsWorking
WarpIn             NexusWarpIn
.headerend
#

------------------------------------------------------

----------------------- #

NexusWalking:
    wait         125
    goto         NexusWalking

NexusInit:
    playfram           0
    goto               NexusWalking

NexusIsWorking:
    playfram     0
    wait         3
    playfram     2
    wait         3
    playfram     3
    wait         3
    playfram     4
    wait         3
    playfram     3
    wait         3
    playfram     2
    wait               3
    goto               NexusWalking

NexusDeath:
    playsnd             7     # Misc\ExploLrg.wav
    imgol               215 0 0     #

ProtossBuildingExplosionLarge (thingy\tBangX.grp)
    wait               3
    lowsprul           224 0 0     #

ProtossBuildingRubbleLarge (thingy\PRubbleL.grp)
    wait               1
    end                

NexusBuilt:
    goto               NexusWalking

NexusWarpIn:
    imgol               180 0 0     # NexusWarpFlash
    goto               NexusWalking


EDIT: With the above iscript, the Nexus only plays the working animation once, then stops. (it plays it again when the build order stops/cancels)



None.

May 31 2008, 9:34 pm A_of-s_t Post #44

aka idmontie

Have a longer working animation or a random jump that happens about... 196/256?

EDIT: Nvm, you cant have random jumps or waits with buildings.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

May 31 2008, 9:50 pm HailFire Post #45



It no werky.

I tried making the animation twice as long (via copypasta); it played the animation twice before stopping. :<_<:



None.

May 31 2008, 9:54 pm FlyingHat Post #46



I now see what you're going at. You need to make the nexus emulate the Command Center's work animation.
The command center doesn't use regular playframs to make it seem like it's working, it uses an overlay that uses this script. Added comments and stuff.

Code
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 276 CommandCenterOverlay (terran\controlT.grp)
.headerstart
IsId               103
Type               24
Init               CommandCenterOverlayInit
Death               CommandCenterOverlayDeath
GndAttkInit         [NONE]
AirAttkInit         [NONE]
Unused1             [NONE]
GndAttkRpt         [NONE]
AirAttkRpt         [NONE]
CastSpell           [NONE]
GndAttkToIdle       [NONE]
AirAttkToIdle       [NONE]
Unused2             [NONE]
Walking             CommandCenterOverlayDeath
WalkingToIdle       CommandCenterOverlayDeath
SpecialState1       CommandCenterOverlayDeath
SpecialState2       [NONE]
AlmostBuilt         [NONE]
Built               [NONE]
Landing             CommandCenterOverlayDeath
LiftOff             CommandCenterOverlayDeath
IsWorking           CommandCenterOverlayInit
WorkingToIdle       CommandCenterOverlayDeath
WarpIn             [NONE]
Unused3             [NONE]
StarEditInit       [NONE]
Disable             CommandCenterOverlayDeath
Burrow             [NONE]
.headerend
# ----------------------------------------------------------------------------- #

CommandCenterOverlayInit: #The overlay header
    playfram           0
    tmprmgraphicend    
    wait               4
    tmprmgraphicstart # hides the graphic until tmprmgraphicend is used
    wait               1
    tmprmgraphicend     #reveals the graphic until tmprmgraphicstart is used
    wait               1 #wait one tick
    tmprmgraphicstart    
    wait               1
    tmprmgraphicend    
    wait               3
    tmprmgraphicstart    
    wait               1
    tmprmgraphicend    
    wait               3
    tmprmgraphicstart    
    wait               1
    tmprmgraphicend    
    wait               4
    tmprmgraphicstart    
    wait               1
    tmprmgraphicend    
    wait               1
    tmprmgraphicstart    
    wait               1
    tmprmgraphicend    
    wait               3
    tmprmgraphicstart    
    wait               1
    tmprmgraphicend    
    wait               3
    tmprmgraphicstart    
    wait               1
    tmprmgraphicend    
    wait               4
    tmprmgraphicstart    
    wait               1
    tmprmgraphicend    
    wait               3
    tmprmgraphicstart    
    wait               1
    tmprmgraphicend    
    wait               1
    tmprmgraphicstart    
    wait               1
    tmprmgraphicend    
    wait               1
    tmprmgraphicstart    
    wait               1
    goto               CommandCenterOverlayInit

CommandCenterOverlayDeath:
    wait               1
    end      

It's very simple. Create an overlay entry in images.dat that uses the nexus graphic. Then make the nexus use the overlay in the work script. Then copy the above script's code and use it in the nexus overlay's script.

Edit: I'm a bit late, lolz.

Post has been edited 2 time(s), last time on May 31 2008, 10:06 pm by FlyingHat.



None.

May 31 2008, 9:55 pm A_of-s_t Post #47

aka idmontie

Terran buildings usuall have overlays when they are working. It might have to do with that -- however I've never tried it before.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

May 31 2008, 9:58 pm HailFire Post #48



I'm trying to emulate the Barrack's work animation, which is frame-by-frame.

Also, I'd have to make my own overlay, which would be a hueg pain in the ass.



None.

May 31 2008, 10:08 pm FlyingHat Post #49



Quote from HailFire
Also, I'd have to make my own overlay, which would be a hueg pain in the ass.
Creating a new overlay is very simple, just edit a single images.dat entry and screw up some iscript.



None.

Jun 1 2008, 2:33 am ShadowFlare Post #50



Could it have anything to do with this?

Code
IsWorking           NexusIsWorking
WorkingToIdle       NexusIsWorking


WorkingToIdle is supposed to point to an idle script. You're basically telling it to continue the animation even when it is done with its work. Try changing NexusIsWorking back into a repeating animation and using NexusWalking for WorkingToIdle.

On a related note, does the Nexus normally have the "walking" animation or did you just add that in?



None.

Jun 1 2008, 3:18 am HailFire Post #51



Quote from ShadowFlare
Could it have anything to do with this?

Code
IsWorking           NexusIsWorking
WorkingToIdle       NexusIsWorking


WorkingToIdle is supposed to point to an idle script. You're basically telling it to continue the animation even when it is done with its work. Try changing NexusIsWorking back into a repeating animation and using NexusWalking for WorkingToIdle.

On a related note, does the Nexus normally have the "walking" animation or did you just add that in?

Win'd. It works perfectly now, I'm amazed I overlooked that. :lol:



None.

Jun 1 2008, 3:20 am HailFire Post #52



Quote from HailFire
Quote from ShadowFlare
Could it have anything to do with this?

Code
IsWorking           NexusIsWorking
WorkingToIdle       NexusIsWorking


WorkingToIdle is supposed to point to an idle script. You're basically telling it to continue the animation even when it is done with its work. Try changing NexusIsWorking back into a repeating animation and using NexusWalking for WorkingToIdle.

On a related note, does the Nexus normally have the "walking" animation or did you just add that in?

Win'd. It works perfectly now, I'm amazed I overlooked that. :lol:

Also, the "Walking" is artifical. It's what the CC had, and it's not like the nexus is going anywhere. :P

EDIT: Wow, I managed to hit quote instead of edit.

/fail :-(



None.

Jun 1 2008, 12:17 pm ShadowFlare Post #53



For future reference, you can have a label in the code that is only referenced from the code and not the header. This is where those "Local" labels come from -- because they aren't referenced in the header, the decompiler doesn't know what to call them (but you can call them what you want in your own code). The labels referenced in the header are only for parts of the animation where SC needs to know where they start.



None.

Options
Pages: < 1 2 3
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: Roy, Amendo03