PickedEntity (Docs + command)

Blitz3D Forums/Blitz3D Bug Reports/PickedEntity (Docs + command)

2 things really

1st:

whenever I look at BlitzDocs for the PickedEntity command, (and also PickedNX,PickedNY,PickedNZ,PickedSurface,PickedTime, and PickedTriangle) all it says is Parameters: <param description> Description: <description> Example: <example>
That all looks like XML to me, but I don't think that's what it's supposed to look like

2nd:

whenever i do this:

If MouseDown(1) Then 
	CameraPick (camera,MouseX(),MouseY())
	picked = 1
Else
	picked = 0
End If
If picked = 1
	telemove = PickedEntity
	NameEntity telemove,"move"
	If KeyHit(42) Then fastslow = 1 - fastslow
	If fastslow = 0 Then
		If KeyDown(203) Then MoveEntity move,-0.3,0,0
		If KeyDown(205) Then MoveEntity move,0.3,0,0
	End If
End If


it says

Entity does not exist


and yes, i did set EntityPickMode

what do i do?

MoveEntity takes the entity handle as a parameter, not the entity name:

MoveEntity telemove,-0.3,0,0


Also, just because you've set the variable 'picked' to 1 doesn't mean the pick command picked anything, you need to check if pickedentity() <> 0 - remember to include the brackets as well which you've left off above.

oh ok thanks

that still doesn't solve the problem with the Docs though

My docs say:
PickedEntity ( )
Parameters
None.  

Description
Returns the entity 'picked' by the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick. 

Returns 0 if no entity was picked.