![]() ![]() Navigate to Edit > Project Settings > Engine > Input, then from the Bindings > Action Mappings category, click the + button to add two additional mappings named SpawnActors and DestroyActors. Now that you have created your two Actor classes, Bp_ActorToSpawn and Bp_ActorSpawner, you will now be tasked with setting up the Third Person Character with the functionality to call the Actor spawner's Spawn Actor function. Setting Up Additional Character Action Commands ![]() Right-click the Event Graph, from the Actions context menu, search for and select Add Custom Event, then name it SpawnActor.ĭrag off of the Spawn Actor Custom Event execution pin and from the Executable actions dropdown menu, search for and select Spawn Actor From Class.įrom the SpawnActor node Class pin, select the BP_ActorToSpawn class.Ĭlick and drag off of the Spawn Transform pin from the Spawn Actor from Class node, then from the Actions dropdown menu search for and select Get Actor Transform. Then, search for and select the Box Component and rename it to SpawnVolume. Now that you have created an Actor to spawn, you will create an Actor spawner which contains a custom function to spawn your new Bp_ActorSpawn Blueprint.įrom the Content Browser, select the Add/Import button and create a new Blueprint Actor class named Bp_ActorSpawner.įrom the Class Defaults, navigate to the Components tab and select Add Component. Navigate to the Details panel and from the Particles category, select the dropdown arrow next to the Template variable, then search for and select P_Fire. Search for and select the Particle System Component. Navigate to the Components tab and select Add Component. Then from the Location variable, change Z value to -12.0. ![]() Navigate to the Transform category and from the Scale variable, change the X, Y, and Z values to 0. Then, search for and select the Shape_Sphere Static Mesh asset. In the Details panel, locate the Static Mesh category and select the dropdown arrow next to the Static Mesh variable. Navigate to the Components tab and select Add Component, then search for and select the Static Mesh Component. Navigate to the Physics category and check the box next to the Simulate Physics variable. In the Details panel of the Sphere Component navigate to the Shape category and change the Sphere Radius value to 16.0. Then, search for and select the Sphere Component, and drag it over the Scene Component to make it the new Root Component. In the Class Defaults, navigate to the Components tab and select Add Component. Name your project SpawnDestroy.įrom the Content Browser, select the Add/Import button and create a new Blueprint Actor class named Bp_ActorToSpawn. In this section, you will create an Actor that contains a Sphere Component, a Static Mesh Component, and a Particle System Component.īegin by creating a new Third Person Blueprint games project, with Starter Content set to enabled. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |