Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Dev_Sebas on July 24, 2011, 08:46:53 AM

Title: State Jump[SOLVED]
Post by: Dev_Sebas on July 24, 2011, 08:46:53 AM
Hi all
I am building a first person controller with playmaker but i can not put my person jumping i am try with "set transform" but i can not
any help...
Title: Re: State Jump
Post by: Dev_Sebas on July 25, 2011, 01:58:07 PM
Please help...
Title: Re: State Jump
Post by: LordShaggy on July 26, 2011, 02:46:29 PM
So what kind of jump to do you want to do ?

Are you having an animation issue or just the getting it to move like it's jumping in the first place?

Title: Re: State Jump
Post by: Dev_Sebas on July 26, 2011, 07:34:16 PM
So what kind of jump to do you want to do ?

Are you having an animation issue or just the getting it to move like it's jumping in the first place?



Hi I need only a jumping camera very simple, no animation just movement like with translate or something but I can not
Bye
Title: Re: State Jump
Post by: jeanfabre on July 27, 2011, 03:02:16 AM
Hi,

 It's important that you provide some explanation about how you envision your feature. there are simply an infinite amount of solution for "jumping" :) but likely only a few that will suit you.

for example is the following jump suitable?

user press "jump", the camera translate into the air using a constant translation value for a predefined amount of time. Once it reached the predefined amount of time it falls down again using the same translation constant until it reaches the base height of the camera. Pressing jump while already jumnping has no effect. The jump is relative to the world, that is the camera is translated by the world y axis during the jump.

If that's suitable, I can build a quick example ( for next week, meanwhile try to experiment :) ).

 Bye,

 Jean
Title: Re: State Jump
Post by: Dev_Sebas on July 27, 2011, 09:13:46 AM
I just need for my first person jump simple like games.
I think is with a set position or something
If any people make a example will be very nice
Thanks Jean

Title: Re: State Jump
Post by: Dev_Sebas on July 27, 2011, 09:15:00 AM
I tried with with set position but camera stays in air
Title: Re: State Jump
Post by: Dev_Sebas on August 03, 2011, 04:26:28 PM
Please give me some help...
Title: Re: State Jump
Post by: jeanfabre on August 04, 2011, 02:35:09 AM
Hi,

 Sorry, I am running being my work. Hopefully I can tackle this during the week and provide an example.

 Bye,

 Jean
Title: Re: State Jump
Post by: Dev_Sebas on August 04, 2011, 09:39:09 AM
Thank´s for it . Yes if you have time I would greatly appreciate ;)
Title: Re: State Jump
Post by: qholmes on August 04, 2011, 01:01:12 PM
Well it seems that you are maybe missing some basic skills..

But have you tried the iTween move by? Use the y direction and it will move it up and then have another one that will do the move down.. I looked and there is not a way to do an up and down with a single iTween that i could see.. but it makes me think that i will modify the iTween code to implement a new loop function of loop once so you can Ping Pong a single loop.. I can see that being handy some times.

I did a simple test and it worked just fine here.. I am not using user input though.

Q

Edit:

Are you using a Character Controller on your object?

Q
Title: Re: State Jump
Post by: Dev_Sebas on August 04, 2011, 05:11:51 PM
Well it seems that you are maybe missing some basic skills..

But have you tried the iTween move by? Use the y direction and it will move it up and then have another one that will do the move down.. I looked and there is not a way to do an up and down with a single iTween that i could see.. but it makes me think that i will modify the iTween code to implement a new loop function of loop once so you can Ping Pong a single loop.. I can see that being handy some times.

I did a simple test and it worked just fine here.. I am not using user input though.

Q

Edit:

Are you using a Character Controller on your object?

Q
Hi thanks for help I will try
And Yes I am using a Character Controller on my capsule.
Bye
Title: Re: State Jump
Post by: Dev_Sebas on August 04, 2011, 05:59:21 PM
I have tried but it stays in air
Bye
Title: Re: State Jump
Post by: Dev_Sebas on August 04, 2011, 06:01:23 PM
And yes will be good you change the ITween code to loop
Bye
Title: Re: State Jump
Post by: qholmes on August 04, 2011, 09:12:12 PM
Ok well i have not tried the character controller myself but maybe it will be a diversion tonight.

Did you do two iTweens one for up and the next for down. The second will have to be triggered from the first... So make a separate State with a second iTween in it for the down and a global Transition on it. The in the first iTween send the transition from the finished state.

Does that make any sense?

I will try it later if i have time. working tonight anyway.

Q
Title: Re: State Jump
Post by: qholmes on August 04, 2011, 10:02:19 PM
So i dove into character controllers.. works pretty cool.. And i found two ways to jump.. I set up a new State with 2 actions in it.. Controller Move and put in a +2 in the Y vector and then a Send event to go back to the main State with a 0.5 sec delay.. Gravity pulls you back to earth.

The other way was with the two iTweens One to send you up and the other to bring you down.. Hmmm maybe gravity would bring you down in this one too.. not sure.

They both worked for me.

Maybe this will get you going. If not Jean is awesome and i am sure she can whip something up for you. But work is always getting in everyones way.

Edit:

So you only have to use iTween up if you want as gravity will pull you down again.. If you dont want to control the curve down.

So Controller Simple Move has gravity built in and works good. It does not support Up and down manual moves just gravity.. So you just jump out of that state and move your controller up with a Controller Move action or an iTween action then back again and gravity will take over.. Cool i can use that in the future. ok back to work for me where i dont need any of these things yet


