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 - treborjones

Pages: [1] 2
1
Playmaker Help / Re: Ferr2d and Playmaker
« on: May 22, 2017, 05:51:04 AM »
A codey chum resolved this for me.

First I learnt about Methods and Static Methods, and that Playmaker appeared to only show Methods as an option from the Call Method functionality.

My coder chum then resolved a couple more issues related to World space/Local space.

Here's the snippet just in case anyone else is ever trying to do the same thing.

Code: [Select]
/// <summary>
/// Gets the smallest distance to the provided path
/// </summary>
/// <param name="aPoint">The point to check from.</param>
/// <returns>Smallest distance! float.MaxValue if none found</returns>
public float GetDistanceFromPathDynamic(Vector3 point) {
if (pathVerts.Count <= 1) return float.MaxValue;

Vector3 localPoint = transform.InverseTransformPoint(point);
Vector2 aPoint = new Vector2( localPoint.x, localPoint.y );

float dist  = float.MaxValue;
int   count = closed ? pathVerts.Count : pathVerts.Count-1;
for (int i = 0; i < count; i++)
{
int     next  = (i+1) % pathVerts.Count;
Vector2 pt    = GetClosetPointOnLine(pathVerts[i], pathVerts[next], aPoint, true);
float   tDist = (aPoint - pt).SqrMagnitude();
if (tDist < dist)
dist = tDist;
}
return Mathf.Sqrt(dist);
}

Ta,

Bob.

2
Playmaker Help / Re: Ferr2d and Playmaker
« on: May 22, 2017, 12:34:41 AM »
Here's the link to the ferr2d Unity forum

https://forum.unity3d.com/threads/ferr2d-terrain-tool.204436/page-24

There's not much extra info there, but hoping someone might pipe up soon.

'GetDistanceToPath' doesn't show as a Method to call by default in playmaker. it's just something in the Ferr 2D_path.CS that I noticed and was hoping I might be able to use/access that functionality somehow! My knowledge of using Playmaker in this way is pretty limited. :-)

This is the code in question.

   
Code: [Select]
/// <summary>
    /// Gets the smallest distance to the provided path
    /// </summary>
    /// <param name="aPoint">The point to check from.</param>
    /// <returns>Smallest distance! float.MaxValue if none found</returns>
public static float GetDistanceFromPath(List<Vector2> aPath, Vector2 aPoint, bool aClosed) {
if (aPath.Count <= 1) return float.MaxValue;

float dist  = float.MaxValue;
int   count = aClosed ? aPath.Count : aPath.Count-1;
for (int i = 0; i < count; i++)
{
int     next  = (i+1) % aPath.Count;
Vector2 pt    = GetClosetPointOnLine(aPath[i], aPath[next], aPoint, true);
float   tDist = (aPoint - pt).SqrMagnitude();
if (tDist < dist)
dist = tDist;
}
return Mathf.Sqrt(dist);
}

Cheers!

3
Playmaker Help / Ferr2d and Playmaker
« on: May 20, 2017, 07:25:33 AM »
Hi there!

I'm using Ferr2d and playmaker and wondered if I could use the 'GetdistanceFromPath' functionality in ferr2d. Basically, I want to slow the player down the further away from the spline they are, so need to measure that distance. It might be a Ferr2d question, so have posted on that forum too.

Any help much appreciated!

Cheers,

Bob.

4
Playmaker Help / Re: Data access
« on: April 18, 2017, 03:50:45 AM »
Hmmm, that's a shame, sounds like it'll be a bit too much work for others! :-) Maybe I'd be better off looking at Array maker, I'll do a bit of study around that. Cheers. 

5
Playmaker Help / Data access
« on: April 17, 2017, 06:43:56 AM »
Hey folks, happy easter.

I've used the below system successfully to create a data asset from a google doc.

http://unitylist.com/r/5so/unity-quick-sheet


This spread sheet creates a scrtipableObject asset that lists a bunch of strings and floats that I want to reference for score boundaries on my levels.

The bit that I’m stuck with is how to access this data from playmaker. So when checking a score that the player has just achieved against these values.

So ideally I’d some how reference the current level name against my list of level names, and pull out the floats associated for each star score boundary.

I’ve been looking at Arraymaker and datamaker a little bit but can’t figure out if that’s the way I should be accessing this data or not!

I've attached a screenshot of the data object as I'm not 100% sure i've got all the terminology correct!

Any direction much appreciated.

Cheers,

Bob

6
iOS Help / Re: iOS Build to device error
« on: March 22, 2017, 06:36:39 AM »
Hello again, I found another issue (me being stupid) and this was actually the cause of the game not running successfully.

The errors mentioned are still present but they don't prevent the build to device from running. So lower priority, feel free to let it slide if nobody else is reporting similar problems.


7
iOS Help / Re: iOS Build to device error
« on: March 22, 2017, 05:33:46 AM »
Ok thanks a lot. I'm just trying to build a smaller project to see if I can create repro steps easily for you. If there's anything else I can do to help solve please let me know.

