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

Pages: [1] 2
1
PlayMaker Help / Re: 2D player knockback (when hit by an enemy)
« on: November 12, 2020, 12:39:29 PM »
Hi.
You need to get the side where the player is.
if 2d : get pos X from player and enemy then do float compare.

then depending on which side, do negative or positive multiply.

It worked like a charm - thank you!!

- State1: First I did Collision 2D event. IF collider tag is Enemy, then next state.
- State2: "Get position" of player, and collider. Then float compare of those two variables.
 
(Instead of get the enemy pos, I used get the collider position - because I want this effect to take place when hit by all enemies)

The next two states are either pos or neg multiply.

2
PlayMaker Help / Re: 2D player knockback (when hit by an enemy)
« on: November 11, 2020, 12:08:17 PM »
Here's a video of the issue (players is only bouncing away from the enemy from one side): https://share.vidyard.com/watch/X2iA7rUt3h5dBiemDnnkkX?

Does anyone know what Action in the FSM that adds force to the opposite direction?

3
PlayMaker Help / Re: 2D player knockback (when hit by an enemy)
« on: November 11, 2020, 12:12:06 AM »
Thanks for replying!

I've tried to set the multiply on a negative number, but that only reversed the problem (player only gets pushed when attacked from right, but player gets drawn into the enemy when attacked from left).

I need the player to get pushed to the opposite direction from where the attack comes from. Isn't that was Vector3 Invert should do in this case?


PS: When I remove Vector3 Invert, nothing changes. So it's obviously not working. Am I using it wrong, or is that action in Playmaker broken?

4
PlayMaker Help / 2D player knockback (when hit by an enemy) [SOLVED]
« on: November 10, 2020, 01:40:01 PM »
Hi.
I've created a state in which the player enters if hit by an enemy.

The state is suppose to make the enemy push the player away from himself.

Currently the player does get pushed back when the enemy attacks from the left.
But when the enemy attacks from the right, the player gets pushed INTO the enemy instead.

I guess i'm using the "Vector3 Invert" in a wrong way.

Does anyone know why that is?

Thank you in advance!  :)

5
PlayMaker Help / Re: Bool test not working
« on: October 21, 2020, 11:23:37 AM »
Sorry for bothering with this again.
But I can't figure why my jump animation is only playing half the animation...

Here's the video of what's happening: https://share.vidyard.com/watch/phbWFFQNwnzm7kq9Gxsxxa?

In the end i show what the animation is supposed to look like.

Has anyone experienced this?


6
PlayMaker Help / Re: Bool test not working [SOLVED]
« on: October 20, 2020, 10:59:25 PM »
Problem solved.

I added one more state called "checkGround" - and that's where I've put the Line Cast and Bool check.

In the Jump state i added the action "send event", with a 0.1s delay.

I'm not sure this is the best solution, but it does the job. Since the jump-animation stops playing before player reaches the ground... .

Thank you Djaydino and Heavygunner for your help!

7
PlayMaker Help / Re: Bool test not working
« on: October 20, 2020, 11:39:49 AM »
Hi.
On you jump there is no linecast. so the bool will probably stay false forever.

I added a linecast, and the player doesn't get stuck in the jump-animation anymore! But he can still jump twice (not 3 times).

I found the problem though (unfortunately not the solution):

When the player enters the jump state, the bool test runs before the player leaves the ground. When I press jump/up a second time while player is in the air, the jump state runs again (but the second time the bool test is false since the player is already in the air, so a third jump is not possible).

Here's a video: https://share.vidyard.com/watch/trqPqDUkfzZhVHuagGtvm1?

How do I make sure the bool test only runs after the player jumps?

PS: I tried activating Action Sequence, but the sequence got stuck in the line cast 2d for some reason... (see photo below).

8
PlayMaker Help / Re: Bool test not working
« on: October 20, 2020, 04:04:45 AM »
Here are some screenshots of everything that has to do with Groundcheck and bool test: isGrounded. (the 3rd is in the photo in the post above).

