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 - 3D Lunatic

Pages: [1] 2
PlayMaker Help / Inventory and Crafting
« on: April 26, 2020, 03:59:31 PM »
Is there a good asset to use for inventory and crafting with PlayMaker? I had purchased Inventory Pro some 3 years ago, but it's depreciated now. What's recommended? Even if it doesn't work with PlayMaker, is there a good one to use?

PlayMaker Help / Re: Exit condition [SOLVED]
« on: November 11, 2019, 01:28:23 AM »
That was the problem. Thank you!

PlayMaker Help / Exit condition [SOLVED]
« on: November 08, 2019, 08:33:55 AM »
I have a state for recharging mana of the player. It has a Float Add action that adds a small amount of mana Every Frame and Per Second.
Then I have a Set Bar Value action to update the Mana Bar on the UI. So far it works.
Then I have a Float Compare action that compares current mana to the maximum mana, and if maximum is reached then it exits this state. Seems logical.

During runtime, mana recharges but it doesn't stop at max. The Float Compare action is never performed. The mana simply continues increasing indefinitely.

Do you know how I can stop this loop? The Float Compare action was supposed to be my exit condition, but it's not checked.


PlayMaker Help / Convert 2D rotation into Vector2 [SOLVED]
« on: November 04, 2019, 02:11:57 AM »
I'm making a 2D pinball game. I need to convert an object's rotation into a Vector2 variable. The rotation will only be around the Z axis, as it's a 2D game. Is there an action which will do this for me?


PlayMaker Help / Re: Increasing Mana over time [SOLVED]
« on: November 01, 2019, 01:36:31 AM »
Thank you!

PlayMaker Help / Increasing Mana over time [SOLVED]
« on: October 31, 2019, 10:39:13 AM »
I did a search on this topic, but the answers gave a method for uninterrupted increase. They recommended HOTween.

What I have is a mana bar (magical energy). Whenever the character uses a magical ability, some mana is subtracted from the bar. Over time, the mana should automatically refill, let's say at a rate of 1 point per second. I have maximum mana set to 100, just for sake of ease.

How can I set up the automatic refilling of mana in my ManaManager? Currently, I created an FSM which checks if the mana is at max, and if not then it goes into a state called "Increase Energy". But I'm at a loss as to how I should increase mana here. I want the flexibility to change the rate of increase (when the player trains, they can increase the rate of mana recharge). Also, I don't think I should be tweening mana, because the player can discharge some mana even if it's not full. If I do a tween, the mana will continue to rise until the tween is completed, regardless of whether the player is using mana during that time.

Any suggestions? Thanks in advance.

PlayMaker Help / Re: Trigger a particle system [SOLVED]
« on: October 30, 2019, 12:07:44 PM »
It works now. There was a script on the particle effect, destroying it after it plays. It was a feature by the FX developer to prevent memory leaks in the game.

PlayMaker Help / Play sound without loss of volume [SOLVED]
« on: October 29, 2019, 02:41:52 PM »
I'm making a 2D pinball game.
When I play sound on an object, such as when the ball hits something, the volume of the sound seems diminished. The camera is at Z of -10 so this could be due to the distance to the object.
When I instead try to use the camera as the source of the sound, I don't hear anything at all. I'm using Pro Camera 2D to follow the ball, perhaps this is interfering with the sound... I don't know.
Sounds placed on other game objects emit, but at diminished volume. Is there a way to play sounds ignoring the distance? Can you somehow tell Unity not to apply the lowering of volume due to distance? Is there a PlayMaker action that I should use to achieve this?
As a second question, on which game object should I place my game music, and which action is best to use for that? Thank you.

PlayMaker Help / Re: Trigger a particle system [Not yet solved]
« on: October 28, 2019, 06:04:23 AM »
Thank you, Broken Stylus. I actually discovered that the particle system was NOT a prefab, sorry about my inexperience. Now that I have made it into a prefab, it stays in the field. The FSM now appears to execute the correct cycle, the only problem is that I'm still not seeing the bats. But at least all the states are being executed.

I'm going to fiddle with it more to find out why I'm not seeing the bats. Your suggestions have got me further along, but I won't yet mark this thread as solved until I figure it out.

