Coding screw up.

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Coding screw up.

Postby Gishank » Sat Mar 25, 06 1:56 pm

Ok, i was making a weapon which shoots vase's for a laugh but it doesn't work the weapon doesn't shoot. The projectile's correct (I think) neways heres the code.

Proj:
Code: Select all
//===================================================================
// ProjVase= Vase Projectile
//===================================================================
class ProjVase expands Shuriken;

defaultproperties
{
    mpDamage=100.00
    spawnWeaponClass=Class'DeusExDeco.WHRedVase'
    ItemName="|p4Throwable |p3Vase"
    speed=100.00
    MaxSpeed=1000.00
    Damage=100.00
    Mesh=LodMesh'DeusExItems.WHRedVase'
}


WeaponThrowableVase:
Code: Select all
//=============================================================================
// Throwable Vase - ProjWHREDVASE!.
//=============================================================================
class WeaponThrowVase expands WeaponShuriken;

defaultproperties
{
    ProjectileClass=Class'BlueKnuckles.ProjVase'
    ItemName="Throwable Vase"
    PlayerViewMesh=LodMesh'DeusExDeco.WHRedVase'
    PickupViewMesh=LodMesh'DeusExDeco.WHRedVase'
    ThirdPersonMesh=LodMesh'DeusExDeco.WHRedVase'
    Icon=Texture'DeusExUI.Icons.BeltIconDragonTooth'
    Description="A throwable Vase.'"
    beltDescription="|p2Throw Vase"
    Mesh=LodMesh'DeusExDeco.WHRedVase'
}


It's proberly somthing obvious which i've missed out.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby Allan » Sat Mar 25, 06 6:17 pm

if a weapon's bHandToHand is true(Like with WeaponShruiken), more often than not the player mesh has to have some kind of animation. Dunno why, just does...(Not certain on this)

Also, the spawnWeaponClass needs to actually be a weapon, it was just a mesh before :P .

Try this code:

Code: Select all
//===================================================================
// ProjVase= Vase Projectile
//===================================================================
class ProjVase expands Shuriken;

defaultproperties
{
    mpDamage=100.00
    spawnWeaponClass=Class'YourMod.WeaponThrowVase'
    ItemName="|p4Throwable |p3Vase"
    speed=100.00
    MaxSpeed=1000.00
    Damage=100.00
    Mesh=LodMesh'DeusExDeco.WHRedVase'
}


Also, Try adding bHandToHand=False in the actual weapons default properties.

DeusExItems is for item meshes, like pickups, etc. I think you meant DeusExDeco, so i changed it.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Gishank » Sat Mar 25, 06 6:24 pm

Lol, so obvious. Thanks.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby Gishank » Sun Mar 26, 06 9:31 am

Sorry for the double post but i still have the problem.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby Allan » Sun Mar 26, 06 3:08 pm

Try setting the weapons bHandToHand to false, that's the only other thing i see wrong with it, unless you actually left the last code with YourMod om it instead of BlueKnuckles (I didn't notice that the name was there before...)

Code: Select all
//=============================================================================
// ThrowingFlasks.
//=============================================================================
class ThrowingFlasks expands DeusExWeapon;

simulated function PreBeginPlay()
{
//Override any unneeded defaults.
}

simulated function bool TestMPBeltSpot(int BeltSpot)
{
   return (BeltSpot >=4 && <=6);
}

defaultproperties
{
     bInstantHit=False
     bAltInstantHit=False
     bUnlit=True
     bHasMuzzleFlash=False
     GoverningSkill=Class'DeusEx.SkillWeaponLowTech'
     HitDamage=100
     InventoryGroup=124
     maxRange=1800
     AccurateRange=1500
     ProjectileNames(0)=Class'BlueKnuckles.ProjVase'
     bHandToHand=False
     AmmoName=Class'DeusEx.AmmoNone'
     ReloadCount=1
     PickupAmmoCount=20
     LowAmmoWatermark=4
     ProjectileClass=Class'BlueKnuckles.ProjVase'
     InventoryGroup=205
     beltDescription="B-DESC"
     ItemName="Name"
     PlayerViewMesh=LodMesh'DeusExDeco.WHRedVase'
     PickupViewMesh=LodMesh'DeusExDeco.WHRedVase'
     ThirdPersonMesh=LodMesh'DeusExDeco.WHRedVase'
     Description="Description"
     largeIconWidth=36
     largeIconHeight=45
     Mesh=LodMesh'DeusExDeco.WHRedVase'
     CollisionRadius=5.000000
     CollisionHeight=12.000000
     PlayerViewOffset=(X=30.000000,Y=0.000000,Z=-5.000000)
     largeIcon=Texture'DeusExUI.Icons.LargeIconShuriken'
     Icon=Texture'DeusExUI.Icons.BeltIconShuriken'
}


That code should sort you out :) , just put it over the weapon code that you had, change the bits you want, and you'll be ready to go :D . And i just noticed, your vases will stick to the walls XD !!
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 2 guests