Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Spawn Archetypes in the code

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

  • Spawn Archetypes in the code

    You can spawn classes , so i uspose that you can spawn archetypes as well , how to do that? there is a special function for archetypes

    spawn(class'Watever',,,box.location) instead of that an archetype

  • #2
    The sixth parameter of the Spawn() function is the 'ActorTemplate', for archetypes.

    Comment


    • #3
      Code:
      var archetype your_class archetype_var;
      spawn(class'your_class',,,location,rotation,archetype_var);
      hope this help you

      Comment


      • #4
        Code:
        local Actor archetype;
        
        archetype = Actor(DynamicLoadObject("YourPackage.Group.YourArchetypeName", class'YourArchetypeClass'));
        
        Spawn(archetype.class, , , , , archetype);

        Comment


        • #5
          thanks Spoof, i didn't know that form to use archetypes.!!!

          Comment


          • #6
            Thanks for the help! i'd really want to help back , but when i do i fail ! im sure that works

            Comment


            • #7
              Daimaku in your way the archetype needs to be referenced on de defaultProperties i think


              Like that
              ShieldArchetype=AncientShield'Ancientcontent.Arche types.SimpleShieldC'


              so it works

              and your other way spoof there's problems with it , in the case of my archetype it was a weapon wich had it's special vars
              i culdn't acces em , when attaching to a socket "mesh" ,

              what am i suposed to do , get there LOcal Weapon arcehtype ? , because weapon it's a engine class asswell as the actor class but extends of actor

              Comment


              • #8
                yes you are right Neongho, i forgot to put that in the sample code.

                Comment


                • #9
                  Originally posted by Neongho View Post
                  and your other way spoof there's problems with it , in the case of my archetype it was a weapon wich had it's special vars
                  i culdn't acces em , when attaching to a socket "mesh" ,

                  what am i suposed to do , get there LOcal Weapon arcehtype ? , because weapon it's a engine class asswell as the actor class but extends of actor
                  Sounds like you're not typecasting the reference returned by Spawn().

                  Code:
                  // psuedocode...
                  
                  local CustomWeaponClass MyWeapon;
                  
                  MyWeapon = CustomWeaponClass( Spawn(......) );
                  
                  MyWeapon.MyVar = ........

                  Comment


                  • #10
                    http://udn.epicgames.com/Three/Arche...20Unrealscript

                    Comment

                    Working...
                    X