Q
Title: Re: State Jump
Post by: Dev_Sebas on August 05, 2011, 11:09:12 AM
Hi thanks for help I am focus on first way of your second post because I don´t have understand very well your first post and I am too intressed in can control the fall time.But my first person go and go to air don´t stop.
Can you take a capture selection of your jump like how many global transitions have you got?
Bye and thanks for help
Title: Re: State Jump
Post by: Dev_Sebas on August 05, 2011, 11:20:58 AM
I have this.
Title: Re: State Jump
Post by: qholmes on August 05, 2011, 11:36:24 AM
Hey i think you have it... Just add a global transition to your Player State and set it to your Event Normal Position.. And it should work perfect!!

Q
Title: Re: State Jump
Post by: Dev_Sebas on August 05, 2011, 04:54:22 PM
Hey i think you have it... Just add a global transition to your Player State and set it to your Event Normal Position.. And it should work perfect!!

Q

OOOHHH my good it jumps ... it jumps yes ;D ;D !!! Thanks a lot super nice just a question when it jumps Player stop and if I what the player jumps and walk at same time?
Bye thanks a lot a again
Title: Re: State Jump
Post by: giyomu on August 05, 2011, 07:30:25 PM
if you want make walk and jump in same time , you may split into 2 fsm, one will take care the jump, so the one that handle the run or walk will still work too
Title: Re: State Jump
Post by: qholmes on August 05, 2011, 08:51:46 PM
Exactly..

Glad it is working for you.

Q
Title: Re: State Jump
Post by: Dev_Sebas on August 06, 2011, 10:36:30 AM
I will try later thanks by now :)
Bye
Title: Re: State Jump
Post by: qholmes on August 06, 2011, 11:36:34 AM
Yes i expect that you should have separate FSMs for each control that you want to act simultaneously.. they will all run in parallel.

Q
Title: Re: State Jump
Post by: Dev_Sebas on August 06, 2011, 06:29:56 PM
Thanks I will try
Bye
Title: Re: State Jump
Post by: Dev_Sebas on August 06, 2011, 07:44:14 PM
Hehe it work very well  :) :)
Thanks guys
Bye
Title: Re: State Jump
Post by: Dev_Sebas on August 06, 2011, 07:52:06 PM
I am trying make my player duck should I make with Controller Move ?
Bye
Title: Re: State Jump
Post by: qholmes on August 06, 2011, 10:30:51 PM
Simple move only does x and Z

Controller Move does up and down too.. so even though i dont have much character experience... my test the other day i would use the Controller Move for anything up and down.

So yes.

Q
Title: Re: State Jump
Post by: Alex Chouls on August 06, 2011, 11:04:59 PM
Also check out the Character Controller Settings action:
http://hutonggames.com/playmakerforum/index.php?topic=395.0

To duck you'll probably need to change the height of the capsule...
Title: Re: State Jump
Post by: Dev_Sebas on August 07, 2011, 08:50:32 AM
Thanks :)
I am having troubles with Controller Move.
But with Character Controller Settings it is working but have a problem now because my Camera don´t goes down too. I need Camera goes down too. How can I make it?
Bye
Title: Re: State Jump
Post by: qholmes on August 08, 2011, 10:44:56 AM
What is your set up for your camera? Do you have a character or just a camera view that moves around?

Q
Title: Re: State Jump
Post by: Dev_Sebas on August 08, 2011, 05:46:22 PM
It´s for just a simple FPS (character).
Bye
Title: Re: State Jump
Post by: qholmes on August 09, 2011, 04:35:41 PM
Well i assume that that means that you are just using a camera to move around and you dont see the character.. I am also not huge into games but that is what FPS would mean to me..

So i tried a few things and if you adjust the Character Controller Height then your object or camera will get a new centre reference but if you adjust too fast it might fall through your floor which would be very bad.. So i think maybe for ducking you should just keep your camera as a child of another object with the Character Controller on it.. That way it will follow it everywhere and react to it etc.. but you can easily adjust the Y axis using iTween actions or something separately. I did not try that but it seems to make sense to me.

Q
Title: Re: State Jump
Post by: Dev_Sebas on August 09, 2011, 06:31:12 PM
I only see the arms and legs.
Hum... I see Ok I have my capsule (player) with a Character Controller. And have a camera child of capsule (player). But only capsule (player) go down with Character Controller Settings camera don´t.
You say with a iTween ... ok like at ? I am not good with iTweens. Can you help me ?
And look, a FPS for me is ... you can watch a small movie like Crysis or FarCry or Call Of Duty.
Bye
Title: Re: State Jump
Post by: qholmes on August 10, 2011, 01:06:46 AM
So what are you changing to get your character to go down with the Character Controller Settings?

If your camera is a child then if you put an action on your camera to iTween Move By (y -1 or something0) then it should work. When you trigger your Character to Squat or duck or what ever you are doing just trigger the Event on your camera to move down.. Your camera is not moving down because the actual position of your Character is not changing.. just the settings of the Character Controller.

Hope that helps

Q
Title: Re: State Jump
Post by: Dev_Sebas on August 10, 2011, 01:37:52 PM
Thanks a lot men!! :)
Just perfect :)
Bye
Title: Re: State Jump
Post by: qholmes on August 10, 2011, 02:16:52 PM
No problem.. success is good!

Q