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.


Topics - serenefox

Pages: [1] 2 3
1
Playmaker Help / [Solved] Projectiles are deflecting off of targets
« on: January 22, 2019, 11:19:55 PM »
Hi,

I think this is more of a unity question but I figured I would ask here since I am using Playmaker. I have an FSM on my projectile that listens for the collisions. Most of the time this works fine. Although if the projectile hits a target at the right angle it will deflect and just either float there or hit something else and despawn. I have all my tags and layers set up correctly but sometimes a projectile will deflect and most times it works. My game is a 2d twin stick shooter.

Note* it is rare when playing that this happens but I can reproduce it by position my player in just the right spot. I have attached and image of the problem. In the image this time one of the enemies fired a projectile and it deflected off of my player.

I shoot a lot of projectiles in my game at one time as well so I'm not sure raycasting is the way to go. I also can't use triggers (i dont think) because I need to use "get collision2d info" to spawn particles and use it for knockback calculations.

Thanks for any advice.

2
Playmaker Help / [Solved]Copying Array from script to FSM Array.
« on: January 16, 2019, 02:15:26 AM »
Hi community,

I am trying to write a bridge of sorts between Dungen and Playmaker assets.

I am trying to copy the array values from my script to the fsm array variable so I can work with it in playmaker. For some reason I can't figure out why the array values wont load into the playmaker fsm I have assigned in the inspector. Any help would be appreciated, Thanks!

Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DunGen;
using HutongGames.PlayMaker;

public class GetDoorPrefabsInTile : MonoBehaviour
{
    public FsmArray pfsmArray;
    public PlayMakerFSM DoorFunctionalityFSM;
    public string nameOfArrayToWorkWith;
    public Tile tile;
    private GameObject[] PlaymakerFSMArray;

    private void Start()
    {
        pfsmArray = DoorFunctionalityFSM.FsmVariables.GetFsmArray(nameOfArrayToWorkWith);
    }

    public void FindDoorPrefabs()
    {
        // Get the tile that you want somehow
        GameObject[] tempArray;
        int doorIndex = 0;

        int Doorwaycount = tile.Placement.AllDoorways.Count;
       
        tempArray = new GameObject[Doorwaycount];
        // Loop through each used doorway in the tile - used doorways are those that are connected to other tiles
        foreach (var doorway in tile.Placement.UsedDoorways)
        {
            // Only one door prefab is spawed per doorway-pair so it might be on this doorway, or it might be on the other
            GameObject doorPrefab = (doorway.UsedDoorPrefab != null) ? doorway.UsedDoorPrefab : doorway.ConnectedDoorway.UsedDoorPrefab;

            if (doorway.UsedDoorPrefab != null)
            {
                tempArray[doorIndex] = doorPrefab;
                doorIndex++;
            }
           
        }
        //doorIndex = 0;
        pfsmArray.Values = tempArray;
    }

}

3
Action Requests / Array get closest game object in sight (2D)
« on: December 31, 2018, 07:34:15 PM »
I decided to make a separate thread on this topic. I tried this action from the ecosystem but I soon figured out that the line cast is done in 3d physics and I need it for 2d. I tried to modify the script to work with 2D but I was unsuccessful. The documentation on the line cast doesn’t use “out” so I am unsure what to do.

Thanks!

4
Playmaker Help / What options are there for 2d navigation systems?
« on: October 09, 2018, 07:29:27 PM »
I am using polynav right now but I am having trouble with it. I am communicating with the author but just in case it doesn’t suit my needs for my game is there any other playmaker friendly 2d navigation assets? I saw a* navigation on the asset store, but from what I have seen the playmaker actions aren’t being updated for that one. Any suggestions? I need something that isn’t point to point or steering type of things. I need to have it able to build at runtime too because I have a dungeon generator that builds a dungeon at start.

5
I am making a 2d game with multiple local players and I need an action to track all players tagged as player.. The action mentioned in the title works exactly the way I need it too except I need a sensitivity option because my Ai bounces at the edge of the screen sometimes and it makes the camera bounce too. I just need  there to be a buffer of some kind where the camera doesn’t bounce or at least not as much.. Any help would be very appreciated. Thanks!

