Staredit Network > Forums > Modding Assistance > Topic: I know I should gather my questions up but...
I know I should gather my questions up but...
This topic is locked. You can no longer write replies here.
Jun 24 2009, 7:47 pm
By: Angle Lock  

Jun 24 2009, 7:47 pm Angle Lock Post #1



I want to make the marine as realistic as possible, so I prepared AK-47's fire sound and it's reload sound, but what should I do in iscript to make it after they fire for a while, they stop and reload?



None.

Jun 25 2009, 3:28 am Angle Lock Post #2



I know there is a way to do it, I have seen it done before, but I don't have that mod anymore so I can't dig it out myself...



None.

Jun 25 2009, 3:54 am Hercanic Post #3

STF mod creator, Modcrafters.com admin, CampaignCreations.org staff

A typical attack animation describes one shot, and then is looped for however long the unit attacks. To get a unit to consistently pause every, say, 10 shots, you will need to manually describe those 10 shots to Starcraft, write your reload sequence after, then loop back to those 10 shots. The main downside of this method is Weapon.dat cooldown is no longer a factor for individual shots, rather we have to use Waits in Iscript.bin to simulate the cooldown. Waits are not affected by speed-altering effects like Stim Pack.

If something like Stim Pack is important, then you could try using a random conditional jump. The downside to this is there is a chance that a unit could fire, reload, fire, and reload again, which might seem a little silly if the player notices.




Jun 25 2009, 10:49 pm Lord_Jeremy Post #4



In terms of cooldown, wouldn't it be possible to make creative use of gotorptattk? If I remember correctly, that opcode halts the script until the cooldown period has elapsed.



None.

Jun 25 2009, 11:39 pm Biophysicist Post #5



You don't remember correctly. It also jumps to the appropriate AttkRpt animation once the cooldown has been met.



None.

Jun 26 2009, 12:36 am Angle Lock Post #6



I still think that it is possible to do it other than the way hercanic described it....

I have seen it before

If I do what hercanic said, then it will basically similar to valkyrie's attack and sometimes the famous valkyrie bug just comes up....



None.

Jun 26 2009, 12:49 am EzDay281 Post #7



Quote
If I do what hercanic said, then it will basically similar to valkyrie's attack and sometimes the famous valkyrie bug just comes up....
The Valkyrie fires eight missile sprites which then proceed to spawn trails of more smoke sprites behind them. This would spawn a bunch of hit sprites, which just disappear after a few frames. Hell, Lurkers, Goliaths, and Archons are probably as bad or worse, overall.
In any case, the biggest problem with doing it entirely inside the animation is that the unit will either be forced to stand and fire for X shots, or that a player can manually halt their attack and ignore the reload delay, or else the unit will have to "reload" every time it acquires a new target, is given an order (i.e. via triggers), is stunned (Maelstrom), etc. It'll use the same number of sprites whether they're all in the same animation, or you find a way to make it unable to play the attack animation for Y seconds every X shots.
Quote
I have seen it before
Whereso? Name of the mod, description, anything?



None.

Jun 26 2009, 1:05 am Angle Lock Post #8



I forgot the name of the mod, and actually I have been trying to look for it lately, i found it on starcraft.org years ago but since they closed down I can't find another mod similar to that one...

what it does is for most of the units, after a certain number of shots are fired...(or a certain amount of time is passed) the unit fires a different and more powerful weapon, but you CAN pull the unit away during the attack, and the unit DOES NOT have two weapons in the status box. so if I found that mod, all I have to do is replace that weapon animation with a reload animation.... but I have been on tough luck lately with the search for it...



None.

Jun 26 2009, 1:07 am Angle Lock Post #9



maybe it's that second method hercanic described, but I am not sure, I would like to have some further explanation over that random condition thing...



None.

Jun 26 2009, 2:46 am Angle Lock Post #10



* randcondjmp 0x1e - <randchance#> <labelname> - random jump, chance of performing jump depends on the parameter.

what does a larger randchance# do? what does a smaller randchance# do?

yeah, after thinking through it, I think it is randcondjmp that the mod I mentioned used.



None.

Jun 26 2009, 3:02 am ForTheSwarm Post #11



randchance#/256 is the chance that the block (labelname) will be jumped to.

For example:

randcondjmp 128 bob has a 50% chance (128/256 = .5) of jumping to the block labeled "bob".



None.

Jun 26 2009, 3:27 am Angle Lock Post #12



right, and what does randcondjmp 0 do? NEVER jumps into it? or always jumps into it?


after someone answers this question precisely, this thread can be locked, I have learned everything I need.

Post has been edited 1 time(s), last time on Jun 26 2009, 3:33 am by Angle Lock.



None.

Jun 26 2009, 5:04 am Lord_Jeremy Post #13



randcondjmp 0 should never be followed, but I can't guarantee it actually works that way. Its easier to say that randcondjmp 1 will very very rarely be followed.



None.

Jun 26 2009, 5:17 am Angle Lock Post #14



thx, lock it please admin, this thread has served its purpose.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: jun3hong, NudeRaider, fasop17540