Before I purchased (or even knew of ORK) I built a scene, castle rooms/halls.
Spent time on a door, went with a raycast from player (interactscript) on E press it would activate the door using a simple DoorScript to rotate open if tagged as Door. Worked perfect, copied that entire door (Parent/child etc) and uplaced on my other door frames. No problems. Even had sound! (I have never coded before this last month so yes, YAY! me!)
Enter ORK...Went through most of the tutorials, up to the hunting enemies part and decided to try to add a player to my game.
I deleted everything but the dungeon itself (all character prefabs etc...)
Got it to spawn my prefab (Royal Knight from asset store), modified his prefab animations, he now runs down the halls, YAY!
Read up and added a custom controller and selected my interact script, checked add component, tested.
My first door opened perfect! Ran to my second door, nothing, I checked all settings, it is set up exactly as the one that does work, none of the doors work other than that first one. The first one opens, and closes on E press but none of the others.
The other ones that do not work, I have an OPEN box checkbox in the inspector, when I hit PLAY, and check that box, the door opens, so I know the script is fine.
Any ideas?
(I do love ORK, makes it a bit easier to accomplish something for someone that has never coded anything. Thanks!)
The new version of Unity has a different way of handling tags. Is there some way you can tag the doors differently? I don't know which version of Unity you're using and whether that's part of your problem. Is everything tagged right?
Do you need to make a different tag and addition to your script for each door?
Or don't I understand what the problem is?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
It seems using ORK (or maybe this prefab instead of my first person capsule) was causing the RAYCAST to emit from someplace other than the head. I extended the Y-axis collider to just below the surface and now the doors work. Previously I had the Y-axis collider stopped at the floor level, once a few tenths below the floor tiles, door opening!
Thanks for your help on this!
Catacomber. I used a raycast so I could tag all the doors the same to keep my list clean.
I could create separate tags but with 116 rooms, that's a lot of tags!
I am still VERY new at this so appreciate any input and direction that is given. I have never coded or thought of game design until a month ago and had a great idea but no one knew who I was and didn't want to help so I thought I would create a dungeon and learn some Unity myself and be able to talk to people with a bit more knowledge and maybe get my true game created.
(Playing games now take on a whole new meaning knowing some of what goes on etc...)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If there was an easy way to get doors to open then I would use it, but I had this method already working so thought it would be easier.
I'm currently trying to add sound to my prefab player. He has lots of animations attached.
(https://www.assetstore.unity3d.com/en/#!/content/4542)
I thought adding the sound into ORK would allow me to attach it to the prefab but seems a bit more complicated. I tried to follow the youtube video catacomber sent to someone a while ago but it goes into the animation screen details etc and that is more than I needed.
Anyway, thanks for your help, I'm trudging along having fun with the game design stuff, even if I am completely lost and drowning!
What sound(s) are you trying to add to your prefab player?
ORK plays sounds either automatically (e.g. when set up in an ability's status changes it'll be played when they are calculated) or when you use a Play Sound step in an event.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I tried animation and managed to record a door open/close but didn't work right....
I am trying to keep within the ORK framework as much as possible, not using many outside scripts to keep things simpler and easier to ask for help if I don't have to provide 3rd party code.
Just trying to add footsteps to his run. I'll send a link to what I sort of have done, it needs a lot of work I know but I think it looks good for a first timer not having any knowledge of this when I started.