6
Playmaker Help / [Solved] Look At 2d but Direction instead of GameObject?
« on: September 13, 2018, 12:29:39 PM »
Hi,

I am trying to get my 2d sprite to look at a direction, but it won't work properly. The lookat 2d action works but I need to to look at a Vector 2 direction instead of just a V2 point in space. Any ideas? I tried smooth look at direction but the sprite keeps flipping around the wrong way not matter what up vector I have.

Thanks!

7
Playmaker Help / Get Component's Owner?[SOLVED]
« on: August 21, 2018, 04:22:44 PM »
Hello Playmaker Community,

I am wondering if there is a way to get a gameObject value from a component's value.

Here is my situation:

I am using get property to grab a property of a third party script. The value I am grabbing returns a "object" value. How can I get the gameObject that the value is associated with? The objects value is a component on a gameObject created at runtime. Does that make sense to anybody? haha

I have a custom action started but it wont save the object value:

Code: [Select]
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{

[ActionCategory(ActionCategory.UnityObject)]
[Tooltip("Gets the owner gameobject of a component")]
public class GetComponentOwner : FsmStateAction
{
        [RequiredField]
        public FsmObject componentToUse;

        [UIHint(UIHint.Variable)]
        public FsmGameObject storeGameObject;

        public override void Reset()
        {
            componentToUse = null;
            storeGameObject = null;
        }

        // Code that runs on entering the state.
        public override void OnEnter()
{
            DoGetComponentOwner();

            Finish();
}

        public void DoGetComponentOwner()
        {
            storeGameObject.Value = componentToUse.Value as GameObject;
        }


}

}


Thanks for any suggestions!

8
Playmaker Help / Blendshapes and Playmaker Problem[SOLVED]
« on: February 17, 2018, 12:36:27 AM »
Hi,

I am using the blendshape actions on the ecosystem and I have a Fsm where it randomly picks a state with a "animate float" action and a "set blendshape weight" action. The float variable will increase and the blend shape field will change. The problem is I have three sets of states, one for happy, one for scared, and one for excited,and only the happy one works as expected. The other two start off well but as soon as it exits the state after the animate float finishes their weights reset.

Also on a side note the two blendshapes that don't work properly, don't work at all unless my animator component is on "animate physics".

Anybody know whats going on?

Unity 2017.2
Playmaker 1.8.9

9
Hi,

I updated to the newest version of Playmaker and am now getting random crashes in my game. The crash logs are almost always the same, but I can't replicate it in the editor. I have attached a picture of a crash log from xcode, if anyone has any idea let me know. I already emailed the master audio developer but he said they don't have any coroutines in their asset. I thought it was worth a shot since their asset appeared in the log. I believe its something to do with Playmaker as that's the only other asset mentioned with FSMs.

10
Work In Progress... / Pop! Factory Havoc Feedback
« on: September 05, 2017, 06:38:13 PM »
Hello Playmaker community,

I have been working on this game for about a month on and off, but I feel it doesn't have the certain polish it needs to "make it" as an actual game (even if it is a small scale game). If anyone wants to try it and give me a couple of pointers I'd be grateful. The only thing I can think of is maybe character accessories, but I'm more interested in gameplay advice vs cosmetics. It's not complete yet but the only thing that isn't done is the main menu and the upgrade menu It's on itch.io here: https://serenefoxgames.itch.io/pop-factory-havoc

How to Play: The controls are the left and right arrow keys (or A and D). You basically have to keep your bubble character alive and break the shield lines that the robot characters are using to hold your bubble friends. The game may be released on mobile at some point so that's why there is a slider on there too.



Thanks!

11
Playmaker Help / Photon Get offline mode status [SOLVED]
« on: March 20, 2017, 10:08:07 AM »
Hi,

I am trying to create an action to "get" if offline mode is active with photon. I duplicated the "set" action and modified it. This is what is have so far:

