playMaker

Author Topic: Diablo Like Control[SOLVED]  (Read 5407 times)

Rexate

  • Playmaker Newbie
  • *
  • Posts: 9
Diablo Like Control[SOLVED]
« on: July 12, 2017, 11:15:23 PM »
Hello all,

I am new to unity in general and am very new to C# (do not even know it). I am not asking for direct help but if you are willing to walk me through I am down but I am rather looking for a video(s) or web(s) (text) tutorial to make advanced Diablo 3 like character movement.

I have:

Unity 5.6 (just got it today)
PlayMaker 1.8.4 (got it today)
3D character
Few animations that I want to use for this guy
Sounds
Special FX
and more.

I am able to find a tutorial(s) on many of these things and put it together (I hope it is the right tutorial--did not really watch it yet) but one thing I CANNOT find is a tutorial where:

1. I click on the terrain with my mouse and this toon moves to that spot avoiding other objects.
2. In addition, when I click on a new point (while still moving to the original) to move to that new point.
3. For toon to look around as I move my mouse.


Basically something like Diablo 3. I am sure you have played it.

Could anyone please kindly direct me to right direction.

P.S. I have found a video of what I want but he did not provide the tutorial.

I tried to look at the video and guess at it what I would need to do based on what I see but I cannot figure it out.

In addition, I also found a tutorial on Unity's official website with the code in it but still cannot figure it out how to replicate in Playmaker. I know I could copy/paste but that is NOT what I want.


Hope someone can help!

Thanks!
Regards,
Rexate
« Last Edit: July 21, 2017, 04:09:26 AM by jeanfabre »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Diablo Like Control
« Reply #1 on: July 12, 2017, 11:37:37 PM »
Hi,
1st of all welcome to playmaker :D

To get started you should maybe 1st get familiar using playmaker and unity.

You can find several beginner tutorials here and here

Once you get the hang of it you can watch untiy tutorials and instead of scripting you can use actions to do what they are doing.

i made a quick search on youtube and i found this video (i have not watched it, so i do not know if it is good or not :) )


If it is any good let me know so i can add this to the user tutorial list.
If you have more questions, feel free to ask on the forum.

Rexate

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Diablo Like Control
« Reply #2 on: July 12, 2017, 11:49:21 PM »
Hello,

I have watched that video (was not that good) and many others including all the videos on your main website. None of it is about what I want specifically. I am NOT saying that they are not good tutorials...they are but just not what I want. Heck, if I had better understanding of what to do for certain action I want to do I am sure I would be able to figure it out. I am just not sure when I have to create an Event vs Variable and when creating Variable...what type to create.

P.S. I a very glad to be part of community. My whole goal is to learn this beautiful tool you guys have created and create a game as fluid as possible and post videos on YouTube as form of progress and tutorial.

if I can do it anyone else can. What I am trying to say I guess is that I hope my videos and my background knowledge (that is ZERO atm) could encourage others to learn coding/Playmaker or whatever else.

Thanks thought!
Regards,
Rexate
« Last Edit: July 12, 2017, 11:51:15 PM by Rexate »

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Diablo Like Control
« Reply #3 on: July 13, 2017, 12:55:43 AM »
Part of the process is learning to walk before you run.  :)

I made this beginners tutorial: ELI5 - A Basic Introduction to Playmaker Essentials - Actions, States and Events.
I also have a point on an object to select, then click to move tutorial. At some point you will need to learn these skills so that you can do things like, click to pickup items, or click enemys, etc.
It uses navmesh in my tutorial, which is unitys built in path finding solution. This is what allows a gameobject to plan a path from point A to B. (Ideally without hitting anything).

Unfortunately no one tutorial will cover everything you need, so you will have to pick up skills here and there to reach your goals. (But it can be done!)
« Last Edit: July 13, 2017, 12:57:21 AM by tcmeric »

Rexate

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Diablo Like Control
« Reply #4 on: July 13, 2017, 01:10:07 AM »
Yeah, I saw your second video but will have a look at the first one. That is why I tried to look for each video with each thing that I want to do. Anyhow, I hope to get/find more tutorials.

