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.


Messages - Weak Interactive

Pages: 1 [2] 3
16
PlayMaker Help / Re: Right click with UI Actions
« on: April 11, 2021, 01:10:24 PM »
Hey,

So I never really had a super good solution for this, but I'll share what I wound up doing when I ran into this issue.

As far as I know, there's no component that can differentiate between mouse clicks by default, but the "Get Mouse Button Down" or "Get Mouse Button" actions can.

So my solution was to make a state with "Get Mouse Button Down" (Right Click), and enter that state when needed. If you can only right click while holding left click down, you can add a prior state with "Get Mouse Button" (Left Click) to control when to enter the right click state.

Hopefully that makes sense, and good luck.

17
PlayMaker Help / Re: Move Object don't works with Unity 2020
« on: April 10, 2021, 03:15:00 PM »
I'm using Unity 2020.3.2f1, Playmaker 1.9.1.p4, and Move Object works for me with sprites and 3D objects.

If it stopped working right after upgrading your project to a new version of Unity, then something probably got messed up while upgrading; You probably want to get a back-up of your project and try again.

Although, I'd check to see if Move Object works by testing it in an empty scene to see if it's something else that's wrong.

Hopefully someone else knows what's wrong though, and good luck.

18
PlayMaker Help / Re: follow mouse position and raycast
« on: April 10, 2021, 03:03:39 PM »
Hey,

Yeah, unfortunately I have no idea what I'm looking at when it comes to code; hopefully someone can help you with that.

In the meantime though, I made an example of how "Screen to World Point" can be used to mimic what was shown in the video you linked: https://drive.google.com/file/d/1pkdZNdlBkGJdm2mpcTkoxDgeWi889qUN/view?usp=sharing

The video I made is just demonstrating what it looks like. It only took me around 10 minutes to make from scratch, and I'm using the method I showed in my last post.

I have an empty object with a box trigger and rigidbody following the mouse around (using the exact FSM I showed before). I then made 4 box triggers around the screen that collide with the object following the mouse around; this lets me detect where the mouse is on screen, and then I activate a different paddle based on that. The paddles use the same "Screen to World Point" action, except just with 1 axis.

It's not perfect, but it can modified however you like, and it's very easy to set up. Again, hopefully someone can help you decipher that code, but I thought I'd share this in the meantime.

Have a great day.

19
Hey, glad of I could be of some help.

Context can be helpful, and it's always interesting to see hear what people are working on, so sorry if it sounded like I was criticizing you for that.

Also, if you still have unanswered questions, don't let my wall of text response stop you from asking them; there are people a lot more experienced than me lurking around haha.

20
PlayMaker Help / Re: follow mouse position and raycast
« on: April 09, 2021, 09:38:52 PM »
Hey, I didn't reproduce exactly what you're going for, but this should hopefully give you an idea of how to accomplish what you're trying to do (if I understood correctly).

In the attached JPEG, I have a very simple 1 state FSM attached to an object that makes that object follow the mouse around the screen.

It doesn't use ray casting, but instead "Screen To World Point." If you need it to snap to an exact position, you can use trigger colliders on the top and bottom halves of the screen to detect where the object is when you drop it, and then code it to snap to a specific position.

Of course, you'll need to program when the object follows the mouse, and when it snaps into place, etc... but hopefully this gave you the piece you were missing.

21
PlayMaker Help / Re: Global variables don't work.
« on: April 09, 2021, 12:55:54 AM »
Unfortunately, I have no idea why that's happening, and hopefully someone comes by with a solution.

However, I strongly recommend not using Global Variables at all. I used to use them, and it was nothing but headache after headache with all the issues I experienced.

It's much more reliable to store those variables in an FSM on a regular game object (a game manager or something similar), and access those variables via "Find Object" and "Get/Set FSM [Variable]." If you put that object in your first scene, and attach a "Don't Destroy on Load" action to one of its FSMs, you can access it from any scene in your game.

Good luck with your project, and I hope whatever you decide to do works out.

22
You have two questions; the first is how to accomplish your game, but that's not really something anyone can answer in a forum post haha. I'll try to provide some info on your second question "How can I require both the trigger and button press hold of a specific player?"

Differentiating players shouldn't be too difficult with Playmaker; not sure about Corgi though. Using "Collision2D Event" or "Trigger2D Event" actions, store the collider to get the player object that triggered the collision as a game object variable, then get the tag of that player with "Get Tag" to differentiate between Players 1 and 2. You can then use a "String Compare" action to send an event based on which tag you got. Then it's just a matter of telling the player what you want them to do.

