playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tcmeric

Pages: 1 ... 30 31 [32] 33 34 ... 45
466
Share New Actions / Re: VRTK Actions
« on: April 27, 2017, 04:56:29 AM »
Snap zone actions have been added.

(Gets the gameobject leaving or entering the snap zones.)
ObjectEnteredSnapDropZone.cs
ObjectExitedSnapDropZone.cs
ObjectSnappedToSnapDropZone.cs
ObjectUnsnappedToSnapDropZone.cs


(Sets snap zone properties)
SetSnapDropZoneHighlight.cs   
SetSnapDropZoneHighlightActive.cs   
SetSnapDropZoneObjectOutline.cs   
SetSnapDropZoneScaling.cs   
SetSnapDropZoneSnapDuration.cs   
SetSnapDropZoneSnapType.cs
SetSnapDropZoneValidObjectList.cs

These work with the example scene in VRTK 041_Controller_ObjectSnappingToDropZones

467
VR Help / Re: Need help with a type of action for HTC Vive
« on: April 27, 2017, 04:54:06 AM »
Just continuation of this thread. I created a few playmaker actions for snapping.

(Gets the gameobject leaving or entering the snap zones.)
ObjectEnteredSnapDropZone.cs
ObjectExitedSnapDropZone.cs
ObjectSnappedToSnapDropZone.cs
ObjectUnsnappedToSnapDropZone.cs


(Sets snap zone properties)
SetSnapDropZoneHighlight.cs   
SetSnapDropZoneHighlightActive.cs   
SetSnapDropZoneObjectOutline.cs   
SetSnapDropZoneScaling.cs   
SetSnapDropZoneSnapDuration.cs   
SetSnapDropZoneSnapType.cs
SetSnapDropZoneValidObjectList.cs   

No tutorial yet, but works with the example scene in VRTK.

468
Hi. They can be downloaded from my github account. Not on the ecosystem.

469
Why the need for the colider on the the switch? You are grabbing and pulling the switch down right? If so, it should be activated until you are able to grab it anyways (therefore why the need for the extra detection of the controller entering its space?).

470
Glad you got it worked out  :)

471
Playmaker Help / Re: Changing a gradient value.
« on: April 25, 2017, 10:13:52 PM »
I am not sure if this is why, but playmaker (at least in custom code), does not support gradients. It casts from FSMobject to gradient I believe. So maybe this is why it cannot change the gradient with a get/set value. The get/set method while handy, doesnt always work. You may need to write a custom script in this case to manage the color gradient field.

472
Playmaker Help / Custom Action - Either or Component
« on: April 25, 2017, 11:07:49 AM »
I have a playmaker action that could be for 1 of 2 different component (scripts). In this case

1. textmeshpro
2. textmeshpro UGUI

My script does a simple check and then runs the nessesary function if/else the script is attached (I will improve this with an error check after, and use if, if else, else).

However, the problem is that

A. Its ugly. Is there a better way to do this? If else is ok, but I feel I am doing too much code in the if else?

For void update(), I need to do the check again? (for everyframe options).

Any ideas?

Code: [Select]
// (c) Eric Vander Wal, 2017 All rights reserved.
// Custom Action by DumbGameDev
// www.dumbgamedev.com

using UnityEngine;
using TMPro;

