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.
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.
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.
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.
You don't remember correctly. It also jumps to the appropriate AttkRpt animation once the cooldown has been met.
None.
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.
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.
Whereso? Name of the mod, description, anything?
None.
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.
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.
* 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.
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.
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.
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.
thx, lock it please admin, this thread has served its purpose.
None.