Talk:Adding a Weapon into C4

From C4 Engine Wiki

Jump to: navigation, search

The part where this article refers to:

plasmaGunClonable(kEntityPlasmaGun, "PlasmaGun", true)

is now obsolete in build 125.

I'm not sure, but it appears that the matching line is now:

plasmaGunEntityReg(kEntityPlasmaGun, "PlasmaGun", kEntityPrecache, kControllerCollectable),

Is this correct?

Huidafa 06:30, 9 July 2006 (PDT)

Yes, that is correct.

Man, this article is long. I think we can chop some stuff out, like the new particle system for the bullet explosion. Agree?

Eric Lengyel 06:48, 9 July 2006 (PDT)

I agree the article is long, but I appreciate seeing how to customize so much.

By the way, I noticed that this section is also out of date:

Find plasmaGunRegistration(kEntityPlasmaGun, stringTable.GetString(StringID('POSI', 'PGUN'))),

so now I'm confused about how to proceed. Huidafa 06:50, 9 July 2006 (PDT)

Contents

More questions

This line also appears incorrect:

PositionMarker::RegisterPosition(&machineGunRegistration);

The other weapons don't register a position marker. Did they previously do so? Thanks. Huidafa 16:15, 9 July 2006 (PDT)

No luck so far

I tried a second time to go through this tutorial, but the new weapon, as well as all of the previous weapons, appears with "missing" for the controller in the Get Info dialog. Huidafa 00:33, 10 July 2006 (PDT)

Bug report filed

So it turns out that there is a bug that is preventing this tutorial from working, even if it is updated for build 125. I filed a bug report over in the forums. Huidafa 01:18, 10 July 2006 (PDT)

Tutorial updated for build 125

I updated this tutorial to work correctly with build 125. I removed the compatibility note. Huidafa 21:57, 10 July 2006 (PDT)

Tutorial updated for build 128

I updated this tutorial to work correctly with build 128. Huidafa 05:42, 10 October 2006 (PDT)

Tutorial updated for build 136

Tutorial updated to work with build 136. Frank Skilton 11 June 2007

There are a few small problems with the sample weapon model included with this tutorial:

  1. Open Edges.
  2. Recently Eric added in some code to make the projectile fire from the muzzle of the weapon. This requires a locator marker be placed in the scene, without it the engine will crash.

I've yet to rectify these problems.

Once build 138 comes out I'll update this tutorial again.

Direction of bullet is flawed in build 145

I've updated the wiki for build 145 but the weapon only fires in the (0,1,0) direction

Personal tools