PlayMaker Help / Re: Trigger a particle system
« on: October 28, 2019, 03:50:37 AM »
Thanks for your suggestions. I'm running into one more problem with this:
I have the FSM on an empty object, and it has a child which is the bats flying particle effect. When I use Particle System Play (as suggested) to activate the bats, I must specify the game object which has the particle effect on it. My first attempt was to drag the particle effect, which is a prefab and a child as I mentioned, into the Game Object slot. But when I run the game, it disappears and the bats don't play because it's missing the game object. My second attempt was to create a game object variable, make it visible in the inspector, and drag the bats animation prefab into the slot in the inspector. Then in the FSM I use the variable to identify the bats particle system game object. But when I run the game, this also disappears and the bats don't fly because it's missing the game object.

Do you have any ideas why my object reference keeps disappearing? I've had this happen in other similar situations, and I think it has to do with me not understanding how prefabs work, perhaps. The particle animation is a prefab made by someone who sells premade particle effects on the Unity Asset Store.

Thanks for your help.

PlayMaker Help / Re: Adding force in local space direction
« on: October 25, 2019, 08:45:21 AM »
Add Relative Force 2D is a step in the right direction.

The problem is the direction of the force is based on the orientation of the ball. I want it to be based on the orientation of the Speed Booster. What I need to do (I think) is to capture the rotation of the Speed Booster zone in some Vector2 or Vector3 variable, and then use that vector to apply the force to the ball.

Do you know how to set that up? I just need the actions that should be used, I can create the FSM logic. The Speed Booster is just a rectangle trigger zone with a sprite, like a chevron that points in the direction of the boost.

In summary: How to capture rotation of the Speed Booster chevron, and where to apply it in Add Relative Force 2D. Thank you for your patience, I'm a newbie.

PlayMaker Help / Adding force in local space direction
« on: October 24, 2019, 10:07:50 PM »
To summarize, I have a 2D game with physics. I want to add force to a ball object when it goes over a triggered area. I want to add the force in the local Y direction of the trigger zone, so that I can simply rotate the trigger zone if I want to push the ball in a different direction.

Add Force 2D doesn't have a selection for world/local space. It gives the option of using a vector as well as a vector3 (not sure why, it's a 2D physics action). How do I set the vector in such a way that it will apply the force in the local Y direction of my trigger zone?

For reference, my ball object is called Ball, and the trigger zone is called Speed_Booster. I just want to give the ball a push. Thank you for your help.

PlayMaker Help / Re: Trigger a particle system
« on: October 21, 2019, 11:20:16 AM »
This is my FSM:

I'm using an animation of bats flying up, which is a particle effect. When the player enters the trigger zone (a rectangle on this object), the bat cloud is released. Then it should wait 10 seconds before releasing them again, so it doesn't happen too often. That's why I put a wait action for 10 seconds after the activate game object action.

I think what I'm doing wrong is triggering the animation using activate game object. Shouldn't there be another way to trigger a particle effect? Thanks for your advice.

PlayMaker Help / Trigger a particle system [SOLVED]
« on: October 18, 2019, 02:05:20 AM »
I bought some assets to create cool magical effects, such as auras or particles. These assets include prefabs which I just need to drag into my scene.

How do I activate such a prefab every time a collider is triggered? Right now it only works the first time my trigger area is entered, but it doesn't repeat. Could someone describe the FSM that I need to activate the particle effect every time? Thanks!

PlayMaker Help / Re: DO Tween Rigidbody 2D Rotate
« on: October 13, 2019, 11:48:10 PM »
Thank you for your response. In answer to your questions:

1. Have u set the pivot of your flipper to the edge? Cuz rotation is based on the pivot
Yes, the flipper is the child of the flipper_hinge, and moved to align the flipper_hinge pivot to the correct place. The flipper_hinge has a rigidbody and Playmaker FSM on it, the flipper itself only has a collider and physics material.

2. If you do, make sure to set the rigidbody2d to kinematic so it wont affected by gravity
Yes, I have the rigidbody 2D set to kinematic.

3. There is a command called Ease Float, basically it is gradually increased your float variable within certain time
Okay, this may be what I'm looking for. I'll see if I can find Ease Float in the Playmaker actions and use it instead of the DO Tween.

4. The rotation of the flipper will be on Z coordinate
Yes, I'm rotating on the correct axis.

So we go something like this:

State 1: Get key down

State 2 : Rotate flipper.rotation.z = variable myRotation
              Ease float myRotation variable from (eg:0 to 30) in 0.05 sec, when    finished back to state 1

In my case I actually have 4 states:
(1) Wait for key down
(2) Rotate flipper up
(3) Wait for key up (release)
(4) Rotate flipper back down

And back to state 1. All that seems to work fine but I'll try the Ease Float action and see if it helps. Thanks for your answer.

Pages: [1] 2