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

Feature Requests / Improved prefab workflow support
« on: September 21, 2018, 12:36:55 PM »
Hi guys,

since 2018.3 is finally out, i got to delve a bit deeper into whole improved prefab workflow. When you edit the FSM on the object in the scene you will get the usual "Editing the FSM can disconnect if from the Prefab FSM" dialogue.

Now, when you click EDIT PREFAB, graph view of the FSM will open, the Prefab highlighted in the project view, but you won't be actually editing the Prefab but the INSTANCE since the prefab is not opened, as shown in the screenshot.

I guess you'll get to it eventually, just wanted to let you know.

Feature Requests / Copy multiple variables
« on: September 21, 2018, 12:29:16 PM »
Hi guys, i just noticed that i'm unable to copy multiple variables from one FSM to paste them to another. I can only copy then paste one by one. Not that i need it that much since now is the first time i even noticed it, but it seems to me that it is kind of counterintuitive or accidentally overlooked since you can copy multiple actions or states, but not variables.


Playmaker Help / Friendly reminder to everyone using Unity 2018.3 beta
« on: September 21, 2018, 04:20:30 AM »
Nested prefabs are truly great and i believe many of you have probably started using the new beta. I had a lot of trouble with crashes and instability, and even when i got rid off all the errors, warnings, unused scripts, bad references and so on, the problem persisted, so i thought the problem may be in Playmaker.

It isn't.

Set Scripting Runtime Version to .net 4.x and you're good to go.


Playmaker Help / HashTable Proxy not found for reference <XYZ>
« on: September 19, 2018, 07:45:14 AM »
Hey guys,

this sort of things are really frustrating, i've got hashtable get many in some FSM which points to a nonexistant hashtable, but that's all i get. Debug window inside graph view also shows no data of it. Does the pointer has to be inside an action for it to point to FSM that has a null reference, or is it some other internal problem?

Action Requests / Get Sprite[SOLVED]
« on: August 30, 2018, 09:21:38 AM »

could we get a get sprite action? Getting a texture and saving it as sprite is a bit cumbersome, and i'm not quite sure how to store sprites to do it myself, playmaker documentation is empty on that -_-

Of course, i'm trying to avoid that dreaded get property.

Is FsmSprite[] a thing yet?

Playmaker Help / Get Animator State Last Frame[Solved]
« on: August 10, 2018, 05:51:43 AM »
Hey guys, i'm rigging animations for my game, and i'm having some troubles with the Animator.

For every weapon switching in the game i've got an animation of old weapon going in the ship, and the animation for new weapon coming out of the ship. So that's two animations.

Of course, i don't want the player to be able to shoot when the weapon is pulling in/drawing out, so when the weapon goes in, animator goes into "idle" state, then i use Get Animator Current State Info i compare the state name every frame, and when it matches with "idle", i start the animation of weapon coming out.

The thing is, i can't use the "idle" logic on this one, since the animator needs to stay on the last frame of the animation (gun completely pulled out, no loop time animation) until the next weapon switch.

So, any ideas how to get the info on the moment the animation hits the last frame? Is it normalized time = 1?

Hi guys,

might be a silly question, but i need to ask. Is there difference in time for executing actions split into several states compared to all actions grouped together in one state? For example, will 10 actions in one state execute as fast as 1 action per state in 10 states?

Hi guys,

i messed around with Odin these days and it would be neat if some stuff could be implemented, specifically reordering of items in Array Lists and Hash Tables

The other thing that would significantly improve the speed of work (and would come handy for pooling too!) is drag and drop GameObjects in bulk to Arrays and Hash tables.

Since keys are needed for Hash Tables, automatically assigning bulk added items with placeholder keys (1, 2, 3...) would sort it out i believe ^_^

Playmaker Help / Core Gamekit/Pool Boss trouble
« on: July 19, 2018, 08:02:30 AM »
Hi guys, i wrote on Brian's forum, but i'll post it here too since it's probably a Playmaker issue (which has CGK actions), since it's working fine (in PM 1.8.5 and Unity 2017.2.0f3) until i update it to 1.9.0, but i might as well check it out here too. Things get screwed up in both Unity 2017.2.0f3 and 2018.2. 999 errors appear as soon as i hit play, and here they are:

Code: [Select]
Pool Boss has not initialized (does so in Awake event and may take additional frames if you configured it that way) and is not ready to be used yet. Check that PoolBoss.IsReady returns true before calling other methods.
IsReady is private so i don't know how to check it.

Code: [Select]
Could not spawn: xyz
Code: [Select]
No game object specified for 'Other Object For Position'
Code: [Select]
Coroutine couldn't be started because the the game object 'xyz (Clone x)' is inactive!
Pools are filled, Playmaker works, the game works, prefabs are being spawned from pool, even though allow instantiate more is disabled, all the references and hash tables i draw my data from are intact, nothing seems out of the ordinary. And yet, the moment i hit play, 999 errors appear.

Pages: [1] 2 3 ... 6