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

Pages: 1 2 [3] 4 5 ... 13
31
Playmaker Help / Re: A Question
« on: August 01, 2016, 07:05:54 AM »
Hi and welcome to the forum!

Playmaker is amazingly powerful! It can pretty much do most things that c# can and for beginners like us the few tiny things it cannot do will not matter for a long long time in most cases.

All I can say is if you want to program your game without learning to code- get playmaker. Or if you do want to code, get playmaker still and learn coding when you have time for it later, as playmaker is a great tool when working with othet scripts too :D . (Lol i think it is important to say at this point, i am not affiliated in anyway to Hutong games lol, just a big fan)

Here is a tutorial for playmaker that covers how to make a 'playable character' selection screen, if you want to see how you would go about achieving what you want (although generally i must agree with Jean, lol like i have the knowledge to ever disagree with him here lol, you should go through the beginner tutorials as you will just learn to be smooth with using playmaker and then can comfortably tackle things you actually want to make. But at the same time i found it interesting to see tutorials of more complex features when i was a total noob, for inspiration):

https://youtu.be/eANwhfv3-_g

Good luck with it and hopefully ill see you around here :) !

32
Hi,

Although i did mention the recursive box previously, i didn't actually get a chance to reply in regards to your last query about the children, that was Coxy :)  . Glad you've got it working though. (An important thing to remember with 'recursive" is that if you keep it ticked when you disable an object, then you must keep it ticked when you re-enable that object. This is because recursive disables (unticks the enabled box in the inspector for) the parent and then each child individually, whereas without recursive it only enables or disables the parent object that is targeted by the action. So if you disable recursively you disable each child individually, but if you then enable non-recursivley- then the parent gets reenabled while the children stay disabled.

Otherwise if you disable just the parent, non-recursively then the children disappear automatically anyway as the children of a disabled object automatically get disabled but actually stay enables in their own inspector- so then when you reenabled the parent object non-recursivley they automatically becone active again. Sorry if this is just reads like a complete nonsense ramble, but there is some logic here somewhere, I promise :) .)

The state 3 showing is not actually related to anything we did in particular, it is just a general playmaker feature.