namespace HutongGames.PlayMaker.Actions
{
    [ActionCategory("TextMesh Pro Basic")]
    [Tooltip("Set Text Mesh Pro Text.")]

public class  setTextmeshProText : FsmStateAction
{
[RequiredField]
[Tooltip("Textmesh Pro component is required.")]
public FsmOwnerDefault gameObject;

[RequiredField]
[UIHint(UIHint.TextArea)]
[TitleAttribute("Textmesh Pro Text")]
[Tooltip("The text for Textmesh Pro.")]
public FsmString textString;

[Tooltip("Check this box to preform this action every frame.")]
public FsmBool everyFrame;

// for textmesh pro
TextMeshPro meshproScript;
// for textmesh pro UGUI
TextMeshProUGUI meshproUguiScript;

public override void Reset()
{

gameObject = null;
textString = null;
everyFrame = false;
}

public override void OnEnter()
{
var go = Fsm.GetOwnerDefaultTarget(gameObject);

TextMeshPro tmp = go.GetComponent<TextMeshPro>();

// if textmesh pro normal script attached, do this
if (tmp != null)
{
Debug.Log("TextMesh Pro Script Attached");
meshproScript = go.GetComponent<TextMeshPro>();

if (!everyFrame.Value)
{
DoMeshChange();
Finish();
}

}

// if textmesh pro Ugui is attached
else
{
Debug.Log ("TextMesh Pro UGUI Script Attached");
meshproUguiScript = go.GetComponent<TextMeshProUGUI>();

if (!everyFrame.Value)
{
DoMeshChangeUgui();
Finish();
}
}

}


// textmesh pro normal script
void DoMeshChange()
{
var go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go == null)
{
return;
}

meshproScript.text = textString.Value;
}


// textmesh pro ugui script
void DoMeshChangeUgui()
{
var go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go == null)
{
return;
}

meshproUguiScript.text = textString.Value;
}

}
}

473
Playmaker Help / Re: Move To with Mouse Click
« on: April 25, 2017, 04:12:34 AM »
No problem. I was working on it myself for my own project. Hopefully this video should help.

In this playmaker tutorial I show how to create clickable objects to select and then click a second time on the screen to move to this new location.

We also look at:
- movement with or without navmesh
- mouse over/exit/click/unclick sound effects or color effects
- how to limit click destination selections
- send events over more than one fsm
- how to use this with one or many game objects
(second half of tutorial talks about navmesh movement)

Join us on slack for chat: https://invite-playmaker-slack.herokuapp.com
Link to Ecosystem Download: https://hutonggames.fogbugz.com/default.asp?W1181

https://www.youtube.com/watch?v=iM_5Ma7hSC4

474
Playmaker Help / Re: How Do I Add A Countdown?
« on: April 25, 2017, 12:42:18 AM »
There is an action on the ecosystem called timer or countdown timer. I forget which one. You can download the ecosystem add on here. https://hutonggames.fogbugz.com/default.asp?W1181

It allows you to search for all kinds of more actions to download for playmaker from inside of unity in the playmaker top menu.

475
Playmaker Help / Re: Detecting Fast 2d Triggers [SOLVED]
« on: April 25, 2017, 12:40:06 AM »
Thanks, I am interested to see what you change, because I didnt know how to do that.

476
Playmaker Help / Re: Move To with Mouse Click
« on: April 25, 2017, 12:22:41 AM »
I am actually working on a tutorial for this. Or pretty darn similar (enough that you could get the solution). I am using a similar mechanic in my game. In mine, I click on a character (could be an object). It then selects the object. Then I click on the screen and it goes to that location (rather than to a specific object). My game has various characters, so you can choose which one you want to move in this fashion.

Mine also has a different state for hover over (like highlight object), one for click (like a special sound for clicking on something you can move).

Ill likely be done in a day or two. I can post here when finished if you would like.

477
Can you refresh my memory. What is the time in the video that I did that (so i can have a look).

When you hit play, is the VRTK controller still in your hierarchy? Can you send some screenshots of the your FSM? And a screenshot of your controllers scripts that it has attached?

478
Playmaker Help / Re: constant int increment while boolean is true
« on: April 24, 2017, 08:41:39 PM »
You can do it like so  :)
Very simple system like this. If you wanted minutes, hours, days, you could set that up in playmaker too. However, it might be easier to write a custom action. Send me your exact c# code if you want, and I can make you a custom action.

479
VR Help / Re: Steam VR Playmaker Toolkit - Help Board [VIVE]
« on: April 24, 2017, 08:46:49 AM »
Great, thanks!

480
Cool, no problem.

I have been working on the VRTK snap zone actions. Just about finished. All written, just need to clean up my code and document it. After that, I will add it to github and make a video for it.

Pages: 1 ... 30 31 [32] 33 34 ... 45