edited March 2014 in ORK Support
Hi,
I don't know if you can help with this. I'm using playmaker and uscript visual scripting to make my project, and I'm having some difficulty referring to objects that are spawned. For instance, I'm making a 2D Action RPG, and I want my enemies to chase my player. I tried it using the Ork Framework movement AI, but that is more for 3D games, and there were some problems. So I've been moving my enemies with playmaker and uscript. When I place my player and enemies in the scene, I have no problems, and the objects move as they should. But when I try to use spawned objects, which I need to do to access Ork Framework's features, it doesn't work.

If I tell the enemy to follow the character prefab, but it doesn't find it during the scene because it's not the same -- it's a clone. So it doesn't chase it. In fact, when the enemy is spawned as well, it doesn't move at all, so it's not being referred to as it is a clone as well.

Is there any solution to this? Perhaps I can link something in the scene to the spawned prefab and have it as a child or something...? I'm not sure...

Thanks for your time.
Post edited by mattsnee on
  • edited March 2014
    You'll need to find a way in playmaker/uscript to target an instantiated gameobject (ie the Player object), after the scene has been loaded and the target has been spawned; I don't believe there's any way around that. It's just how instantiated clones work, I'm sure it's a subject that's come up in the playmaker forums.
    Post edited by Kirb on
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • yeah that's what it seems like, I'll look it up. I'm sure I'm not the first person to have this problem. Frustrating though.

    By the way, your game looks great, Kirb!
  • Thank you, kind sir.

    It is frustrating, I remember having to deal with it way back in early ORK2 beta when I had to implement my 2D camera. I managed through some very hacky, designer-y scripting that would make any proper coder groan, but it works well enough. :)
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • well, your game looks great. I look forward to playing it.

    And I went to the uscript and playmaker forums and figured this out. Thanks for your help!
Sign In or Register to comment.