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
General Discussion / Re: How to rename global variables?
« on: October 07, 2018, 02:40:02 AM »
Hi folks, reading through some of this has come as a bit of a surprise to me! My projects currently make fairly heavy use of Global Variables, so.... eeeek! :-)

What's their major flaw? Anyone have any information regarding the level of impact heavy use (20-30 global variables) might have on performance? Obviously it probably depends on how they're used buy any info welcome.

Basically I'm trying to figure out if I should refactor to the metadata type setup suggested.

Playmaker Help / Re: Invoke Method for Trail Renderer[SOLVED]
« on: November 27, 2017, 04:24:44 AM »
Yep, that seems to be working for me! Thanks! I owe you a pint when you're next in London! :-)

Playmaker Help / Invoke Method for Trail Renderer[SOLVED]
« on: November 26, 2017, 01:16:13 PM »
Hi there folks,

I'm trying to access TrailRenderer.GetPosition through InvokeMethod but not having much joy.

For invoke method TrailRenderer doesn't show up as a not sure what the next step is.

I've been looking at Call Method as well but can't figure out how to get the TrailRenderer in as the behaviour/object there.

Any pointers much appreciated. If i'm barking up the wrong tree then please let me know! :-)   



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);



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

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);


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!



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. 

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.

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.



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.

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.

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.

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

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?



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.

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).

Pages: [1] 2