Norbyte / bg3se

Baldur's Gate 3 Script Extender
Other
1.02k stars 63 forks source link

Override function parameters on before listeners #379

Open caiocinel opened 2 months ago

caiocinel commented 2 months ago

Is there currently any way to override parameters of the functions executed by the game when linked to a "before" listener?

Ext.Osiris.RegisterListener("HitpointsChanged", 2, "before", function(entity, percentage)    
    percentage = 100;        
end)

Doing this would set the points to 100%, but the original value of the parameter is still used when executing the function.