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

Pages: 1 2 [3] 4 5 ... 41
Playmaker Help / Re: Setting fsmReceiver on runtime?
« on: March 14, 2018, 05:14:32 AM »
Great, thanks!

Playmaker Help / Setting fsmReceiver on runtime? [SOLVED]
« on: March 13, 2018, 12:16:48 AM »
Hi guys,

i'm using set of actions for Simple Waypoint System, but one of the actions is made quite wrong. It's Add Event At Waypoint and instead referencing the object and FSM name, it uses fsmReceiver which can be only set in editor.

Any idea how could i set this on runtime or change the action so i can add event to a referenced object and FSM, not this crap. I tried fiddling with send event action, but it's too advanced for me.

Here's the action itself

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


Playmaker Help / Re: Use Gameobject as Center of Gravity (ecosystem)
« on: March 12, 2018, 02:58:53 AM »
Why are unreliable actions on the ecosystem anyway?

Playmaker Help / Re: FSM Design Question
« on: March 10, 2018, 04:30:13 AM »
Yes, after a while you'll realize it's better to separate behaviours into different FSMs. For example, on enemy ships in my game i got one FSM that handles damage, another one that handles movement etc.

In you example, you should have an FSM listener for line of sight monitoring that will send an event to FSM appointed for controlling movement (when opponent is in range send event seek to movement FSM).

Modular approach can sometimes make it a drag to debug but improves reusability by making components.

General Discussion / Re: Creating a magic based combat system
« on: March 10, 2018, 02:30:39 AM »
What do you need exactly? I mean, your going pretty wide here, let's break it down to components.

Feature Requests / Re: State Groups
« on: March 09, 2018, 10:33:38 AM »
Come on already guys, not only flow canvas has groups, it also has macros (like a collapsible group)

Even Bolt has groups

Me too, sole developer, using collaborate for another layer of backup basically, never had any fuckups.

Let's say you have "collect 500 coins" achievement. Besides having a resettable counter for current coins collected, you nees to have a total collected coins counter (that should be permanently stored via easy save or playerprefs) and a listener that will trigger the achievement once you get over 500 coins. The thing that will prevent from activating the achievement every time is a simple bool that will check if the achievement is unlocked every time the number of coins is checked. So you need a list of achievements with a bool attached. Best way is to make a hashtable of bool values where the key would be achievement name and bool is true/false (locked/unlocked) which is also permanently saved.

General Discussion / Re: Events and Global Events
« on: March 09, 2018, 12:22:24 AM »
Actually, when i THOUGHT i had the same error, it was always the case of rogue fsm, the one i've set to send an event and forget about it.

Playmaker Help / Re: Please help with arrays
« on: March 08, 2018, 09:24:26 AM »
So you got 6 cubes, want 3 randomly selected to randomly change colors. When they stop changing colors, they fade to original grey, and you have to guess the last color they were in, right?

Hi guys, would someone have the knowledge to make an action that would have the possibility of locking the weight of the value, but not only that, to affect all other values so the complete weight sum is 1, the way it should actually be. I don't get how the current action works.

A simple example of values that interract:

I have two float values, each set to 0.5. When i start dragging the slider of one up, the value of another one goes down, so the sum stays 1. If i dragged the first one to 0.7, other one will go to 0.3.

Another example:

I have 3 float values, first is set to 0.2, and another two to 0.4. I want to change to values of the other two, but i don't want the first one to move from 0.2. So i click a small check box beneath it which says "lock" and adjust the other two values. So, i reduce the value of the second one to 0.2 also, and the third one only changes by increasing to 0.6.

What do you think?

I don't get it, if you use force to move an object, resetting velocity should work.

I googled a bit, and it seems you're not alone on this one. Check this thread and try out what works for you.

What are you using for moving projectiles? Don't forget to reset your variables in FSM's, if you're adding value to the velocity float, for example, it will start with the last registered value. States in FSM's are reset, but variables are not.

Pooled object keep all of their properties, they are just disabled, so you should reset all the parameters manually when you despawn them if you want to use them as tehy were whn you respawn then.

Pages: 1 2 [3] 4 5 ... 41