Code: [Select]
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("Photon")]
[Tooltip("Gets if the PhotonNetwork is offline or not. Offline mode can be set to re-use your multiplayer code in singleplayer game modes." +
"\n When this is on PhotonNetwork will not create any connections and there is near to " +
"no overhead. Mostly usefull for reusing RPC's and PhotonNetwork.Instantiate")]
//[HelpUrl("https://hutonggames.fogbugz.com/default.asp?W1108")]
public class PhotonNetworkGetOfflineMode : FsmStateAction
{
private bool offlineMode;

[Tooltip("Event to send if the Bool variable is True.")]
public FsmEvent isTrue;

        [Tooltip("Event to send if the Bool variable is False.")]
public FsmEvent isFalse;

public override void Reset()
{
isTrue = null;
isFalse = null;
}

public override void OnEnter()
{
offlineMode = PhotonNetwork.offlineMode;
Fsm.Event(offlineMode ? isTrue : isFalse);
Finish();
}

}
}


It always returns either false or true I can't remember but it just doesn't work anyway. Is there an action or way I can get the status of offline mode. Is this possible? Or is the code above wrong?

12
Hi everybody!

So I recently started making my 6th game an I figured it was time I moved into some multiplayer since I purchased the photon PUN+ awhile back and never used it.

So here is my question I am trying to generate a level with a plugin called Dungen. The problem I am having is how to get the spawned pieces to sync across the server.

I thought at first to network instantiate them each with a photon view component but upon doing more research I learned that the method might not be good for performance.

Then I thought about RPCs but when I implemented it the game hit a spike like I have never seen before in the profiler. Can anyone give me some heads up on the best way to do this.

Basically the dungeon gets spawned under a root gameObject as individual prefabs.

Any info would be appreciated.

Thanks

13
Playmaker Help / Spherecast action not returning hit
« on: February 17, 2017, 02:09:30 AM »
Edit:

So I figured out that the spherecast was not working because it started from inside my player(ball) and apparently that does not work since it is starting inside of a collider even if the layermask says not to look at it.

That leaves me with another problem. I figured I could spherecast from above my player in world space to fix it but the action is either from the gameobject or from a position. Is there anyway to make the position a world space offset from my player? (since my player is always rotating)


Original Post:

Hi,

I am using the spherecast action from the ecosystem, but I can't get it to work for some reason. I am trying to cast down from my player(ball) to the ground to check and see if the player is grounded before I jump.

Normally I would use a raycast but if the player is on a slope the raycast sometimes misses even though the player is grounded.

I have it "Return" the the preious state if it doesn't hit anything else send a jump event to continue on. Yet it rarely ever returns a hit. I have attached my settings on the action.

I am thinking maybe I'm not using it right but from the documentation on unity I believe I am.

Any info on how to use it?

Thanks.

14
Playmaker Help / Help slowing "Add Torque" based on slope?
« on: February 13, 2017, 06:48:37 PM »
Hi,

I am building a ball platformer and I am trying to find a way to detect when my sphere is going up or down a slope. I am using "add torque" to move my sphere character and its great but I can basically go up almost vertical slopes with it, which I don't want. I want to slow down the sphere if it is going uphill and speed it up going downhill. I am assuming I am going to have to use raycasting but not sure.

My sphere has a rigidbody and a collider instead of a character controller if that's helpful info.

TL;DR I need a way to detect a slope's value so I can change the speed of my add torque.

Thanks for any info!

15
Playmaker Help / Snowboarding character controller in Playmaker?
« on: February 12, 2017, 05:06:58 AM »
Hi,

I am wondering if anyone would have insight as to how to accomplish this. I want to make a snowboarding game but I need to figure out the logic for a snowboarding controller/system.

I want to be able to be able to have a character on a snowboard and to be able to basically stick to the ground unless input for a jump is pressed or if going fairly fast over a bump maybe the character comes off the ground a bit?

I saw the game "Shred it!" on iOS looks kind of like what I am aiming for as they have slight little bumps in their ground mesh just enough for the character to move up/down over them but not come off the ground. Also how would you make a character go down a slope at a steady pace?

Thanks for any insight!


Pages: [1] 2 3