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.

Topics - krmko

Pages: [1] 2 3 ... 7
Hi guys, is this even possible? I need to put the break in the built string so i can display it in multiple lines via textmeshpro.

Hi guys,

the title is self explanatory, i'm trying to attach the object at the point of impact with the collider of another object, but whatever setting or combination of settings i use (world position stays, reset local position) child ends up childed at the center of the parent object.

Is it a faulty action or am i missing something?

EDIT: I solved it by geting the position before the impact and seting the world position after the parenting so it looks and works good, but action should definitely be looked into, world position stays doesn't work.

Hi all,

i'm trying to find a solution for rotating some missiles towards direction.

After they're being fired they are moved using translate with no set target. I'm not using velocity so i can't get the direction with velocity data (it's 0,0 since i'm translating the missiles), and i don't know how can i get the direction every frame to apply the rotation by using some other method.

All ideas except "move them using velocity" are welcome  ;D

Edit: of course, the child will be rotating so it doesn't affect the movement.

Hi guys,

i have an identical FSM in all of my enemy prefabs that adds a number (int) to an arraylist when the enemy enters the screen, and removes an item when the enemy goes out of the screen. It works flawlessly except on one prefab that reports an "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" error.

I don't get it, it's a completely same action (array list add) with completely same parameters on all objects.

Any ideas?

Hi guys, here's what's going on. I use Get Key Code to String to get keyboard input and store it into string. Works perfect when i store it into local variable, but whenever i try to set it into global variable it does not work.

- I tried saving it to local variable, then to global from that local variable, nothing
- I tried buidling the string from local variable into another local variable and then try setting the global variable, nothing
- Splitting everything into multiple states, nothing

No errors are being reported, it just doesn't work.

Unity 2018.3.7f, Playmaker 1.9.1b4

PlayMaker Help / Cycling through resolutions in array list [SOLVED]
« on: February 18, 2019, 12:42:16 AM »
Hi guys,

when i fire up the game, i get the screen height and width and save it into vector3 as a current resolution variable, which is then set as a string that will show up in the video menu when i go into it. Now, i've got a vector3 arraylist of resolutions, how can i iterate through the array by using the current resolution as an index that will be used as a pointer to get next or previous resolution from the array?

PlayMaker Help / Create object advanced action issue [SOLVED]
« on: February 09, 2019, 09:25:02 AM »
Whatever i do, objects are being instantiated at z=1 position. Prefabs have z=0, they do not instantiate parented, object that instantiates them is at z=0.

Settings are world position stays = checked, set active = checked. I tried overriding  the position with z=-1, but it still spawns at z=1.

Any ideas?

PlayMaker Help / Question about FsmVar
« on: February 04, 2019, 12:11:25 PM »
Hi guys,

I have an issue, but i need to know how some things work to know how to solve it.

I'm using get array list random to get a random GameObject from array list. Now, when  i instantiate that object with Create Object Advanced it's ok, but when i use Core Game Kit and set the GameObject to spawn it spawns the wrong thing.

I suppose FsmVar is changeable variable that sets its type depending on the type of variable in the action by using PlayMakerUtils.ApplyValueToFsmVar, but why doesn't it work in things like Core Game Kit?

I'll dig up the code to the action of CGK to see how it's handled there, but isn't FsmVar automatically converted to GameObject variable in the Get Array List Random action?

Any ideas what does this mean? It appears as an error for array maker proxy and it does not cause any trouble, but it's annoying and i want to know what's going on.

Code: [Select]
ArgumentException: At least one object must implement IComparable.
System.Collections.Comparer.Compare (System.Object a, System.Object b) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array+SorterObjectArray.SwapIfGreaterWithItems (System.Int32 a, System.Int32 b) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array+SorterObjectArray.PickPivotAndPartition (System.Int32 lo, System.Int32 hi) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array+SorterObjectArray.IntroSort (System.Int32 lo, System.Int32 hi, System.Int32 depthLimit) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array+SorterObjectArray.IntrospectiveSort (System.Int32 left, System.Int32 length) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
Rethrow as InvalidOperationException: Failed to compare two elements in the array.
System.Array+SorterObjectArray.IntrospectiveSort (System.Int32 left, System.Int32 length) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array+SorterObjectArray.Sort (System.Int32 left, System.Int32 length) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array.SortImpl (System.Array keys, System.Array items, System.Int32 index, System.Int32 length, System.Collections.IComparer comparer) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array.Sort (System.Array keys, System.Array items, System.Int32 index, System.Int32 length, System.Collections.IComparer comparer) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Array.Sort (System.Array array, System.Int32 index, System.Int32 length, System.Collections.IComparer comparer) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Collections.ArrayList.Sort (System.Int32 index, System.Int32 count, System.Collections.IComparer comparer) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Collections.ArrayList.Sort () (at <ac823e2bb42b41bda67924a45a0173c3>:0)
HutongGames.PlayMaker.Actions.ArrayListDeleteDuplicates.ArrayDelete () (at Assets/PlayMaker Custom Actions/ArrayMaker/ArrayListDeleteDuplicates.cs:248)
HutongGames.PlayMaker.Actions.ArrayListDeleteDuplicates.doesArrayListContainsCount () (at Assets/PlayMaker Custom Actions/ArrayMaker/ArrayListDeleteDuplicates.cs:102)
HutongGames.PlayMaker.Actions.ArrayListDeleteDuplicates.OnEnter () (at Assets/PlayMaker Custom Actions/ArrayMaker/ArrayListDeleteDuplicates.cs:67)
HutongGames.PlayMaker.FsmState.ActivateActions (System.Int32 startIndex) (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState.CheckAllActionsFinished () (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:572)
HutongGames.PlayMaker.FsmState.OnUpdate () (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:268)
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2808)
HutongGames.PlayMaker.Fsm.Update () (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2009)
PlayMakerFSM.Update () (at C:/Projects/Playmaker_merge/playmaker_unity/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:579)

