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

Pages: [1]
PlayMaker Help / Inventory and Crafting
« on: April 26, 2020, 06: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 / Exit condition [SOLVED]
« on: November 08, 2019, 10: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, 04: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 / Increasing Mana over time [SOLVED]
« on: October 31, 2019, 01:39:13 PM »
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 / Play sound without loss of volume [SOLVED]
« on: October 29, 2019, 05: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 / Adding force in local space direction
« on: October 25, 2019, 01:07:50 AM »
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 / Trigger a particle system [SOLVED]
« on: October 18, 2019, 05: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 / DO Tween Rigidbody 2D Rotate
« on: October 13, 2019, 04:58:49 PM »
Another pinball question, if you don't mind:

I'm using DO Tween Rigidbody 2D Rotate (Playmaker action) to rotate my flippers which have a rigid body 2D to hit the ball. I set my angle to a desirable value (30 degrees) but when the flippers rotate, they don't hit this value. They only go up to 20 degrees, and sometimes they don't return to 0 when I use the same tween to rotate them back.

I think the problem may be that I have to rotate them very fast. My duration is 0.05 seconds. I think this may be breaking the tween.

Is there another action I could use on a 2D rigidbody to rotate it like a pinball flipper? I just want to to rotate 30 degrees when the key is pressed, and then rotate back to 0 when released. Do I set up some kind of loop, incrementing the rotation by a degree for 30 updates (or physics updates), and then back? How can I set up the loop? I'm new to Playmaker. Any help is greatly appreciated.

PlayMaker Help / Pinball flipper problem [SOLVED]
« on: October 10, 2019, 02:34:18 PM »
I set up an FSM to control flippers in my pinball game. They work fine.
I'm rotating the flippers kinetically, using the DO Tween Rigidbody Rotate action, as I installed the DOTween PlayMaker actions. This allows me to rotate the flipper 30 degrees in 0.1 seconds, which looks right. I tried 0.2 seconds but it looked too slow.

The problem is when the flipper hits the ball, it flies way too far. I tried different methods to slow it down, but nothing seems to work well. When I put a lot of drag on the ball, it just looks sluggish. When I slow down the rotation speed of the flipper, it also looks slo-mo. I tried increasing the mass of the ball, but that makes no difference. In kinematic mode, the flipper has infinite mass and force, so the mass of the ball is irrelevant. I tried reducing the bounciness of the physics material on the flipper and the ball, but it doesn't affect how high the flipper hits it.

Is there anything I can do to reduce the energy of the flipper hitting the ball, or to limit the ball speed? Is there another action I should use instead of DO Tween Rigidbody Rotate? If I change the flipper to Dynamic, I can use the Hinge component to drive the flipper, and I can specify the maximum force. The problem is firstly that this is more costly in terms of processing than driving the flippers kinematically, and secondly it results in some undesirable behavior. I think the flippers should be kinematic. But how to limit the force with which they hit the ball?

Thanks in advance for constructive replies.

Pages: [1]