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!)
  • edited November 2015
    So your basic problem is that your script on your player that checks doors and whether to open them or not doesn't work after the first door?

    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?
    Post edited by Catacomber on
  • Most likely something is blocking the raycast from hitting the door - when it's not working, pause the game and check the space between player and door for colliders that could block it.
    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!
  • Unity version 5.2.2f1
    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...)
  • (You can mark this as solved...)
  • edited November 2015
    Well, you can do this with ORK's event system (or Scene Changers) as well, which will also take care of spawning the player for you, as well as fading the screen, etc. :)
    Post edited by gamingislove on
    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!
  • I still do not understand ORK enough to work with the event system without direction.
    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!
  • edited November 2015
    There's a tutorial on opening doors that works for a lot of things like lowering gates. It works perfectly for me. I can open or close them using switches or pressure plates or any and all of the old tried and true rpg means. Did you look,at that? It's really very easy to use. If you have questions I can probably help you.

    What sound(s) are you trying to add to your prefab player?
    Post edited by Catacomber on
  • See the gameplay tutorials on automatic doors or removing walls for examples for moving a door (you can alternatively also play an animation on them instead of moving them). To change the scene, just use a Load Scene step.

    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.
    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!
  • I currently just have the door rotate by 90 or -90 depending on the location (they all use the same script). It looks like the automatic/raise door is just a change of position, which will work for the trap I have planned in the room with gold cube (touch the cube a gate slams down, do a strength check and raise gate if high enough), but the regular doors need to rotate, is there a set for that?
    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.
  • I answered your pm. It looks very good. These things are solvable.
Sign In or Register to comment.