edited November 2015 in ORK Support
Hi,

I am currently working on a location based game in combination with a RolePlayGame.
So I decided to use some plugins from the asset strore from unity.

The first one for GPS/Maps (as my world): "Online Maps" --> displays a map at specific longitude/latitude coords, and also supports marker creation (like google maps marker) see: https://www.assetstore.unity3d.com/en/#!/content/13261 for more infos.
And for the RPG part: The ORK Framework (atm free version)

My problem is related to the spawning player mechanism of ORK framework.

I want my Player (and all combatants/items/etc.) to be (spawned as?) a marker on the map (3D marker are supported due prefabs).
A marker can be generated by scripts during runtime (with longitude/latitude coordinates)

So, now the question is, how can I combine the "Spawning Player Event" ("StartEvent" as described in your Tutorials) with the generated marker.

The best solution for me, would be spawning the player (and others) as a 3D marker. Is that somehow possible with scripting in the ORK framework code.

With the free version I don't have access to the gameplay related source code, but if I would buy, is there a possibility to script that?

I hope I explained my problem in a way that you understand (maybe hard if you do not know the Online Maps plugin :) )

Thank you,

Dominik

Post edited by widnig89 on
  • Is that somehow possible with scripting in the ORK framework code.
    ...and to be more detailed: Is the code available (in the Full-Version) which is related to the spawning mechanism.
  • While you can change that in the full version's code, you should be able to do this without script changes if you're able to use prefabs for your markers.

    E.g. you can use a game object in your scene as player using the Set Player step.
    Or, you could add autostart events to your prefabs, setting the object spawned by ORK to your the GPS position you want for your marker - or just write a small script doing that and attach it to the prefabs :)
    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!
  • edited June 2015
    hi, thanks for the fast response. :)
    you can use a game object in your scene as player using the Set Player step
    I am not really sure, whether I use Set Player properly.
    Maybe I have missed an tutorial, I could only find a related one: Game tutorial: 4. Interacting with the world (where Actors are used)

    In the NodeEditor I use:
    1. Event Settings - Node:
    -Add Actor
    --Type: Player

    2. Add Combatant
    -Object: Actor
    -Actor: 0:Player
    -Combatant 0:Hero
    -Set Level: Player (instead of Default?)

    3.Join Active Group
    Use Actor: yes
    Actor: 0:Player

    4.Set Player
    Use Actor: yes
    Actor: 0:Player

    And my prefab (which is the Brown Pant gets an Event Interaction with that Eventfile. Start type: Autostart

    Do I make something wrong SetPlayer Image? Because I cannot move the brown pants object (see screenshot).
    And I can also not see the attached Combatant Component (Script) to my Brown Pant or Button Player Controller. For sure I forgot something :)

    Thank you for any advice.
    Post edited by widnig89 on
  • That's not quite it.

    You need to use a game object actor type - the player can't be used, because you don't have a player yet (and you want to set the player's game object to your marker).
    Using the game object allows you to either search for a game object (through name/tag) or select it in the event interaction's inspector.

    The event would be similar to the one used in the game tutorials, i.e.:
    - join active group step
    - set player step (instead of spawn 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!
  • Hey,

    I had first problems understanding what you mean with game object actor type, but now I get it (I think) :)

    but still have the same problem. let me explain my current situation:

    When I press "New Game", I am forwarded to my world-scene. In this scene I have an Empty Game Object called "Add Player Script". This scripts add the Brown Pants Prefab as a 3D Marker to the Map (also a GameObject) as a child object. The mechanism behind that, is that the prefab only gets cloned and a Marker-script is attached.

    The "Add Player Script"-Object has also an Event Interaction, with the setPlayer Event File. (autostart)

    This Event File has (as you described above) the following nodes (attributes):

    1. Event Settings
    - Actor 0:
    --Type: Object
    --Find Object: yes
    --Search Type: Tag
    --Search Name: Player (my generated Marker is also tagged as Player)
    -Name Settings:
    --Set Name: yes
    --English: MyHero

    2.Join Active Group
    -Use Actor: yes
    -Actor: 0:MyHero

    3.Set Player
    -Use Actor: yes
    Actor: 0:MyHero


    So, this is the configuration and its not working :D

    I am sorry, I am really new to this Engine, and have general problems understanding the relation between actors and combatants.

    Thanks again.
  • Ok, I have the solution now :)

    Between Node 1. and Node 2. there has to be 1 more node:

    -Add Combatant:
    --Object: Actor
    --Actor: 0:MyHero
    ...
    --Combatant: 0:Hero

    Thanks.


  • If you're actually just spawning a prefab yourself, why can't you let ORK handle that as intended?
    You can add components to your prefab, or use the Player Component Settings in Base/Control > Game Controls to attach components to the player when spawned.
    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!
  • Hi,
    sorry that I didn't respond sooner.

    yes at the beginning I thought the same, but the API of online maps didn't give me an appropriate interface for that,...

    Now I reported a feature request: They agreed and they inserted it in the latest beta version. It is now possible to spawn a player at the longitude/latitude coordinates of the map and it makes using ork a lot easier :)

    I will keep this in mind with the Player Component Settings, that is also a very useful feature for my game.

    Thank you.
Sign In or Register to comment.