PlayMaker Help / Stop multiple weapons from firing at the same time
« on: November 29, 2018, 12:51:38 PM »
I'm going bald from this, someone please help  ;D

I have three weapons, each starts firing by pressing x, y, z, so i'll call them like that, weapon x, weapon y and weapon z.

I made a neat little fsm for controlling weapons, so when i'm firing with x, let go of the button and press y, weapons switch and y starts firing.

However, to do that, i needed to put get key y, z to state where x is firing, get key, x, z when y is firing and get key x, y when z is firing so weapons can switch without the need for letting go of the buttons.

But the problem is that multiple weapons can fire simultaneously that way and i don't want that, i want only one weapon to fire at a time.

I can solve this by putting mid state in which you enter when you let go of the firing key x, y or z and the you press the button you want, but it's too slow and most of the player actually hit the button for firing the new weapon while they are still holding the button for firing the last one.


If i recall, i used to be able to sort the array list and remove the duplicates and then simply copy/paste the values to the array list to keep it nice and tidy. Unfortunately, that doesn't work anymore.

Any ideas how to handle this problem?

I'm on latest unity beta and latest playmaker beta.

Hi guys,

i don't know if anyone's using the Simple Waypoint System plugin (i heartly recommend it), but i have an issue with one of the actions. Apparently, by popular demand, instead of choosing the game object that should receive the event by referencing the game object/fsm variable, it is a drag and drop field for the game object instance, which is silly and cannot be used properly.

Here's the code, it's quite small:

Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using SWS;

//implements a PlayMaker FSM method call via event insert
namespace HutongGames.PlayMaker.Actions
    [ActionCategory("Simple Waypoint System")]
    [Tooltip("Adds an event to a walker object for calling your own FSM state at waypoints.")]
    public class SWS_AddEventAtWaypoint : FsmStateAction
        [Tooltip("Walker object")]
        public FsmOwnerDefault walkerObject;

        [Tooltip("Waypoint index")]
        public FsmInt wpIndex;

        [Tooltip("Receiver with the FSM event")]
        public PlayMakerFSM fsmReceiver;

        [Tooltip("Receiver FSM event to call")]
        public FsmString fsmEvent;

        public override void Reset()
            walkerObject = null;
            wpIndex = null;
            fsmReceiver = null;
            fsmEvent = null;


        public override void OnEnter()


        void Execute()
            var go = Fsm.GetOwnerDefaultTarget(walkerObject);
            if (go == null) return;

            List<UnityEvent> events = null;

            splineMove spline = go.GetComponentInChildren<splineMove>();
            if (spline)
                events =;
                navMove nav = go.GetComponentInChildren<navMove>();
                if (nav)
                    events =;

            UnityEvent myEvent = events[wpIndex.Value];
            myEvent.AddListener(delegate { fsmReceiver.SendEvent(fsmEvent.Value); });


This is the culprit: 

[Tooltip("Receiver with the FSM event")]
public PlayMakerFSM fsmReceiver

I tried messing around by trying to insert stuff from send event action, but i'm not quite good with Playmaker API, i'd appreciate some help :)

PlayMaker Help / Asteroids game - problem with movement [SOLVED]
« on: October 29, 2018, 05:31:50 AM »
Hi guys,

i'm playing around a bit with this Asteroid game tutorial ( and i'm doing everything i should in it, but my movement is still not good.

This is how the setup looks from the tutorial video.

And this is what i get, the force is constantly applied upward instead of forward.

Any ideas? I suppose it's a quick fix for someone who knows what he's doing, i'm not so good with vectors and force.

PlayMaker Help / Get Next Child Or Set Parent Not Working Properly
« on: October 15, 2018, 08:28:56 AM »
I've got a simple FSM consisting of:

1. Get next child, store it under 'child'.
2. Set parent of 'child' to none.

Repeat until all children are detached.

But, of 7 objects i have childred, not all are being detached. Any ideas? Seems like a bug.

Good old dumb find child/set parent to none works, this somehow fails.

Unity 2018.3b5

I played with FlowCanvas and Bolt a bit lately, there's a neat thing that Playmaker doesn't have and which is useful.

In both of those solutions, when you click on the transition, draw the arrow from it and don't connect it to an existing state but release the button while on empty space in graph, it creates an empty state and automatically connects to it.

A nice bonus would be to automatically select the state name so you can it type in the name as soon as the state is created.

Pages: [1] 2 3 ... 7