No announcement yet.

Help needed with weapon pickup class

  • Filter
  • Time
  • Show
Clear All
new posts

    Help needed with weapon pickup class

    I know someone wil ask for the code so here it is.

    class LightSabrePickup extends UTWeaponPickup;

    StaticMesh=StaticMesh'sabrepickup.sabres.lightsabr e'
    PickupMessage="You got the LightSabre."

    Everything compiles with no problems. When I try to summon the weapon nothing shows and this is what the log shows:

    Warning: Failed to load 'Class lightsabre.lightsabrepickup': Failed to find object 'Class lightsabre.lightsabrepickup'

    But if I change the StaticMesh of another weapon to StaticMesh=StaticMesh'sabrepickup.sabres.lightsabr e' compile and run then it shows up properly. Could it be another file, has anyone else ever had this problem???


    So you say when you change the mesh of another weapon pickup that you created, compile and then summon that other weapon, it works fine?

    For the weapon that you are trying to summon, what does it have listed as its pickup class. Is it case sensitive?

    heh can you post a screenshot I like light sabres


      Why do you assume it's the mesh? Have you tried spawning the sabre with another mesh? If that works, it's probably the mesh, but I bet you'd still get the same error.

      What's the name of the package the sabre code is in?


        Are you sure it compile ? Got the .u and everything ?
        Because even without a proper mesh, game would still try to spawn the pickup if it exists, and crash or set a default mesh if you mesh is corrupted.
        Your log states it didn't even found the pickup. Its properties were not read.


          Im sure it compiled properly, the .u and everything is there. I know its not the mesh thats the problem because I can spawn it ingame using other weapon classes. I have another weapon I created, the funny thing is, if I change all the code of that weapon to match the lightsabre code, except now its not called the lightsabre and its a different package, it summons perfectly.


            If it's the exact twin except for the name and package, I'd blame the name and package and go look for dissimilarities there. Have you checked out the package settings, for example?