It shows state labels so that you can debug and generally see that your states are flowing correctly during game play (is very useful when you build for mobile, but cannot get unity remote to work, like in my case :( ).

You can turn it off in playmaker preferences:

Open playmaker editor.

In bottom right corner click on 'preferences'

Then if I remember correctly you need to untick the option 'show playmaker state labels in game view'.

Then I'm pretty sure it will all be fine.

(You can also turn off state labels for each FSM individually, in the inspector panel.

Good luck!

PS. You can rename the states and FSMs as well as the events, to anything that makes sense in your game (so for the buttons you could do something like renaming 'state 1' to 'wait for touch' and the FSM to 'button control').

33
Hi!

It is awesone to hear that it is all working for you.

You are correct, the activate/deactivate event names can be called anything you want. As long as you mark it as global and then send whatever you called it. I called them that as this is mostly what the event did.

Good luck with whatever you tackle next and don't forget to go through some playmaker tutorials, I learned loads from them and still do.

34
Hi,

Having a quick look, in your button FSM, state 2; you should make 'activate game object' then 'send event' (otherwise the event gets sent to a deactivated object), just like in the last screenshot of my last post.

Secondly in state 3 of the game object, you should untick the 'activate' box in the 'activate game object action'. (This state should deactivate the object but if the box is ticked you're just activating it again).

I think that was all I could spot for now.

Try it and hopefully it will work.

Good luck with it, hope this helps.

(PS, I would also untick all the recursive boxes, on every 'activate game object' action. It basically activates each child individually, may be annoying if your objects ever have children. You can find out more about actions here:  https://hutonggames.fogbugz.com/default.asp?W52 )

35
Quote
Can you explain it in a lot of detail. I'm very new to playmaker. Thank you

Hi,

I can sure try. But I will also try to keep it simple, like no arrays or anything, just global event sending may be as complicated as it gets.

So lets get cracking lol:

For the Game Object:

Create an FSM on the object.

Create two global events in the FSM (create an event and click the global tick box). Call them : "Activate" and "DeActivate".

Now keep the start state blank, dont put any action in it and just create state 2.

Right click on state 2 and choose 'add global transition', then add the 'Activate' global event that you just created.

In state 2, add this action: 'Send Event', choose 'event target' as 'broadcast all' and be sure to tick the 'exclude self' tick box. Choose 'DeActivate' as the event to send.

Next create state 3. Again right click and add the DeActivate global event so it transitions into state 3.

In state 3: add this action: 'Activate Game Object' and leave 'use owner' for 'gameObejct'. Then add a finish event and link it to the start state (state 1- which should have no actions in it or events transitioning out of it).


For the Button:
Create a button (GameObject/Create>UI>Button).

Then go here: https://hutonggames.fogbugz.com/?W1192 and download the "Package for uGUI Proxy With Full set of Actions" (it is the second link under the first image).

Import the downloaded package into unity and this will give you the actions you need to communicate with Unity UI.

Then set up an FSM on the button:

State 1: Add the action "U Gui Button On Click Event" (it comes in the action pack). And for 'Send event:' create something like "button pressed" and add it to the state and then select it. This event should go to state 2.

State 2: Use the action 'Activate Game Object', select specify game object (instead of use owner) and drag the first object into the 'game object' space. Then untick the 'recursive' box.

Use the send event action and set the 'event target' to "game object". Then again, specify game object and drag the first game object into the space. For 'event' chose to send the 'Activate' event, that you created on the game object earlier.

NOW! If you just add a finish event and link back to the first state, you will have made an on button. (So when you press the button the object is activated, every other game object will be disabled, but if you press it again, the button does not turn the object it turned on, back off) Read on if you want to make a toggle (on/off) button.

Now copy and paste state 1, to make state 3.
Then link a finish event from state 2 to state 3.

On state 3, right click, chose 'add event', go down to 'custom events' and add the 'DeActivate' event, that you created earlier on the game object, so that it transitions out of 'state 3' into 'state 1'.

Then copy and paste state 2, to make state 4.

Then connect the 'button pressed' event from state 3 into state 4

In State 4: Delete the 'Send Event' Action. Then on the 'activate game object' action, untick 'activate' (this will disable the game object). Add a finished event and link back to the first state.

:D and voila! If you managed to get through that, youre done!

Now copy and paste, either the button itself, or just the fsm to all the buttons. Then just drag and drop the correct item into all the item boxes. So that each button corresponds to a specific item. Do that 40 times and youre all set.

Here is a video of it in action and a general walk through around the setup:  https://youtu.be/9SDyk9kEfJ8 (Never mind my blue Ethans running around, I just put this together in a middle of a concept scene I was working on- as a means of taking a break lol- also I was talking to the video, but apparently had sound recording turned off lol, so it is just a silent video :( )

Good luck with it and I hope this helps!

(PS: this tutorial also should help understand unity ui in playmaker: https://www.youtube.com/watch?v=KZCtGySZ4AI )

36
Hi and welcome to the forum !

So you will have 40 buttons, one for each game object?

And are all objects and buttons present in the scene (so they are not prefabs that you create during runtime?)?

If so a simple way to do it:

Make a button (whichever way you do it-if you're not sure describe what button you need and I will try to explain how to make it). Adds an FSM to the button.
In the first state of the button FSM add whichever actions you use for your button (eg: 'ugui button on click' or something like that), and send an event when the button is clicked to state 2.
In state2; use 'activate object' and instead of 'use owner' choose 'specify game object' then drag the game object from the hierarchy into the 'game object' space. https://hutonggames.fogbugz.com/default.asp?W52

Then duplicate the button 40 times and drag a different object into each one.

This way each button will activate a different game object, while the rest remain deactivated.

This is just a simple way of turning on one game object. If you need any further explanation, let me know (like how to destroy/deactivate the rest of the buttons/game objects).

Good luck with it, hope this helps.

37
Playmaker Help / Re: Scene Load / Restart
« on: July 25, 2016, 10:06:19 AM »
Hi,

When you're running the game, can you see if the FSM actually triggers and goes to the load level state?

If it does, I can only guess that you may have mispelled something or you may not have added both scenes to the build maybe?

If it never gets there, then maybe try adding rigid bodies to every (both) objects involved in the collision (or to whichever object has not go them already?) - but since you're copying and pasting a working object, this is probably not the case.

Good luck with it and I hope this helps.

38
Playmaker Help / Re: Is Trigger and Collision
« on: July 21, 2016, 01:34:21 PM »
Hi and welcome to the forum!

It is hard to figure out without knowing more about your setup. (I know you gave a tutorial link, but without knowing the tutorial already, it is time consuming to search for the right screens (also there is the possibility that you made a mistake while following the tutorial:) ))

But I can try to help by making a guess as to a couple of issues it may be:

1- If you are using the 'collision event' action, then switch to the 'trigger event' action when you make the collider a trigger.

2- If that is not it (like if you're already using the correct action), try adding a rigidbody to both game objects involved in the collision (if they both have not got them already).

Good luck with it and I hope this helps!

39
Playmaker Help / Re: Player stuck on wall when jumping (2d game).
« on: July 20, 2016, 02:49:49 PM »
Hi,

Dont necessarily need to add bounciness, did you try to reduce the friction to near 0?

If it does not work, maybe you need to add this material to the character too... (Ive never tried this in 2d, so sorry if this does not work - it solved the same issue for me in 3d).


40
Hi,

Looks very nice. Some interesting elements. I certainly had fun taking down the first enemy and some of the guys in the second level, but:

Is it right, that you can only use the time stop once? As in the second level I just couldn't take them all out?

I think it is a bit too rigid at the start, the abilities seem fun- but I never had a chance to have fun with them before the second level became too frustrating.

The tutorial appears translated slightly badly, like for example I never realised I need to use the look around controls to aim the bullet, I thought it would automatically get turned onto the enemy (but a lot of the fun was redirecting bullets as I wish, once I figured out that I could do that).

Again I think I personally would like more opportunity to have fun with the powers, or a more drawn out and less deadly tutiorial, rather than being thrown into a room where I am surrounded by enemies in the second level :) (that may just be me though). So yeah I think some polishing in the tutorial and an easier introduction is what was lacking for me, but the game seems full of awesome and fun features individually.

Also I was wondering if you could maybe elaborate on how playmaker was used in this game?

Good luck with it!

41
Playmaker Help / Re: Ecosystem Json error
« on: July 20, 2016, 01:14:05 PM »
Hi Figgy and welcome to the Forum!

Most of the actions can be found by googling them, otherwise just keep retrying the ecosystem over and over again (not to ridiculous extent, but quite a few times), it usually ends up working.

Which actions are you after in particular, if you cannot find them- I may be able to provide a link.

Good luck with it.

42
Playmaker Help / Re: Player stuck on wall when jumping (2d game).
« on: July 20, 2016, 01:06:11 PM »
Hi and welcome to the forum!

I'm not exactly sure what you mean, so sorry for assuming :) .

When you say 'player stuck on wall', do you mean that when you jump and you hit a side of the wall, you don't slide down the wall?

If so you can try to add a physics material to the wall's collider:

https://docs.unity3d.com/Manual/class-PhysicsMaterial2D.html

In the project window just click create and chose 'physics material 2d'. Then set the friction to very low and drag that onto the collider, into the 'physics material' slot. This should make it so that when you hit the wall, you slide down it. (Also if you're making a platformer, I'm sure you will have fun with the bounciness setting :D ).

Good luck with it, hope this helps!

(Edit to add: as you're making a 2d plartformer, you should check out this tutorial, if you have not come across it already that is: https://youtu.be/2TmsuoBlfcQ )

43
General Discussion / Re: how to wait precise in milliseconds
« on: July 18, 2016, 08:04:44 PM »
Hi,

Congratulations on solving your issue!

Just thought I would add this, if you ever cannot get an action because ecosystem is playing up- then usually google will find it.

Here is 'next frame advanced' (hopefully as up to date as the ecosystem one (edit to add: it was posted on in April 2016 so probably should be up to date :D )):

https://snipt.net/dudebxl/nextframeeventadvance/

(Also, Im not moaning about using the wrong forum or anything, but I think your post may have received more attention in the help forum. (Just personally I dont think I visit here as often as there)).

Good luck with it!

44
Playmaker Help / Re: Setting UI Text within prefab
« on: July 15, 2016, 12:32:40 PM »
Hi,

(Edit:)
I think the best solution to your issue is to put the 'set text' action on the prefab in a state which has a global transition into it. This global event/transition should be a unique event, which you will send each time you want to change text. In the 'set text' action, set it up so that a global string variable is the text to be set.

Then the FSM that changes text, just sets the global string variable and 'broadcasts to all' the global event which transitions into the state with the 'set text' action.

This way you can avoid arrays and getting owner and such.


(Original reply:)

Basically one way to interact with prefabs is to put the 'get owner' action on the prefab and then use 'set FSM game object' action to communicate which object has the text to the FSM that needs to change the text.

So the prefab gets owner (so self) to a game object variable and then sets that game object variable as a game object variable in the FSM that changes the text. Then the text changing FSM sets the text on the game object variable that was set by the prefab.

(Otherwise you can use a global variable when you 'get owner' and then simply set the text on the global game object variable. Just be careful with this, especially if you want different prefabs to have different texts)

However I think for your situation you will also need to look into array maker to make things simpler. This is because you want to interact with multiple objects and it will be easier to do so with a list (array).

Hope that makes sense. :/

I'm a noob so I may be wrong and there may be even more elegant ways to do it, but good luck with it!

45
Playmaker Help / Re: Get rotation from animation
« on: July 13, 2016, 10:22:11 AM »
Hi,

Are any of these animations mecanim and have root motion ?

If so, you may need to play around with the import settings, I'm not too familiar with it, būt this image shows what to look for: https://www.google.nl/search?q=mecanim+animation+import+settings+rotation&rlz=1Y3NDUG_enGB514GB514&prmd=visn&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjBw_fb9_DNAhULORoKHe9oClkQ_AUICCgC&biw=962&bih=601#imgrc=ALBtx2qJlxeR6M%3A

Depending on your situation, you may Need to turn it off or on, on the idle or the other anim.

Good luck hope this helps and if not maybe you could provide more info about your situation (like what animation system you are usimg and if they have root motion) and maybe a anim expert will come along and figure it out.

Pages: 1 2 [3] 4 5 ... 13