How can i make a spawned prop indestructable?

Hi, I am spawning a floating prop the moves around my island on a loop in verse, I just want to make it indestructible, thanks!

Also I am new to verse so any advice is appreciated, I have no clue how or why this code is working, the rotation angles seem incredibly off, but the way it is works for me currently.

Also, I asked this question already and then edited the section it was in, but it wasn’t showing up on the forums so I deleted the other post.

using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/CreativeAnimation }
using { /Verse.org/Native }
using { /Verse.org/Simulation }
using { /Verse.org/Simulation/Tags }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }

boat := class(creative_device):

    @editable
    CreativeProp: creative_prop_asset := DefaultCreativePropAsset

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        SpawnedProp := SpawnProp(CreativeProp, vector3{X:=-2560.0, Y:=-512.0, Z:=-100.0}, IdentityRotation().ApplyLocalRotationZ(-69.9))
        Prop := SpawnedProp(0)
        if (BoatProp := Prop?):
            spawn { PrintPropLocation(BoatProp) }
            
            loop:
                BoatProp.MoveTo(vector3{X:=256.0, Y:=576.0, Z:=-100.0}, IdentityRotation().ApplyLocalRotationZ(-90.0), 5.0)
                BoatProp.MoveTo(vector3{X:=2048.0, Y:=-1024.0, Z:=-100.0}, IdentityRotation().ApplyLocalRotationZ(-110.0), 5.0)
                BoatProp.MoveTo(vector3{X:=320.0, Y:=-3136.0, Z:=-100.0}, IdentityRotation().ApplyLocalRotationZ(-30.1), 10.0)
                BoatProp.MoveTo(vector3{X:=-7616.0, Y:=-3840.0, Z:=-100.0}, IdentityRotation().ApplyLocalRotationZ(-30.1), 9.0)
                BoatProp.MoveTo(vector3{X:=-7616.0, Y:=-3840.0, Z:=-100.0}, IdentityRotation().ApplyLocalRotationZ(-110.0), 7.0)
                BoatProp.MoveTo(vector3{X:=-8832.0, Y:=-6656.0, Z:=-100.0}, IdentityRotation().ApplyLocalRotationZ(-90.0), 10.0)
                BoatProp.MoveTo(vector3{X:=-6272.0, Y:=-8576.0, Z:=-100.0}, IdentityRotation().ApplyLocalRotationZ(-69.9), 5.0)
                BoatProp.MoveTo(vector3{X:=-2560.0, Y:=-512.0, Z:=-100.0}, IdentityRotation().ApplyLocalRotationZ(-69.9), 20.0)

    PrintPropLocation(Prop:creative_prop)<suspends>:void=
        loop:
            #Print("Prop Location: {(Prop.GetTransform().Rotation)}")
            Sleep(1.5)

“destructible” is specific to the particular game you’re working with.

If this is for Fortnite, you should probably post in the fortnite editor forum.

In general, in Unreal Engine, Actors have a “can be damaged” flag that you can turn on, but I don’t know if Fortnite uses this.

Thanks Jwatte,

@TTVTROOFTH I just updated the tags on this post, so it is showing up in the correct section now.

1 Like

There isn’t a way currently to make it indestructible via verse as they haven’t implemented that in the creative device yet. Maybe a feature request to them?

@GraemeBB Thanks, so is there a way I can make an editable for a prop hard-coded into the map? Then set it to be indestructible in the map and manipulate it in verse? I was using a tutorial to do that using “tags” but those were for an array of objects and not an individual object.

As @jwatte said, if you want it to be indestructable from the time they spawn, just uncheck “Can Be Damaged” inside your Prop Blueprint file.

@im_a_lama , I am using the “Coastal Boat” included with UEFN, as far as I know I wont be able to copy it to my own file or make any changes to it like you’re saying, right? Is there some way to do it by copying the static mesh, or is that not allowed?

Copying the static mesh will result in a validation error upon launching session. I think there’s an option to make a blueprint from the existing actor (next to the add button in the details panel), but I’m not sure it works too.

What you could do also if your mesh is floating around the map is to also spawn a transparent box that collides with projectiles and move it with the boat too.

Finally, if you’re only spawning a few boats maybe you could not spawn them, instead you’d place them somewhere hidden in your map (because it’s placed in UEFN you can uncheck “Can be damaged”) and teleport/hide them with Verse whenever you need

hope it helps

I think this last option is best until Epic adds in the attribute to set in Verse to make props indestructible upon spawn

Thanks, the last option is what I would like to try (after a lot of experimenting this seems like an incomplete part of verse).

The problem I am having is applying those kinds of rotations etc on a prop hidden on the map. I’d like to know a way I can make an editable slot for a prop hidden on my map. Because I just don’t know how to grab it’s handle in verse unless I spawn it. Kind of backwards haha sorry for the basic question but I’ve been stuck on this for days now

Hey, just use :

@editable
MyProp : creative_prop = creative_prop{}

Then you can call MyProp.TeleportTo[] or MyProp.MoveTo() :+1:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.