edited September 2014 in ORK Support
i keep getting the error message "set a player before spawning it" which is probably really easy to fix but iv been pretty confused.

i start the scene with a bear player and a main camera already in the scene, i dont spawn anything using a main menu. if i go out the door of the room i am in i have a scene changer that is supposed to take me outside, which is another scene. then i always get the error above. how do i fix this? i set the combatant up in the ork framework...

its kinda confusing as i am using a platform engine with the ork engine. it seemes to work ok, its just when i need to spawn in the player, the camera isnt their so i gave errors and vice versa since the player has scripts that rely on the camera and the camera has scripts that rely on the player. i just want to be able to spawn the player into the game... any ideas??
  • you have to spawn your player at start or it wont work
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • is it possible to have the ork player be already in the scene then? like have ork know that a prefab is the player without spawning it?
  • not that i know of GIL might say other wise but as far as i know you need to spawn it.. but u can do say a event with the character walking around or what not an then have the spawn event spawn the character at the start of what ever map you want. if your using other scripts an cameras i think you can just add them to your player prefab an spawn it all with that prefab just make sure to delete the camera from each scene if the player prefab has a camera attached....
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • dangit, im trying to get the player and camera to spawn, but both have to be in the scene because of scripts attached using each other, the player uses the camera i believe and the camera uses the player in scripts... so if i spawn one before the other it gives errors.

    to fix that i tried having them already in the scene... doesn't seem to work though. i did get them somehow to spawn i think though but then the camera couldn't find the player prefab to follow it. since it was a clone i think was the problem...sigh.. well thanks for trying to help at least. :)
  • Are these standard Unity scripts or scripts you made yourself? If they're standard scripts what are their names? And which script is on your player and which script is on your camera.

    You can make a prefab of your camera and a prefab of your player and sometimes the scripts allow you to slide that prefab in so you don't have this kind of problem.
  • You should spawn your player with ORK and not already have him in the scene.

    If you really need to have the player in the scene already, add an Add Combatant component to the game object to set the player's combatant. Use the game object as an actor in your event and use the Set Player step to set it as the player.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • thank you gil, ill try that as i keep getting error messages otherwise, it seemes like if i spawn in the players using ork then 1 is created before the other and either the camera cant find the player or vice versa. and if i put the players into the scene i couldnt have ork work, but ill try what you said and add a "add combatant"component. thanks hopefully it works :)
  • well idk if its working because now the interaction controller wont follow the player model. it doesnt move with it. i tryed asigning it using the base controls it didnt work, i also tryed puting it on the prefab, didnt work. any ideas?
  • Put it directly on your player in the scene and don't add it with ORK if you're not spawning the player with ORK.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.