Help with some advanced scripting.

I want to make a destructible scenery where an object is broken (such as a wooden plank) and have scenery around it fall apart. Not only that but also respawn after the event after some time, like three minutes.
The scenery collapsing part is the easy part, but making it reset and respawn is the hard part, and I can’t seem to figure it out or find a video or thread that helps.
My scripts go something like this:
(Activator destructible block, i.e. wooden plank)

WHEN…
Condition: Destroyed/Despawned
DO…
Action 1: Message: send
Channel: Alpha
Action 2: Wait
Time: 5
Action 3: Spawn
Force: On

Then for all affected blocks in the scenery the script goes like this:

WHEN…
Condition: Message: Recieved
Channel: Alpha
DO…
Action 1: Physics: Set
OJECTS: (THIS) //is default, help on what the terms within mean would be helpful aswell
Type: Normal
Action 2: Wait
Time: 5
Action 3: Physics: Set
OBJECTS: (THIS)
Type: Phased //to have the blocks not fall back over when repositioned
Action 4 Position/Rotation: Reset
OBJECTS: (THIS)
Time: 0.00 // to have them instantly reset without collision
Reset Velocity: On
Position: On
Orientation: On

Those are my scripts, but what I’ve noticed is that it seems that the blocks reset their “spawnpoint” when they fall onto the ground and stop moving.
Is there any way around this? Any way to fix this? Any alternative methods to achieve my result? Any actual help or tertiary tips for scripting would be appreciated.

Put a Script Brain where the environment is supposed to fall into.

Put the Brain’s scripts to this (Make sure to give the Brain a full Boundary):
Condition: Boundary: Check
Objects
Action: Message: Send: Bravo

Then make the enviroment’s scripts this:

Condition: Message: Received: Bravo
Action: Position/Rotation Reset

This will make the scripting easier than having a “Wait” script, and should work better.

And for the wooden plank, you don’t need script to respawn it. Just put the Respawn on “Death/Deletion” and put the timer to 1-10 seconds. Having a script to respawn it is unnecessary.

Hope this helps, :slight_smile:

Position/rotation reset only resets the position/rotation when a move/rotation command is used not when the physics are changed. What you want to do is set the respawn to on disturbance and cha he it to however long you want. Time.it correctly and as soon as the objects respawn have them turn back to physics. If you don’t want people to see it to respawn then potentially add some temporary walls to spawn and then despawn once the respawn is completed. Hope this helps.

Here’s a tutorial on Halo 5’s destructible environments in forge.