|
well basically, i'am makeing a stragety game and i'ave encoutrned a problem, i'ave got a lumber jack to cut down tress, the harvest script is working but i would like it when it's hit a tree 5 times it goes back to his hut to drop off the wood before going back. but i don't know how to script that, (it's only the going back to a certain object when hits = 5)
(comments are locked)
|
|
im not a good scripter but aint (curent position - shedposition = distance to get back) then use x,y,z translate to get back to it with the distance you get from the calcul from abouve then if distance <= 0 , somehting else happen liek going back to another tree
(comments are locked)
|
|
Might want to include a check everytime you add a a hit. Something like this(provided I dont know how you've done your code) } is that what your looking for?
(comments are locked)
|

This question is extremely ambiguous and presents no actually helpful information whatsoever. From what I can tell from your frankly poorly written question, "it's only the going back to a certain object when hits = 5)" should be exactly what you want?
Maybe try stepping into our shoes and visualise how hard it is to discern what someone means when it's asked like that.