Back to search
ExampleGameplay

Create a Blueprint for a projectile that moves forward, bounces off walls, and explodes after 3 seconds

Updated 6mo ago1 look-ups
UE 5.0UE 5.1UE 5.2UE 5.3UE 5.4UE 5.5UE 5.6UE 5.7#projectile#bounce#explode#timer#physics

Blueprint JSON

The structure WoalzCraft generates. Paste into the plugin to instantiate as a real Blueprint.

{
  "nodes": [
    {
      "id": "n_begin",
      "position": {
        "x": 0,
        "y": 0
      },
      "node_type": "EventBeginPlay"
    },
    {
      "id": "n_setlife",
      "position": {
        "x": 200,
        "y": 0
      },
      "node_type": "CallFunction",
      "input_values": {
        "InLifespan": "3.0"
      },
      "function_name": "SetLifeSpan"
    },
    {
      "id": "n_endplay",
      "position": {
        "x": 0,
        "y": 300
      },
      "node_type": "Event",
      "event_name": "EndPlay"
    },
    {
      "id": "n_getloc",
      "position": {
        "x": 200,
        "y": 400
      },
      "node_type": "GetActorLocation"
    },
    {
      "id": "n_radial",
      "position": {
        "x": 450,
        "y": 300
      },
      "node_type": "CallFunction",
      "function_name": "ApplyRadialDamage"
    },
    {
      "id": "n_particle",
      "position": {
        "x": 700,
        "y": 300
      },
      "node_type": "SpawnEmitterAtLocation"
    },
    {
      "id": "n_sound",
      "position": {
        "x": 700,
        "y": 500
      },
      "node_type": "PlaySoundAtLocation"
    }
  ],
  "variables": [
    {
      "name": "Damage",
      "type": "float",
      "default_value": "25.0"
    },
    {
      "name": "ExplosionRadius",
      "type": "float",
      "default_value": "300.0"
    }
  ],
  "components": [
    {
      "name": "CollisionSphere",
      "type": "SphereComponent",
      "is_root": true,
      "properties": {
        "SphereRadius": 10,
        "SimulatePhysics": false,
        "CollisionProfileName": "BlockAllDynamic"
      }
    },
    {
      "name": "ProjectileMesh",
      "type": "StaticMeshComponent",
      "parent": "CollisionSphere"
    },
    {
      "name": "ProjectileMovement",
      "type": "ProjectileMovementComponent",
      "properties": {
        "MaxSpeed": 2000,
        "Bounciness": 0.8,
        "InitialSpeed": 2000,
        "bShouldBounce": true,
        "bRotationFollowsVelocity": true
      }
    }
  ],
  "connections": [
    {
      "to_pin": "execute",
      "to_node": "n_setlife",
      "from_pin": "then",
      "from_node": "n_begin"
    },
    {
      "to_pin": "execute",
      "to_node": "n_radial",
      "from_pin": "then",
      "from_node": "n_endplay"
    },
    {
      "to_pin": "Origin",
      "to_node": "n_radial",
      "from_pin": "ReturnValue",
      "from_node": "n_getloc"
    },
    {
      "to_pin": "execute",
      "to_node": "n_particle",
      "from_pin": "then",
      "from_node": "n_radial"
    },
    {
      "to_pin": "Location",
      "to_node": "n_particle",
      "from_pin": "ReturnValue",
      "from_node": "n_getloc"
    },
    {
      "to_pin": "execute",
      "to_node": "n_sound",
      "from_pin": "then",
      "from_node": "n_particle"
    },
    {
      "to_pin": "Location",
      "to_node": "n_sound",
      "from_pin": "ReturnValue",
      "from_node": "n_getloc"
    }
  ],
  "parent_class": "Actor",
  "blueprint_name": "BP_BouncingProjectile"
}