How to create weapons

A Tutorial for Starcraft

Attention Gamer! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending omgfire points.
  • Post: Give omgfire your thoughts on this Tutorial.
  • Vote: Help omgfire win the Monthly Awards.
  • Rate: Give this Tutorial a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Tutorial.
  • Watch: Get notified when this Tutorial is updated.
Mascot

Join the community!

Sign up

Already a Bananite? Login

While playing some of the mods on this site, you might have seen people create weapons that bounce just like the Mutalisk's weapon. How do you do this? There are two parts to it. 1. In Arsenal III, change the missile type and behaviour to bouncing. This step is very, very easy, and if you have no idea how to do this, you really need to do some more modding with Arsenal III before attempting to create an effect of this level. 2. You need to fix the iscript of the weapon's flingy/sprite/image so that it is capable of bouncing. I'll explain this in more detail below. Whenever I turn a weapon into a bouncing weapon, I always use IceCC. You can use ICE if you choose, but this tutorial is written for an IceCC scripter, so if you choose to use ICE, you will need to adapt the concepts yourself. If you look at the glave wurm iscript, and then you look at iscripts for other weapons, you'll notice the main difference is that the glave wurm has an animation called BurrowInit, while the others don't. I'm sure you can guess that BurrowInit is the animation that is called whenever the weapon bounces. So, when editing the iscript to turn a non-bouncing weapon into a bouncing weapon, the goal is to create some code that to be run on the BurrowInit animation. Now, the first difficulty in most cases is that most weapon iscript headers don't have a BurrowInit animation. To illustrate this, take a look at the iscript header for the glave wurm: .headerstart IsId 264 Type 13 Init Unknown511Init Death Unknown511Death GndAttkInit Unknown511GndAttkInit AirAttkInit [NONE] SpAbility1 [NONE] GndAttkRpt [NONE] AirAttkRpt [NONE] SpAbility2 [NONE] GndAttkToIdle [NONE] AirAttkToIdle [NONE] SpAbility3 [NONE] Walking [NONE] Other [NONE] BurrowInit Unknown511BurrowInit .headerend Notice how it has a BurrowInit animation right at the bottom? Let's compare that to the script of the Vulture's Fragmentation Grenade: .headerstart IsId 242 Type 2 Init Unknown532Init Death Unknown532Death GndAttkInit Unknown532GndAttkInit AirAttkInit [NONE] .headerend It has no BurrowInit animation like the Glave Wurm does, and because of that, this flingy cannot bounce. We can change that, but first we need to do is add BurrowInit to the iscript header of the Fragmentation Grenade. This is done by remaking the header so that it looks just like the Glave Wurm one, except using the offsets that are relevant to the Fragmentation Grenade. So here it is edited to look like the Glave Wurm header: .headerstart IsId 242 Type 13 Init Unknown532Init Death Unknown532Death GndAttkInit Unknown532GndAttkInit AirAttkInit [NONE] SpAbility1 [NONE] GndAttkRpt [NONE] AirAttkRpt [NONE] SpAbility2 [NONE] GndAttkToIdle [NONE] AirAttkToIdle [NONE] SpAbility3 [NONE] Walking [NONE] Other [NONE] BurrowInit BounceCode .headerend There are a few things to notice here. First, the type up the top was changed to 13, which is the same as for the Glave Wurm. The type sets which animations are in the iscript header. Type 13 happens to have Init, Death, GndAttkInit, and everything else up to BurrowInit. To make this work, first you have to copy the extra animations from the Glave Wurm's type 13 header so that all of the required animations for type 13 are present in your weapon's iscript. Just use [NONE] for all the new animations you have to add. Second, the BurrowInit block name was changed to BounceCode and this indicates we're going to make a new block label titled BounceCode. So now to write the BounceCode block. This is what the Glave Wurm has in its Unknown511BurrowInit block, which does what our BounceCode block for the Fragmentation Grenade will need to do. Unknown511BurrowInit: playsndbtwn 91 92 # Bullet\ZQuHit00.wav, Bullet\ZQuHit01.wav sprol0f 365 0 0 # Unknown512 (thingy\SporeHit.grp) domissiledmg goto Unknown511GndAttkInit So now, knowing how the Glave Wurm's bouncing BurrowInit block is coded, you can now code your own BounceCode block in the same way. Like with anything in iscript, you can write whatever commands you want for your BounceCode block, but if you just want to write something that makes a weapon bounce normally, what you need to do to have the last two lines of your BounceCode block very similar to the Glave Wurm's. That is, you need to include a domissiledmg line to apply damage on bouncing, and you also need to jump back to the main loop of the iscript. So, if I were to write a simple Fragmentation Grenade BounceCode block, this is what it would look like: BounceCode: domissiledmg goto Unknown532GndAttkInit You might want to add "play sound" commands to make your bouncing sound nicer, but that's your choice. So now that you have added your bouncing animation and set your values in Arsenal III, you now have a bouncing weapon. It's really quite simple, all you really did was copy the Glave Wurm and adapt it to the new weapon. If in the future if you find an effect you would really like to do, try investigating how it is already done by Blizzard, or by one of your favourite modders. You might be surprised to find that you have all the tools you need to learn how to do anything you see in modding.

Posts

None found

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Key Authors
BSTRhino
Unknown

Submitter

omgfire avatar
omgfire Offline
Member Joined 10y
753 points Ranked 6058th
7 medals 1 rare
  • 6 years a member Medal icon
  • Became a Club Leader Medal icon
  • One month a member Medal icon
  • 6 months a member Medal icon
  • 1 year a member Medal icon
  • 2 years a member Medal icon

omgfire
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Category

Details

Difficulty Level
Advanced Difficulty

Attributes

Stats

Posts
1
Views
2,547
Date Added
9y
Date Modified
6y

Scores

88 bScore
9.8 Rating

1 voter

Sign up to access this!

More from Submitter

bcp.crwdcntrl.net tracking pixel