Results 1 to 14 of 14
  1. #1
    MSgt. Shooter Person
    Join Date
    Jan 2012
    Posts
    36

    Post Collecting different coins

    hi everyone i made collecting coins through "Actor placeable" and it working fine...and i made one class of same "Actor placeable" i can import this in map but it is not working properly... i mean when i collect the first actor placeable class coin it destroying and score is incrimenting and for the second it is not working....please help me...



    Thank you

  2. #2
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    73

    Default

    Can't help without code.. but for the second one I believe you forgot to add the touch event to destroy and increment the score?

  3. #3
    MSgt. Shooter Person
    Join Date
    Jan 2012
    Posts
    36

    Default

    I done every thing even thought it is not working...what to do...

  4. #4
    MSgt. Shooter Person
    Join Date
    Jan 2012
    Posts
    36

    Default

    class roapickups1 extends Actor placeable;
    var SoundCue pickupsound;


    event Touch(Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal)
    {
    roainfo(WorldInfo.Game).SCORE+=10;
    roainfo(WorldInfo.Game).COINS+=1;
    Destroy();
    PlaySound(pickupsound);

    }
    DefaultProperties
    {
    pickupsound= SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_UDa mage_PickupCue'
    Begin Object Class=StaticMeshComponent Name=StaticMeshComponent0
    StaticMesh = StaticMesh'Pickups.Ammo_Shock.Mesh.S_Ammo_ShockRif le'
    Translation=(X=0.000000,Y=0.000000,Z=-80.000000)
    Scale3D = (X = 3.0,Y = 3.0,Z = 3.0);
    End Object
    Components.Add(StaticMeshComponent0)
    //StaticMesh=StaticMeshComponent0

    Begin Object Class=CylinderComponent NAME=CollisionCylinder
    CollideActors=true
    BlockActors=true
    CollisionRadius=+010.000000
    CollisionHeight=+0080.000000
    End Object
    CollisionComponent=CollisionCylinder

    Components.Add(CollisionCylinder)

    bCollideActors=true
    bStatic = false
    bMovable= true


    }

    here is the code for the second collecting coins class

  5. #5
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    73

    Default

    copy the first coin collecting class replacing what you want for the second one?

  6. #6
    MSgt. Shooter Person
    Join Date
    Jan 2012
    Posts
    36

    Default

    actually i created one more class of different static mesh and i can import that too in my map but there is not collision between player and the coin and score increment is also not working...and for the first class it working fine..i don't know what the mistake please help me

  7. #7
    Banned
    Join Date
    Feb 2011
    Location
    BXL/Paris
    Posts
    2,169

    Default

    Q: Which class work, which not..?

  8. #8
    MSgt. Shooter Person
    Join Date
    Jan 2012
    Posts
    36

    Default

    1st class works and second class wont work

  9. #9
    Banned
    Join Date
    Feb 2011
    Location
    BXL/Paris
    Posts
    2,169

    Default

    ...then post that second class too.

    BTW. If you've changed only SM in second class, then make sure that that SM has a valid collision - if any...
    Last edited by VendorX; 05-11-2012 at 09:20 PM.

  10. #10
    MSgt. Shooter Person
    Join Date
    Jan 2012
    Posts
    36

    Default

    class roapickups extends Actor placeable;
    var SoundCue pickupsound;


    event Touc(Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal)
    {
    roainfo(WorldInfo.Game).SCORE+=10;
    roainfo(WorldInfo.Game).COINS+=1;
    Destroy();
    PlaySound(pickupsound);

    }
    DefaultProperties
    {
    pickupsound= SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_UDa mage_PickupCue'
    Begin Object Class=StaticMeshComponent Name=StaticMeshComponent1
    StaticMesh = StaticMesh'Pickups.Ammo_Shock.Mesh.S_Ammo_ShockRif le'
    Translation=(X=0.000000,Y=0.000000,Z=-80.000000)
    Scale3D = (X = 3.0,Y = 3.0,Z = 3.0);
    End Object
    Components.Add(StaticMeshComponent1)
    //StaticMesh=StaticMeshComponent1

    Begin Object Class=CylinderComponent NAME=CollisionCylinder
    CollideActors=true
    BlockActors=true
    CollisionRadius=+010.000000
    CollisionHeight=+0080.000000
    End Object
    CollisionComponent=CollisionCylinder

    Components.Add(CollisionCylinder)

    bCollideActors=true
    bStatic = false
    bMovable= true


    }


    here is the second class

  11. #11
    MSgt. Shooter Person
    Join Date
    Jun 2011
    Posts
    213

    Default

    You put "event Touc" instead of "event Touch"

  12. #12
    MSgt. Shooter Person
    Join Date
    Jan 2012
    Posts
    36

    Default

    THANK YOU adf86...IT WORKING FINE NOW

  13. #13
    Banned
    Join Date
    Feb 2011
    Location
    BXL/Paris
    Posts
    2,169

    Default

    Hmm... For me this is the same class like above - only name is different.
    Code:
    event Touch(Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal)
    {
    	// You need that check - change if your player is not a Pawn.
    	if(Pawn(Other) != None)
    	{
    		roainfo(WorldInfo.Game).SCORE+=10;
    		roainfo(WorldInfo.Game).COINS+=1;
    		Destroy();
    		PlaySound(pickupsound);
    	}
    }
    Collision is working - tested...

  14. #14
    MSgt. Shooter Person
    Join Date
    Jan 2012
    Posts
    36

    Default

    i teased it i working fine...thank you people


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.