Staredit Network > Forums > Modding Assistance > Topic: Iscript opcode help
Iscript opcode help
Mar 27 2008, 2:16 am
By: coolpotatoes  

Mar 27 2008, 2:16 am coolpotatoes Post #1



trgtrangecondjmp 0x3a - <distance> <labelname> - jumps to a block depending on the distance to the target.
Can anyone explain in more detail how the distance parameter is used. If range is over? or under x units? what unit is used? pixels? same as weapons.dat?
I've been trying out different things and nothing seems to have any effect. I am trying to make the zealot use a range attack if its target is a certain distance away but use its normal melee if the target is closer than that distance. This seemed like the logical opcode for what I'm doing. Any ideas? Thnx for your help.



None.

Mar 27 2008, 2:57 am FlyingHat Post #2



Quote from coolpotatoes
trgtrangecondjmp 0x3a - <distance> <labelname> - jumps to a block depending on the distance to the target.
Can anyone explain in more detail how the distance parameter is used. If range is over? or under x units? what unit is used? pixels? same as weapons.dat?
I've been trying out different things and nothing seems to have any effect. I am trying to make the zealot use a range attack if its target is a certain distance away but use its normal melee if the target is closer than that distance. This seemed like the logical opcode for what I'm doing. Any ideas? Thnx for your help.
The general iscript unit is the pixel. Say you want your zealot to use it's ranged attack when it's 40 pixels away.
I assume you put the ranged attack in the zealot's air attack slot in unit's.dat and also that you can iscript half decently.
example
trgtrangecondjmp     40      ZealotAirAttkInit

"ZealotAirAttkInit" will be a new header in your zealot's iscript. The 40 is how many pixels away the targeted unit is. Simply plop this opcode at the start of your zealot's GndAttkInit animation and properly script "ZealotAirAttkInit" and you'll have a zealot that will release a salvo of whatever at a bunch of marines. Don't forget to include a AirAttkRpt and AirAttkToIdle animation.

Post has been edited 1 time(s), last time on Mar 27 2008, 3:03 am by FlyingHat.



None.

Apr 1 2008, 1:19 am modmaster50 Post #3



Well, FlyingHat, wouldnt that just fire the ranged attack whenever the zealot is 40 or less pixels from the target? For me, thats what the opcode does (Lol it would be hard to have a unit exactly 40 pixels away. Plus, 40 pixels is rather short ranged :bleh: ).

potatoes, I suggest making the zealot use the ranged attack by default and only use the melee attack if the target is close (lets say, 16 pixels). I used this in my mod. If it werent for the SMC, I would show the script to you.



None.

Apr 1 2008, 1:58 am FlyingHat Post #4



Quote from modmaster50
Well, FlyingHat, wouldnt that just fire the ranged attack whenever the zealot is 40 or less pixels from the target? For me, thats what the opcode does (Lol it would be hard to have a unit exactly 40 pixels away. Plus, 40 pixels is rather short ranged :bleh: ).
You're saying the zealot is using it's ranged attack at 40 pixels or less.... THAT MEANS IT'S WORKING PERFECTLY.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6: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?
Please log in to shout.


Members Online: zzt, jun3hong