I have reviewed several old forum threads on this subject, but I still can’t get it to work. My problem “seems simple”. I am trying to get bullet hole marks to stick to surfaces as they are shoot. This will be in a driver shooter game, but I am using (trying to use) bullet hole scripts from a FPS game. No matter what I change I just can’t seem to get the bullet hole object to appear. I have added a screen shot to see if anyone sees something obvious.
I am also having a hard time getting the “near” sensor working. If anyone has any tutorials or blends that they could share I would appreciate it greatly
What itirx said: the variable name can’t start with a letter.
You could however also be having a problem with your indentation.
What I have found is that the internal editor in Blender has trouble when you mix tabs and spaces for the indent blocks. Check to see whether the spacing in front of line 38 is a tab or 4 spaces (or whatever number you use) and then make it whatever the rest of that block is.
To check all your code at once for this, open the script is an external editor (I use IDLE, it should come with the python install). Checking the script for errors should raise any indentation errors (in IDLE: Run > Check Module).
You can fix indent errors by hand or you can fix all of them for the whole script by selecting all your text and doing : Format > Untabify region (or tabify, but I prefer spaces).
Be careful though, because if your code has lots of tab/space errors, then doing this will fix it, but will also cause the places with errors to be indented ‘wrong’ compared to how you want them.