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 ... 47 48 [49] 50
721
PlayMaker Help / Re: create game object -- sprite
« on: February 23, 2017, 11:04:19 AM »
If the gameobject is in the hierarchy, then it is the scene somewhere, unless the game object is deactivated. Play the game and then pause it after you shoot. Click on the bullet on the hierarchy and click the F key to focus on it. Or try and see where it is by xyz location. Maybe its behind something? Make sure the game object is activated

722
PlayMaker Help / Re: How to Set FsmEnum Type in Custom Action? [Solved]
« on: February 23, 2017, 06:52:51 AM »
Very cool!  8)  8)  8)

723
PlayMaker Help / Re: Acessing another script with Playmaker
« on: February 23, 2017, 06:02:25 AM »
Which asset are you using specifically?

If the asset is a script on an object, you could disable the object when you run out of bullets (so no more decals are created). The action is "activate game object". You can then re-activate the game object with the script using playmaker when the gun is reloaded.

724
PlayMaker Help / Re: Get Object Rotations Over 360
« on: February 23, 2017, 05:57:23 AM »
Thanks Jean. Ill see what I can figure out.

725
PlayMaker Help / How to Set FsmEnum Type in Custom Action?
« on: February 23, 2017, 05:56:31 AM »
Hi,

How can I set the enum type in a custom action?

I can set the enum variable like this:
Quote
public FsmEnum Enum;

But in the playmaker inspector, I get "Enum Type" set to none. I would like to set the type.

Sorry I searched the forums and could not find an answer or an example in the actions in playmaker. Very cool we can use Enum in playmaker. Handy.


726
Action Requests / Re: NewtonVR Integration
« on: February 23, 2017, 03:19:35 AM »
Here is a tutorial by VRTK about how to use the two together:

727
PlayMaker Help / Re: Get Object Rotations Over 360
« on: February 23, 2017, 02:08:30 AM »
No problem.

Playmaker says:
Action: Get Rotation (from game object)
Y Rotation = 40

Inspector Says:
Game Object
Actual Y Rotation = 400


The playmaker action get rotation goes from 0 - 360, and then starts again at 0 after passing 360.



I would like to perform some math equations on the actual rotation, so I need to the real actual number in playmaker (400, not 40).

728
PlayMaker Help / Re: Support for FsmUshort
« on: February 23, 2017, 01:31:03 AM »
Opps, maybe I sent it to your email by mistake. I sent a PM this time (I think  ;D )

729
PlayMaker Help / Re: Support for FsmUshort
« on: February 22, 2017, 09:22:04 PM »
Perfect, thank you for your help. I spent more time reading about implicit and explicit casting. Your solution worked and helped point me in the right direction to learn more!

I sent you a PM regarding the serialized field.

730
Share New Actions / Re: VRTK Actions
« on: February 21, 2017, 07:50:26 PM »
Is there anything in particular that you need? Are you using the latest github version?

Anyways, it will take awhile to get through it, but little by little.  8)

731
PlayMaker Help / Re: Get Object Rotations Over 360
« on: February 21, 2017, 05:36:19 AM »
I am going to bump this. Maybe there is no current playmaker actions to address this issue? Or maybe I am just overlooking a math issue that I am not aware of. Thank you.

732
Action Requests / Re: NewtonVR Integration
« on: February 21, 2017, 05:21:21 AM »
So how much cross over is there between VRTK and NewtonVR. Seems alot, no? I dont see anything it offers that VRTK doesnt.

Anyways, I have started to create playmaker actions for VRTK if you are interested. Because the VRTK community is so active, it is a bit of a moving target. Also, it is a HUGE package. I just started this week. Ill keep working at it little by little. (Expect me to annoy the forum with custom action questions, sorry).

Its available on my github for free: https://github.com/dumbgamedev

The 3x version matches the VRTK github version (which should hit the unity asset store in a bit). That is where I will concentrate my efforts.

733
Share New Actions / Re: VRWeapons Actions for SteamVR Weapons
« on: February 21, 2017, 05:15:12 AM »
Oh, and here is the link to the asset. It is top notch. IMHO the best VR weapons package out there at the moment (and the only one with playmaker actions  8) )

https://www.assetstore.unity3d.com/en/#!/content/66387

734
Share New Actions / VRWeapons Actions for SteamVR Weapons
« on: February 21, 2017, 05:13:26 AM »
I have created a set of playmaker actions for the VRweapons asset on the unity store. I am not the creator of this assets package, but I do use it myself. So, I decided to create some actions for it.

You can download it for free here on Github. This works with VRweapons version 1.18. A new version is expected soon. I am working with the asset creator to update the actions to the newest version when it comes out on the unity store. My playmaker actions for the newest version will become available on the unity store (free) and also on github.

Enjoy and please feel free to leave any comments, questions or concerns below.

https://github.com/dumbgamedev/VRweapons_Playmaker

735
PlayMaker Help / Re: Support for FsmUshort
« on: February 21, 2017, 04:50:37 AM »
Hi,

Thank you for the reply. I am basically just setting up a custom action which sets playmaker FsmVariables to script variables. It is for the VRweapons package on the asset store that allows quick building of weapons for steam VR. The playmaker actions will be release for free (I am not the author of the asset but have their permission).

In the Weapons.cs script, it is written this way:
Quote
[Range(0, 0.2f)]
public float bulletSpreadRange;
public float kickStrength;
public float rotKickStrength;
public ushort hapticStrength;
etc etc.

My script is basically the template from MdotStrange, which works otherwise. I was hoping I could dump the ushort into a float. I have never done a variable type conversion. I have done some reading up on it, but havent figured it out yet.

Quote

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
   [ActionCategory("VRweapons")]
   [Tooltip("Adjust weapon haptic time per shot in frames for VRweapons script on an object")]

   // the class must match the name of the action
   // if the action is named missleAction then that should be the name of the class
   public class  WeaponHapticAction : FsmStateAction
   {
      [RequiredField]
      // add the name of your script inside of typeof("yourScriptName"))
      [CheckForComponent(typeof(Weapon))]   

      // this is the game object the script is on
      public FsmOwnerDefault gameObject;

      [Tooltip("Adjust weapon haptic time per shot in frames.")]
      // add the variables you want in your action
      public FsmFloat HapticStre;

      // you can usually leave this alone
      public FsmBool everyFrame;

      // you are making a custom variable with the scripts type
      Weapon theScript;

      public override void Reset()
      {
         //its good practice to set your var to null at start
         gameObject = null;
         HapticStre = null;
         everyFrame = false;
      }

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

         // you are grabbing the script from the game object and storing it in your custom variable type
         theScript = go.GetComponent<Weapon>();

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

      }

      public override void OnUpdate()
      {
         if (everyFrame.Value)
         {
            MakeItSo();
         }
      }

      //Name your method here
      void MakeItSo()
      {
         var go = Fsm.GetOwnerDefaultTarget(gameObject);
         if (go == null)
         {
            return;
         }

         //Playmaker variable to Script

         theScript.hapticStrength = HapticStre.Value;

         //Note! Playmaker var's need .Value after them or they won't work in some cases


      }

   }
}


Also can I ask, is there any way to get variables from serialized fields from a script into playmaker? I tried the same script above (changed for floats), but i get an error about them being read only.

Script.cs

Quote
   [SerializeField]
   float maxHealth = 100f;
   [SerializeField]
   float currentHealth;

Pages: 1 ... 47 48 [49] 50