9
PlayMaker Help / Re: Bool test not working
« on: October 20, 2020, 03:53:54 AM »
Hi.
Do you have a separate fsm that changes the bool 'Is Grounded?

Also you should not use a Finished transition on a bool test, use a custom event name.

When al actions are finished in a state it will send this finished event.

I only have one FSM with bool check.

I changed from Finished transition to a custom event. It's doing the same thing as the Finished transition did. The problem persist (of course).

Here's a similar set-up on another state in the same FSM that works (see second photo).

10
PlayMaker Help / Re: Bool test not working
« on: October 20, 2020, 12:44:08 AM »
Check Every Frame ?

When I check it, the player can only jump twice, and then he gets stuck in the jump-animation. It very weird.

See a video of what's happening here: https://share.vidyard.com/watch/seXGdCzvQT52nN2XM32xzP?

Any ideas of why this is?  :-[

11
PlayMaker Help / Bool test not working
« on: October 19, 2020, 12:31:17 PM »
Hi,
I've set a Bool Test "isGrounded" in my jump state.

If True, it transitions to the next event. (if False, it stays in the state).

This to make the player unable to "double jump".

But my bool test gets ignored by the FSM (it transitions to the next state, even if Bool is False).

Has anyone experienced this before?

Here's a screenshot: https://ibb.co/sj9sLcd

12
PlayMaker Help / Re: 2D character crouching
« on: October 18, 2020, 12:23:20 PM »
Issue solved.

I added a separate state that checks if bool-value is true/false.
If False (no ceiling), the state goes to Idle state. If true (there's a ceiling), the state waits until the bool-value is false.

If anyone has a similar issue in the future, see photo: https://ibb.co/xGfzLBY
Also, read the rest above.

Thank you Djaydino, you helped me a lot!  ;D

13
PlayMaker Help / Re: 2D character crouching
« on: October 17, 2020, 08:44:02 AM »
Hi.
Separate scale from movement.

Do the scale in a different fsm.

Thank you. It worked!!

The last issue I have with crouching (hopefully):

- I've added a Ceiling Check on top of the player.
- And i've put all the "ceiling-objects" in a layer namned "ceiling".
So now if I release the "down button" when the player is under a ceiling-object - he remains crouching as he should.

But... if I move away from the object by pressing left/right (without holding the down key), the player will still be crouching even when there is no object blocking him from standing up.

How can I make the player to stand up automatically, as soon as there's no ceiling blocking?

I basically want the player to only crouch when holding key-down - the only exception is if there's an object blocking the player from standing up.

Here are my settings:
https://ibb.co/ZGSyn6R
https://ibb.co/nwDDkHH
https://ibb.co/MfrbVcq

Also (not sure if this problem is related):
If I press the up-key when the player is crouching under an object, the player stands up, and the body sinks in to the ground. Like this: https://ibb.co/chCkt3v
... I don't want the player to be able to stand up if under a ceiling-object.

14
PlayMaker Help / Re: 2D character crouching
« on: October 15, 2020, 10:18:38 AM »
Hi.
If you want the player not to move when crouch, Set the velocity x to 0 instead of the axis.

Hi! No, i DO want the player to move.

I basically have issues with making the player face the right direction while moving in crouch-mode.

I tried adding additional two "set scale"´s for the Crouch-state (like this: https://ibb.co/NYv3Xqf, https://ibb.co/82rXQT3).
But what happened instead was that the player started to crouch when moving normally (now he is only crouching when running left/right normally).

How can I make the player face the right direction when both running AND crouching?

PS: Thank you for helping me put, I really appreciate it. Hopefully someone will have use of this info as well.

15
PlayMaker Help / Re: 2D character crouching
« on: October 14, 2020, 11:32:21 PM »
I tried this approach:
https://ibb.co/82rXQT3
https://ibb.co/NYv3Xqf
https://ibb.co/FhFkgLr

Now the character can only move left and right during the crouching animation (even without me holding down-key). So now the issue is that I can move left/right without the crouching...

What am I missing?

Pages: [1] 2