Thanks!
Regards,
Rexate

Rexate

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Diablo Like Control
« Reply #5 on: July 13, 2017, 03:47:46 PM »
OK guys. I have figure it out but it does not work as I want it to. I picked Mouse Look under Player Controller (Empty Object) and then set the owner a specific Object (my player). When I move my mouse it moves 360 in one direction (opposite of what I am moving my mouse at) and if I keep dragging (my mouse) towards the same position it will now start to turn -360. I have 1 FMS and one State. What am I doing wrong?

Thanks!
Regards,
Rexate

Rexate

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Diablo Like Control
« Reply #6 on: July 13, 2017, 06:56:42 PM »
Is it the fact that no one knows or that no one cares? There has to be one individual that can help. I am able to do many of the things mentioned in my request but for whatever reason I cannot find this solution (mouse look and click to move). Does anyone care to help?

Thanks!
Regards,
Rexate

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Diablo Like Control
« Reply #7 on: July 13, 2017, 08:17:15 PM »
It often takes some time for people to answer. Only a few hours have passed  ;D

It is helpful if you can share some pictures of FSM, and/or some videos of your result in the game window.

Rexate

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Diablo Like Control
« Reply #8 on: July 13, 2017, 08:36:57 PM »
It is more like 24h that have passed (8:51 PM it will be). I have not done any of the other things (yes, I have followed few tutorials and they are fine) as I am trying to do one thing at the time and I am stuck at that simple thing. What I am trying to do is exactly what is in that video I posted the link of.

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Diablo Like Control
« Reply #9 on: July 14, 2017, 01:04:23 AM »
Give this a try. Use a combination of mouse pick to get the mouse location, and smooth look at. See my image below. This should give you the results you are looking for. As well, you can set the rotational speed.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Diablo Like Control
« Reply #10 on: July 14, 2017, 01:20:18 AM »
Hi,
For walking around objects,
you might need to look into path-finding / NavMesh.

Here is a video that can help :



Rexate

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Diablo Like Control
« Reply #11 on: July 14, 2017, 06:26:23 PM »
Hello,

Thank you all for help.

I have managed to do the following:

-Move the player with point click with the mouse.
-Managed to move my player using that NavMash to avoid obstetrical.
-Managed to get my camera to point/follow the player where it goes on the map.
-Managed my character to look at the point I click.

I have NOT managed to do:

-I can get my character to look where I drag my mouse but if I move to the left it goes to the right and when I keep dragging it will keep rotating (or vice versa).
-Now, I did say that I managed to get him to be moving from point A to B with mouse click but if I click to move to another point (like I changed my mind) it will NOT move. In order to move to another point I have to wait for him to finish that first move and then do the click.


How can I fix the mouse look and that mouse update click to move?

Thanks!
Regards,
Rexate

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Diablo Like Control
« Reply #12 on: July 14, 2017, 11:41:27 PM »
It's hard to say without looking at your FSMs, but here are some thoughts:

Have you downloaded and played with the sample scenes here:
http://www.hutonggames.com/tutorials_game_design_with_playmaker.php

There is a sample: PlayMakerSamples\Input\ClickMoveTo that shows how to move to a clicked position.
It allows you to change the target before the character reaches it.
The sample also shows how to use the SmoothLookAt action to look at a target.

Other thoughts:
You can have multiple FSMs on a GameObject.
It is often better to have multiple simple FSMs instead of one complex one.
E.g., have one FSM just to control the Look At and another to control the motion.

Again it's hard to say without seeing your setup, but these are good general rules.

Rexate

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Diablo Like Control
« Reply #13 on: July 15, 2017, 01:17:10 AM »
Hello,

Here is my SC. It is looking at the direction as I click but it will reset it and also mouse drag goes 360.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Diablo Like Control
« Reply #14 on: July 15, 2017, 05:22:15 AM »
Hi,
I made a demo and a video for you, because the movement is different when using navmesh.


You can adjust the movement speed/rotation and so on the 'Nav Mesh Agent' Component.

You can download demo the attachment below.