Notifications
Clear all

[Closed] Script Optimize

Hello, I am fairly new to scripting,

Is there a way to optimize my on loops?

rollout dirt_Explosion “Dirt Explosion”

(
–inyourface

spinner DustBurstAmount "Dirt Body" type:#integer range:[0,500,$DustBurst.Number_of_Offsprings]
spinner DustBurstSpeed "Dirt Body Speed" type:#float range:[0,10000,$'Speed By Surface 02'.Speed_Value]
spinner DustBurstGravity "Dust Burst Gravity" type:#float range:[0,1000,$'Force 14'.Influence]



--variables

on DustBurstAMount changed val do
    (
        
        $DustBurst.Number_of_Offsprings = DustBurstAmount.value;
    )
    
on DustBurstSpeed changed val do
    (
    
    $'Speed By Surface 02'.Speed_Value = DustBurstSpeed.value;
    $'Speed By Surface 02'.Speed_Variation = DustBurstSpeed.value / 8.5;
    
    
    )
    
on DustBurstSpeed changed val do

)

createdialog dirt_Explosion

can i put my variables in an array?

Thanks
-Andrew