Download

Some Math Here Please !

Hi there,

I just wanna to ask you guys that, in my project whenever i left click object spawn into scene with own price and right click destroy actor (price is standing) ! Regarding to this tutorial (https://youtu.be/nd5aSmUJ5sk) i create mine but whenever i remove actor i would like to value (price) minus as i defined to object ! Can you please tell me what shall i have to do ?
Note: Details in attachement !

actor bp


building widget price function

firstpersoncharacter_price_function

​​​​​​​
Thank you and Best Regards

There are few ways to achieve this. Two of them:

A. Create two separate functions to RaisePrice and DropPrice and call them accordingly when you spawn or destroy actor.
B. Keep this function but only with raise input. You would do everything the same when you spawn actor but when you destroy it you would need to enter negative value.

Thank you @exadi, i did what you suggested and working like charm, cheers…

done.JPG