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 ... 11 12 [13]
181
Playmaker Help / Re: Help with Raycast
« on: February 05, 2016, 09:04:29 AM »
Ok this may be a long shot and I am a sleep deprived noob, but here goes my guess:

Could you store the hit point in a vector3, then get the Y axis into a global float and assumimg your craft only flies at a certain height- you could create the object when the hit points is below your craft's y or enable the object and disable it again?? So how i imagine it:

Empty object with a child sphere Object disabled, randomly on the ground:

State1: Float compare (when raycast y is below the height you need, send event)

State2: set object position to raycast point. get child (save to variable). Activate child. Finish state.

State3: move towards (or however you move your sphere now) and a float conpare (again waititng for the y to get too high). Finish.

State4: deactivate child sphere object. Finish and return to beginning???

Knowing my luck tonight, it wont work, but maybe it will give you a view from a simplistic noob mindset and help you see something you missed before lol. Ive only used raycasts once and then scrapped it and went running back to the simplicity of colliders lol, so Im clearly no expert... Good luck.

Edit: spellchecking  :)

182
Playmaker Help / Re: 2D Joints (Setting anchor point in playmaker)
« on: February 05, 2016, 03:55:28 AM »
Hi Jean, thank you very much for reading and answering. To be honest I wish I had searched harder, because as you say- of course it is all possible with set property. I never really had a good grasp of set property and I think the fact that a few joint actions existed confused me, either that or my brain is too fried from all this playmakin.

Thank you once again for your help and for considering creating that action.

Also for other real noobs like me, what I did was simply:

On the Character:
Used action 'get component' to save character's rigid body to an object variable, called 'charRigidVar'.

On the item im joining:
I used 'get component' to save the joint to an object variable.

I used 'set property' to set anchor body and then chose the 'charRigidVar'.

Hopefully, I didnt forget anything lol. Also the tutorial Jean posted above is the only thing that made this workable for me as it explains all those object variable types, that should confuse most noobs like me...

183
Playmaker Help / Re: Object not destroyed after collision detection event
« on: February 03, 2016, 01:42:03 AM »
Not sure, just a noob trying to be helpful.

But couldnt you simply add an fsm on the bricks:
State1: Add action; Collision event 2d. Set the collision tag to be the 'ball' (and tag your ball object with that tag). On collision send event to State2.

State2:  destroy self (and any point adding you need to do before that or whatever).

Im not sure if this messes with your tutorial progress, but may work for the game in general... Good luck.

184
Lol, i was afraid that was a problem, as I try to be clearer- I end up rambling. Thanks for trying to understand.

I just want a 2d side scroller binding/hook-shot/grappling hook weapon and was wondering if anyone might know how to elegantly make one with playmaker.

Ramble:

Right now ive tried various things from raycasts to adding velocity to an empty object and my latest attempt which I am liking so far is simply using animator to move the head of the grappling hook. My fsms are starting to be a real mess from experimenting...

But the biggest problem is that I want the line to break off from the player and retract into the enemy I hit. Smoothly regardless of the distance I hit the enemy from (right now i have 19 different retracting animations and I play a different one depending on thre distance the player was from the enemy upon trigger :/).


My attempts on video, should give an idea of what Im trying to achieve:


Close to working 1 (but not really, videonfrom above post): https://youtu.be/rQMHbV2O6wQ

The current state of things:
https://youtu.be/0kDEEUENngg

