Announcement

Collapse
No announcement yet.

how to have an actor spawn another actor, and attach it to itself

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to have an actor spawn another actor, and attach it to itself

    i'm trying to make a moving bombing run goal. I have the xbombdelivery attached to a mover, and it works fine... BUT the xbombdeliveryhole is what actually registers a goal. xbombdelivery spawns xbombdeliveryhole, but it does not move with the goal, it just stays at the initial spot of xbombdelivery. I'm wanting to figure out how to make xbombdelivery spawn and attach xbombdeliveryhole to itself. any help would be much appreciated!

    #2
    In a subclass of xBombDelivery the following Should work...

    Code:
    mynewdeliver extends xBombDelivery;
    
    simulated function PostBeginPlay()
    {
        Super.POstBeginPlay();
    
        MyHole.Setbase(Self)
    }

    Comment


      #3
      hmm. didnt work, but thanks for the suggestion!

      Comment


        #4
        Hsoolien, you forgot a ;
        Code:
        mynewdeliver extends xBombDelivery;
        
        simulated function PostBeginPlay()
        {
            Super.PostBeginPlay();
        
            MyHole.Setbase(Self);
        }
        That WILL work, i kno my code enough to kno that, an Hsoolien def knos more then me, if it doesnt then ur missing something obvious..

        Comment


          #5
          Woops, I can't see why that would not work... if you fix the ';' issue

          Comment


            #6
            i caught the missing ; but it still did not work. When i went in game, the bombdeliveryhole is present at the starting point of the goal still
            i wonder if there is a way to have the spawning of the deliveryhole by the goal bypassed, place the deliveryhole in, and then attach to the goal... how would i go about telling the bombdelivery how to recognize the bombdeliveryhole though? any ideas?

            Comment


              #7
              well, are you sure u used the spawn with that code instead of the original??

              Comment


                #8
                yup. but i'll try once more.

                Comment


                  #9
                  ok, it seems to work more than it did before after redoing the code and recompiling. the goal mesh is now replaced with the xbombdeliveryhole mesh(which normally appears hidden). no big deal there, i can make it hidden manually, and add a static mesh mover of the actual goal and attach it. the new xbombdelivery registers a goal, but only when it is not attached to a mover. goal still scores at original location of the xbombdelivery when it is moving. bstatic is false, is there something else that needs to be changed? could it have to do with the collision of the mesh? one step closer, thanks for all the help, and any more would be much appreciated!

                  Comment


                    #10
                    UT never has liked moving key points, it could be that the game still thinkd it's there, even if it isn't

                    Comment


                      #11
                      ok. so maybe it arent gonna happen if its something inherit in the engine itself. as much as i would like to get this to work, aint shellin out hundreds of thousands of $s to modify the unreal engine. oh well. thanks all for help nevertheless. and if you find a solution, i'd love to know! i think i'll still use the xbombdelivery that resulted from the coding, it could lead to some cool things, like maybe having a goal scoring area that is not a bombing run goal. (if anyone played utclassic fragball, you know what i'm talking about.) also hats off to the ut community for not flaming my lack of scripting knowledge!

                      Comment

                      Working...
                      X