Position Entities Question

Blitz3D Forums/Blitz3D Beginners Area/Position Entities Question

Nicstt(Posted 2005) [#1]
Using this function to finetune position of doors etc, that will be animated.

Is there a better way (CS4 doesnt give cords)?

Function EntityInfo()
; position an entity X = q,w;  Y = a,s; Z = z,x
	If KeyDown(16) ; X = q,w
		MoveEntity doorchurch, + 0.01, 0, 0
	EndIf
	If KeyDown(17) ; X = q,w
		MoveEntity doorchurch, - 0.01, 0, 0
	EndIf
	If KeyDown(30) ; Y = a,s
		MoveEntity doorchurch, 0, + 0.01, 0
	EndIf
	If KeyDown(31) ; Y = a,s
		MoveEntity doorchurch, 0, - 0.01, 0
	EndIf
	If KeyDown(44) ; Z = z,x
		MoveEntity doorchurch, 0, 0, + 0.01
	EndIf
	If KeyDown(45) ; Z = z,x
		MoveEntity doorchurch, 0, 0, - 0.01
	EndIf
	if KeyHit(88)
		writeinfo = writefile("C:\Documents and Settings\Administrator\My Documents\Blitz Progs\B3D\location.txt")
		WriteLine writeinfo, Str EntityX(doorchurch) + ", " + Str EntityY(doorchurch) + ", " + Str EntityZ(doorchurch)
		CloseFile(writeinfo)
		Text 1000, 60, "Co-ordinates Saved"
	EndIf
	; *** end of position an entity
	Text 1000, 10, "Object X: " + Str EntityX(doorchurch)
	Text 1000, 25, "Object Y: " + Str EntityY(doorchurch)
	Text 1000, 40, "Object Z: " + Str EntityZ(doorchurch)
End Function



Sledge(Posted 2005) [#2]
http://www.blitzbasic.com/toolbox/toolbox.php?tool=24 ?


Nicstt(Posted 2005) [#3]
thanks for link, but checked it out, not quite what im looking for, development stopped


jfk EO-11110(Posted 2005) [#4]
Instead of mousedown you could use a combination of mousedown AND MouseXSpeed, so you can move a mesh slowly or fast, and smoothly finetune things.


Nicstt(Posted 2005) [#5]
thx, although i position approx using cords from where player is


Gord(Posted 2005) [#6]
I have the xyz coords printed on screen for the placing of objects.