Game Development Community

Weapon file?

by Christopher Gardner · in Torque Game Engine Advanced · 06/26/2009 (8:41 am) · 6 replies

Hello, I recently purchased the Mod maker Weapons pack from the site, and can someone help me with the .cs file that goes with the Desert Eagle model? I tried to make one myself, but it didn't work (Technically it did, I just couldnt see the actual desert eagle on me, I think i got the eye offeset or mount point wrong. I am using the soldier model bought form this site. I pretty much copied the M16 file and edited that.)

EDIT: I didn't use the actual editor at all, just the desert eagle model.

#1
06/26/2009 (9:58 pm)
Haven't actually used the Mod maker Weapons pack myself but if you gave some sort of indication of your changes then someone might be able to help you.

Check the console for possible errors.
Revert you changes, modify, and test until you resolve the problem

Standard procedure when adding new weapons to be used in game is:
  • Create your script file with all needed datablocks. This should include sounds, particles, explosion, projectile, ammo, item, and image.
  • Make sure this script file gets exec'd in game.cs.
  • Add the weapon's Item Name to your allowed inventory in player.cs
  • Have a keybind to "use" your new weapon (see "~/scripts/client/default.binds.cs")
  • Add your new weapon in-game either as a pick-up item or give it to the player when he spawns (game.cs).
  • #2
    06/27/2009 (6:46 am)
    I already have, I am just having trouble getting it on to the model (I can equip it but i can't see the weapon in first person view.
    #3
    06/27/2009 (8:46 am)
    Do you see it in 3rd person view?
    #4
    06/28/2009 (5:56 am)
    No, I can't really because it's a pistol
    #5
    06/28/2009 (11:25 am)
    So long as you've created it correctly and it does mount when you tell it too, you'll just have to keep making further corrections to your eyeOffset field inside your weapon Image datablock in order to see it.
    // Specify mount point
    mountPoint = 0;
    
    //offset for 3rd person
    offset "0 0 0"; // right/left forward/back, up/down
    
    //eye offset for 1st person rendering
    eyeOffset = "0.55 1.1 -0.9"; // right/left forward/backward, up/down
    It really depends on your mountpoint nodes of your weapon and player just how much offset you'll need to give it, and the eyeOffset will move it around it around only in your 1st person FOV. Hopefully those directional comments will be of help.
    #6
    06/28/2009 (2:53 pm)
    Thanks