8
iOS Help / Re: iOS Build to device error
« on: March 22, 2017, 12:26:37 AM »
I am using Get and Set properties in a few places. I had built to device a while ago without any problems though, that was on an older unity and playmaker version.

The project has been around for a while and I have fairly recently updated it...

Data version: 1

There are a couple of very similar errors following the one I shared. All in HutongGames.PlayMaker.Actions.IntCompare.

9
iOS Help / iOS Build to device error
« on: March 21, 2017, 02:53:30 PM »
Hi folks,

I'm getting the below error when building to device. It doesn't occur when running in editor. I'm running 5.5.2 and Playmaker 1.8.3

Any help greatly appreciated. I've tried deleting the action and reimporting it but didn't seem to make any difference.

Apologies for large error text!

Error Loading Action: State 1 : HutongGames.PlayMaker.Actions.IntCompare : integer1
System.ArgumentOutOfRangeException: ArgRange_Array
Parameter name: index
  at System.Text.UTF8Encoding.InternalGetCharCount (System.Byte[] bytes, Int32 index, Int32 count, UInt32 leftOverBits, UInt32 leftOverCount, System.Object provider, System.Text.DecoderFallbackBuffer& fallbackBuffer, System.Byte[]& bufferArg, Boolean flush) [0x00021] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/UTF8Encoding.cs:459
  at System.Text.UTF8Encoding.GetCharCount (System.Byte[] bytes, Int32 index, Int32 count) [0x00004] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/UTF8Encoding.cs:687
  at System.Text.Encoding.GetChars (System.Byte[] bytes, Int32 index, Int32 count) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/Encoding.cs:328
  at System.Text.Encoding.GetString (System.Byte[] bytes, Int32 index, Int32 count) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/Encoding.cs:751
  at System.Text.UTF8Encoding.GetString (System.Byte[] bytes, Int32 index, Int32 count) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/UTF8Encoding.cs:1052
  at HutongGames.PlayMaker.FsmUtility.ByteArrayToFsmInt (HutongGames.PlayMaker.Fsm fsm, System.Byte[] bytes, Int32 startIndex, Int32 totalLength) [0x00000] in c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmUtility.cs:401
  at HutongGames.PlayMaker.ActionData.GetFsmInt (HutongGames.PlayMaker.Fsm fsm, Int32 paramIndex) [0x00064] in c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1572
  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, Int32 paramIndex) [0x000e9] in c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1007
  at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.Context context, Int32 actionIndex) [0x00264] in c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:934
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.ActionData:CreateAction(Context, Int32) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ActionData.cs:939)
HutongGames.PlayMaker.ActionData:LoadActions(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ActionData.cs:768)
HutongGames.PlayMaker.FsmState:LoadActions() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:117)
HutongGames.PlayMaker.Fsm:InitData() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1653)
PlayMakerFSM:OnAfterDeserialize() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:1110)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

10
Action Requests / Re: uNet Create Object
« on: June 30, 2016, 09:11:25 AM »
Hey guys, I just wondered if there was any timeline for these unet related actions?

Cheers,

Bob.

11
Playmaker Help / Re: Set sun shafts transform from instansiated object
« on: August 18, 2015, 12:06:05 PM »
I got it in the end. Typing out loud helps sometimes! :-)

Realised that I could use 'Get Owner' to save out the GameObject, then Get Transform on that stored Game object.

12
Playmaker Help / Re: Set sun shafts transform from instansiated object
« on: August 18, 2015, 10:10:54 AM »
Just a bit more info on what I've been trying.

I looked at trying to use the 'Get Transform' action but that didnt allow me to specify 'Use owner', so was taking the transform from the prefab (not desired).

13
Playmaker Help / Set sun shafts transform from instansiated object
« on: August 18, 2015, 10:07:03 AM »
Howdy everyone,

I'm using the sunshafts script but want to set the 'shafts caster' transform to be of an object that's instantiated. How would I go about that? When I look at options from set property it's the only variable thats not available to specify.

My sunshafts script is on my camera which is present in the inital scene.

My sun object is spawned in as part of the level object. It's the position of this sun that I want to define the transform of the sun shafts caster.

Cheers for any help.

Bob.

14
Action Requests / Get World Pose
« on: July 21, 2015, 02:50:41 PM »
Hey peeps, I chucked this message in playmaker help but it doesn't seem that the action exists. I'm looking for an action to cover some of the GetWorldPose functionality. Documented here

http://docs.unity3d.com/ScriptReference/WheelCollider.GetWorldPose.html

If anyone is able to create me an action that uses this to return rotation values from the wheel collider in unity 5 I'd give them a big high five and internet thank you.

Cheers,
Bob.

15
Playmaker Help / Re: Get World Pose
« on: July 20, 2015, 08:40:38 AM »
Its this functionality.

http://docs.unity3d.com/ScriptReference/WheelCollider.GetWorldPose.html

Just wondered if it was usable as a custom action, I'm not quite skilled enough to turn it into one myself. :-)

Pages: [1] 2