Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity 3D Game Kit Official Thread

Discussion in 'Community Learning & Teaching' started by Aurore, May 9, 2018.

  1. Runemark


    May 23, 2013
    The idea behind the gameplay counter is quite simple.
    • when it receives a game command with the correct interaction type it increments the current count parameter.
    • when the current count value reaches the target count value, the gameplay counter fires the OnTargetReachedSendCommand and the OnTargetReachedSendAction events.
    If you have 3 mobs and a door on the scene, and you want to open the door after all the 3 mobs are slain you should do this:
    • Create a Gameplay Counter. Set the interaction type to whatever you like (for the sake of this example, lets assume you set it to Activate.
    • Add a SendGameCommand to the mobs. Assign the GameplayCounter game object to the Interactive Object field, and set the Interaction Type to the one you set in case of the counter (Activate this case). You can also check the OneShot option, to make sure one mob can't increment the counter multiple times.
    • Navigate to the Damageable component on the mob. Add a new item under the OnDeath part. Drag the previous SendGameCommand component here and select the Send() method from the dropdown.
    At this point, when the mob dies (Damageable.OnDeath), the SendGameCommand component will be triggered, and send the Activation message to the Gameplay Counter.
    • On the Gameplay Counter, the Current Count should be 0. Set Target Count to how many mobs do you have (this case 3).
    • Add a SendGameCommand component to the Gameplay Counter object, and drag this it to the OnTargetReachedSendCommand field. Set the interaction type to whatever you like, it doesn't need to be the same as before.
    • The door game object should have a Simple Translator component. Set the Interaction Type to the same as you did in case of the SendGameCommand, and set the other parameters as your door should work (or leave as it is if you using the door prefabs)
    I hope this helps, if not, ask again! :D
    DaftPuzzler likes this.
  2. espuertaxd


    Sep 5, 2019
    Thank you again for response, i have new problem now, i tried to create trigger cut scenes using movie player now, and i am having an issue because sometimes it doesn't trigger at all, but sometimes it does, if you can give me some tips how to play video using trigger in 3d game kit, it would be a big help. I did tried to search in youtube or google, but those tuts are not suitable in 3d game kit :( thank you anyway, you're saving me!
    Runemark likes this.
  3. slogtenberggdci


    Oct 13, 2019
    Is there a way to use the movements of the navmesh agent control track to record keyframes of the model's position. Or more simply, have the navmesh agent control track and the animation track work together with the Playable Director. I can ether have the animation working but hand tweak the offset to keep the root motion on the ground, or have the navmesh work, but animation need to be turned off. The transform tween track doesn't effect the animation's position and rotation because the animation's offset has all the control. I have to copy each float in the vectors instead of the transform property.

    Any help wound be appreciated.