I placed several children around in my map editor. They all have the same name and are all equal to the root/parent.
I made a mesh at the location of that child, with the 'FindChild' command and now when I run my game,it only makes one mesh at the location of the first placed child (in the editor).
Here's the code: (its about Dev NPC)
I made a mesh at the location of that child, with the 'FindChild' command and now when I run my game,it only makes one mesh at the location of the first placed child (in the editor).
Here's the code: (its about Dev NPC)
; Load content
map1=LoadAnimMesh("content\maps\map1.b3d")
PositionEntity map1,0,0,0
; Maps Children
player_spawn=FindChild(map1,"classname=spawn_player")
devcam_spawn=FindChild(map1,"classname=spawn_devcam")
devnpc_spawn=FindChild(map1,"classname=spawn_devnpc")
; Dev NPC
devman=LoadAnimMesh("content\models\dev_man\dev_man.b3d")
PositionEntity devman,EntityX(devnpc_spawn),EntityY(devnpc_spawn),EntityZ(devnpc_spawn)
; PLAYER
player=CreatePivot() ;Create a pivot for our player character, the camera will be parented to this
playercam=CreateCamera()
EntityParent playercam,player ;Attach the camera to the player pivot.
MoveEntity playercam,0,1.83,0 ;Move the camera up slightly to place it at about eye level
PositionEntity player,EntityX(player_spawn),EntityY(player_spawn),EntityZ(player_spawn)