Hello, first, sorry for my english, im french.
Im making my own minecraft game, but i have a issue with my script, i started python scripting 2 weeks ago and i need your help.
I explain me:
I have a “lastblock” string property on my Camera, and when i look at a block, and i leftclick on mouse, the “lastblock” property take the name of the looked object (Exemple: Bloc-Grass).
But i want if you look another object, or the sky or anything… the last object name in the property “lastblock” , i want my script take his name and set his own “Default” property to his own “Solidite” property. after that, the “lastblock” property can be set to nothing.
I just want make this:
lastblock = se.objects[the string value in “lastblock” property/the block name in my “lastblock” prop]
i try with different way but nothing work.
I paste you the script (i use # for show you what i want):
cible = Ray.hitObject
if own[‘lastblock’] != cible:
proplastblock = own[“lastblock”]
#lastblock = se.objects… #HERE IS MY PROBLEM
#lastblock[“Solidite”] = lastblock[“Default”]
#degats.visible = 0
#own[‘lastblock’] = “”
I give you a picture:
If you need any other details, tell me.
I really need your help, please help me.
Have a nice day!