That is a very simple way of differentiating players, but there are loads of ways you could go about it. As I said earlier, it's not really possible to explain how to accomplish your entire game here, but if you have more specific questions, I'm sure there are plenty of people around that would be happy to help.

Have a good one, and good luck with your project.

23
PlayMaker Help / Re: Weird Inconsistent Movement Issue
« on: April 08, 2021, 02:51:00 AM »
Without knowing exactly how your FSM's are setup, it's hard to say what the issue is. The best thing would probably be to link your zipped project for someone to take a look at.

Until then, have a good one and good luck.


24
Hello, unfortunately I'm not familiar enough with your workflow to spot the issues, but it would probably help if you zipped your project file and uploaded that to google drive for people to take a look at. I do have some suggestions though.

Instead of using "Play Animation," I would look into using the animator and the "Animator Play" action. The animator (mecanim) is very easy to use with a bit of practice, and you'll be able to see the flow of your animation that way, so debugging will be much easier.

For your issue with the Global Variable not showing up in certain FSM's, I'm not sure about that either; however, I would recommend not using Global Variables at all. Instead, I would use a game object with the variables you need, and then use "Get/Set FSM [Variable]" actions to accomplish the same thing. I've experienced bugs with Global Variables in the past, and I've found that they're not necessary. Just attach an FSM with "Don't Destroy on Load" to the game object with the variables, and you can access them from any scene.

Sorry for not having any solutions, and good luck with your project.

25
I'm not 100% sure, but I think that touch input would need to be integrated into the asset you're using.

I don't think you can have touch input simulate a key press, so you would need to code the touch input to actually do the action you need, which is tied to the asset you're using.

I'm really not experienced on the topic though, so you might want to include more details, like which asset you're using, so that someone else might be able to help.

26
PlayMaker Help / Re: FSM Exposed Variables Reverting to Prefab Values
« on: March 27, 2021, 07:35:10 PM »
Hey,

I don't have a solution to this, but I just wanted to share that I've never experienced this exact issue before. However, the oldest version of Unity I've used with Playmaker was one of the 2019 versions.

I just tested this in my current project, and all exposed variables on prefab instances remain changed after I reboot my project (my game would be screwed if that wasn't the case haha). I'm currently using Unity 2020.3.1f1 with Playmaker, 1.9.1.p4, so it's possible that it was a bug fixed in a more recent version of Unity or Playmaker.

I have, however, experienced issues where prefab instances randomly break after launching my project, and I have to re-add them to the scene. I have also experienced issues where prefab instances break only while in play mode, and the only way to fix them is to reboot Unity.

I would say that upgrading to newer versions of Unity/Playmaker might help, but prefabs still have so many issues even in the latest versions :(

Good luck, I hope someone comes by with an actual solution.

27
PlayMaker Help / Re: Way to compare multiple strings?
« on: March 27, 2021, 07:21:57 PM »
Hey,

I'm pretty sure you're looking for the "String Switch" action. It allows you to send an event by comparing however many strings you want.

Hopefully that's what you're looking for, have a good one.

28
PlayMaker Help / Re: Help with "Get Scene Is Loaded"
« on: March 27, 2021, 07:17:49 PM »
Hey,

Thanks for the response.

Glad that's cleared up, I was really just concerned why the events weren't firing and was wondering if I was doing something wrong. I've been using the bool test instead and it's working fine.

Thanks again, have a good one.

29
PlayMaker Help / Re: Is there an alternative action to GetType()?
« on: March 26, 2021, 01:59:50 PM »
Hey,

I'm not sure if this is what you're looking for, because I'm not even sure what GetType is haha, but Arraymaker has an "Array List Get Type" action. The description is "Gets the type at index from a PlayMaker ArrayList Proxy component."

So if that's the function you're looking for, you could add the object to an ArrayList Proxy and run that action.

30
PlayMaker Help / Re: Moving issue
« on: March 26, 2021, 12:39:32 PM »
Not sure if these will help, but here's two ways I've solved sliding in my own projects:

The first is I set the velocity 2D of the rigid body 2D to 0 every frame when the object is in its idle state.

The second is to apply a physics material 2D (right click in project -> create -> 2D -> physics material 2D) to the rigid body 2D and pump up the friction.

Hopefully one of these helps. Even small issues can be a huge pain, good luck haha.

Pages: 1 [2] 3