27.00 IsValid[] on a spawned creative_prop, never returns false

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Assets

Summary

IsValid on a spawned creative_prop, never returns false. So currently we cannot check if a spawned prop was destroyed by a player.

Steps to Reproduce

Destroy a spawned prop.
Test is Valid
notice it returns true even after it is destroyed.

Expected Result

Is Valid returns false.

Observed Result

Is valid never returns false.

Platform(s)

All.

Additional Notes

We can no longer damage or bosses /props/objects based on weapon damage.
we cannot check if it’s destroyed unless it’s attached to a prop_manipulator_device which we can only attach in the editor. So atm we cannot know at runtime if our spawned prop is destroyed.

UCB-1030 incident has been created. Status is ‘Awaiting Validation’.

5 Likes

We are getting the exact same problem. This is a big issue for us as it breaks some primary mechanics across all of our experiences.

7 Likes

Same issue here. I use IsValid to check if a spawned prop is destroyed by a player. This worked prior to 27.00.

3 Likes

I managed a rather hacky workaround for this issue. My props in question move around the map. I now check if they moved successfully to the new location after a call to TeleportTo[]. If they did not, I assume they are no longer valid and I call Dispose(). After calling Dispose() on a prop, any call to IsValid[] now correctly returns true.

Pseudo code:

OldPosition := Prop.GetTransform().Translation
NewPosition := OldPosition + vector3{X:=1.0, Y:=0.0, Z:=0.0}
if (Prop.TeleportTo[NewPosition, IdentityRotation()]):
   CheckPosition := Prop.GetTransform().Translation
   Diff := CheckPosition - OldPosition
   if (Diff.Length = 0):
      # We didn't teleport to new position!
      Prop.Dispose()
:
:
# somewhere else in code, this will now return true for disposed prop
if (not Prop.IsValid[]):
   # do stuff

Note: TeleportTo[] does not seem to fail if a prop is not valid.

I realize this is less than ideal and won’t work for everyone. If you are already moving props within your game loops, this could help.

1 Like

Thank you for the report, we’re checking into this. We’ll be posting updates in the 27.00 Release thread.

1 Like

If anyone can provide me some live island codes impacted, to test the fix on, that would be greatly appreciated!

2 Likes

Thank you for jumping on this so quickly! Here’s the code for our tycoon: 5200-1145-5588. The firing range section is impacted by this. When you eliminate a FOAD prop in the range, it is supposed to increase a players money and increment the two UI elements below. It still triggers the explosion effect showing the sprite for money awarded, but money is not actually added to your score and the range does not level up.

You have to play for about 4-5 minutes to build the range, so sorry about that. Let me know if you have any questions.

1 Like

A fix just went out for the IsValid issue. Please check your maps to confirm it’s now solved! Thanks for the diligent reporting

1 Like