Just want my little vine shoot weapon to work smoothly... :(

Thanks again for looking and Sorry if I just rambled on again...

185
Hi everyone, sorry to be bumping this, but I just wasted a day's worth of time trying to make this work.

Here is a youtube video of it nearly working (basically what i have so far):
https://youtu.be/rQMHbV2O6wQ

Please guys, I know there are many geniuses here who could put together an attack like this in 5 minutes or so. I would really appreciate even the tiniest bit of input from one of you.

My eyes hurt and my head is starting to, but i just cant let this go lol. Right now it is working barely through a bunch of FSMs that are in a very non-elegant fashion... I better get back to it... Thank you all.

186
Yeah but if you add velocity or move towards the mouse while ignoring vertical, shouldnt the colliders take effect?? I know this still dont help you clamp anything, sorry...

187
Not sure about your second question, but couldnt you restrict the paddle movement with colliders around the edge? Or does that not do it for you?

There are clamp variable actions, so maybe experiment with them until a more experienced user pitches in, as the closest ive come to clamping anything is this one float Ive tried it on...

In fact as I mentioned tutorials here is one using playmaker to make a breakout game:

https://youtu.be/P3NwvU-Z8ws

188
Im a noob myself but ill have a go.

In the same state with get mouse x, add an action 'Set Velocity' (or 'Set Velocity 2d' if it is a 2d game or if youre using a 2d rigid body on your object)

In the set velocity action under x axis put in your variable (the variable that stored the horizontal axis).

From my understanding that should be it, but I only know this from tutorials ive done recently.

Also in case for whatever reason you dont want to use velocity there is a way i have found that is not very elegeant and probably very nooblike but:

I have done it before with an empty game object on the left and right of the screen. You need to get each of their positions into a global variable, then on the get mouse x state have a compare float, if float is under 0 go to left state, if over 0 go to right state. In both left and right state have a move towards action (left one moves towards empty on left, vice versa for right one). Ignore vertical on the move towards actions. Insert a Compare float action under the move towards in both left and right state, have the float compare sending it back to centre and right, depending on </=/> to 0.

As I said the second method is not very elegant, but does not use velocity.

Good luck, also watch some tutorials, this is the first thing most of them cover lol.

Edit:

Sorry I thought you were actually using get axis not get mouse x, ive edites the post so it makes sense now. I hope it works for you, but im now realising the mouse controls may be trickiet than simply using axis. Still check out the breakout tutorial usimg playmaker on youtube lol: https://youtu.be/P3NwvU-Z8ws

189
Playmaker Help / Re: Need Playmaker state to set off a trigger
« on: February 01, 2016, 11:05:14 AM »
I am not really sure about what you are trying to do and im sure you have figured it out over the last month but, as a noob myself, ill have a go to at least provide my idea of a solution:

So there is a text box that reads 'Winner' when the player collides with it?

You want to make it so that the box automatically reads 'winner' without being collided with, as soon as the maximum score is reached??

If so I think it may be easy:

I assume you are counting your score somewhere (lets say a float variable). Also lets say the maximum is 100.

Also I assume that you have an FSM on the text object, which sends an event upon colliding with player.

First make the score variable global, so you still add to it the same as before.

Secondly on the text object FSM make a global event. Add a state that is not connected to the other states and right click on it to 'add global transition' and add the global event you just created. You do not need any actions on this state, just add a finished event and send it to the State that displays your text.

Then make an empty game object with a float compare action on it (every frame). If float is less than 100- do nothing, if float equals or is greater than a 100 go to next state. In this state you should add action 'send event', chose to send the global event you created on the text object FSM. In the dropdown box, chose broadcast.

This is a very rough idea of how to do it, written by a noob, but then again if i understand your question, then watching a few tutorials and reading a bit more about playmaker may be useful.

I tried to answer this as i think its best to have at least one answer to all questions, especially for noobs like me, but to be honest im still not sure if I understood the question. I hope it helps...

190
Playmaker Help / Re: Add Force 2D vs Tween
« on: February 01, 2016, 10:44:01 AM »
Hi, im sure you have solved it by now, but for the sake of there being at least one answer to your question:

Firstly I also am a noob.

I used this tutorial and found it very useful:

This is part4, where you learn to make melee and shooting attacks:

https://youtu.be/91k2FSZOuE0

It is totally playmaker based.

As a noob I can summarize what he does as:

- Upon shoot button being pressed Creates a projectile object (which he saved as prefab previously) and adds velocity to this object in the correct direction.
-Upon spawning the object waits a set time before going to a state with 'destroy self' action.
-The object is tagged as projectile and enemies are FSMed to react on triggering the projectile tag.

Hope it helps someone.

191
Playmaker Help / Re: New to unity and playmaker
« on: February 01, 2016, 10:34:44 AM »
Hi,

I do not know if you are still looking for tutorials, but id thought id share my favourite:

https://youtu.be/2TmsuoBlfcQ

It is a really good introduction to making the main elements of a 2d platformer using Unity and playmaker.

After watching all 5 parts i was quite confident experimenting further myself.

Only issue is I do not think he provides any sprites or other project files to work with. So I recommend that before watching it you locate some free spritesheets, that you would like to work with. Which overall is a good experience, also you can take the opportunity to learn drawing your own. For the tutorial you will need:

-player sprite (walk, hit, jump, land animations)
-Ground enemy (walk anim)
-Airborne enemy (fly anim) - at least one, although you will be taught to program two different ones.

For importing sprites into unity and getting them ready for the above tutorial, you should use this tutorial:

https://youtu.be/O_0gZuqW6y8

Probably the nicest tutorial out there for this, covered over multiple parts.

There are others that I have skimmed before, but these two I remember being the most useful in setting a good foundation for using unity and playmakerin 2d games.

The platforming tutorial is really good, I though it was clear and basic, but very informative for me as a noob. Also it is without any backtracking or too many mistakes being made, like in the 2.5d platformer tutorial that is available on youtube (still search for this 2.5d one too as it has useful, playmaker specific info, but watch it after you have a better idea, then you can spot his mistakes before he makes them lol, rather than being totally confused by them).

Hope it helps...

192
Hi all! My first post on these forums, although ive been lurking for a while.

First of all thank you all for the help I have found on these forum so far, it is been a great source of information.

Also playmaker is awesome, via a combination of these forums and youtube for info, playmaker has allowed me to figure out how to do everything I ever wanted so far...

The short version:

I have been trying to make one animation start time be dependant on another animation's finish time. So if an animation on my character was transitioned to another animation - an animation on my projectile would start from a certain time.

An example of what im trying to do is that if two animations are 5 seconds long, If animation A ends 2 seconds after starting- I need animation B to start 2 seconds from it's end.

After trying a few strange attempts at this I think I just got muddled up in all the logic lol. To be honest im not sure if it is even possible and what actions to use. Apart from timing the start and end somehow in the fsm itself, which I need to experiment more with.

But really I was hoping the animator could make this easier and maybe im just missing the right action.

Thank you all for reading, I hope it made some sense after all my rambling and I really hope someone can help.

Also let me apolagize in advance if this should be totally obvious, im still quite a noob. Ive literally only been learning game making for a few months and this is the first thing that has really stumped me, I think it may be because i just have no idea how to search for the answer and have tried many different searches.


The full story of the problem:

I am trying to make a 2d 'tentacle like' rope attack for a side-scrolling 2d game. I guess it could be compared to the mortal combat 'get over here move' but without the dragging over here of the enemy.

I would like my character to fire a rope/tentacle which extends from his hand. Upon reaching an enemy the tentacle would detach from the player's hand and appear to dissapear into the enemy.

The issue is I want the tentacle to be able to be fired,  detach and disappear into the enemy regardlesa of the distance the character is from the enemy.

A diagram:

Character = []  Enemy= ()  Tentacle= ----

[]----       ()   =character fires tentacle
[]--------  ()
[]----------()    =tentacle hits enemy
[]   -------()
[]       ---()     =tentacle disapears into enemy
[]           ()

The way ive been trying to do it is by having the character play an anim of the tentacle coming out. At the same time the character creates a moving invisable object, which i have timed to move perfectly with the animation (the object is parented to char upon creation).

When the object triggers an enemy it stops moving and plays the 'retracting tentacle' animation on where the object is.

When the object hits an enemy it sends event to char and stops the character from playing the 'extending tentacle' animation.

That all more or less works (i think i need to parent the object to the enemy it hits, but that is not the problem).

The problem is that I need to make the 'retracting tentacle' animation be dependant on  the length of the 'extending tentacle' animation.


Also ive considered using scaling to do it also, just havnt thought it through yet.
The main body of the tentacle can be scaled on the X axis without it affecting the way it looks (basic green tentacle), just has a pointy end- if that gives anyone an easy idea to do it with scaling...

Thank you all, especially if you have read this far, I appreciate any input. The great thing is that im such a noob that i bet there is plenty of ways to do what im doing and im just not seeing it.

(also just realised the way i described the attack- it sounds gruesome, in the game the tentacle does not disapear into the enemy's body, rather it binds the enemy lol. Also sorry for the super long post, just realising now...) :o

Pages: 1 ... 11 12 [13]