Local Variables HELP
I know the title isn't exactly specific but I don't know what to call it. So basically I am making a cutting tree script where you hit the tree with MsButton1 then I added a slight delay with 0.8 seconds so you cant spam it. Then it gives you wood. All this is done with raycast and left click. (Because I tried Vector Distance to but it didnt work so I will add that later.) This is all fine but if I go to one tree and click it (I made it print the health of the tree) it prints the health lets say to 2 but when I go to the other tree it goes to 1. I need every single tree different so it wont cut all trees down when I cut one. I know this is confusing so maybe read it again xD Plesae help I have been stuck on this for a little now and want to move on. If you have any questions Please ASK.
asked Mar 20 '17 at 08:21 PM in Blueprint Scripting
Where do you set the value of Tree? You have multiple trees in your scene I suppose, but it looks you are only modifying the health of that single tree.
On your trace, you should be setting the value of your Tree variable to the hit actor (provided it's a tree). Are you doing anything like that?
answered Mar 20 '17 at 08:36 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here