Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Floating :P
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#1
Floating :P

I guess I need to ask help once in a while as well from scripting pros. I, myself tried many things but they didn't end up as I wanted.

So question is, is it possile to push player exactly that much up that he seems like floating or maybe going very slowly down.

Using AddPlayerBodyForce with timer, it may go almost really slowly but at one point it will be pushed back up into the skies.

It would be cool if we could create kind of script what will keep Player pretty much floating in the sky and as smoothly as possible Tongue...

That is, if it is possible Wink.

The Interrogation
Chapter 1

My tutorials
01-26-2012, 12:55 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Floating :P

Do you mean float up? Or hover across the ground?

01-26-2012, 01:34 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#3
RE: Floating :P

Use this loop. You'll need to experiment to find the proper values yourself. Just a word of warning, if you constantly apply vertical force to the player to make them float, it may make it extremely difficult for them to move around. You may need to experiment with also drastically increasing their movement speed to compensate for this unresponsiveness. Just make sure you turn it back down when you want them to stop floating Wink
PHP Code: (Select All)
float fPause =  0.0166f;
void SomeRandomFXN(blahblahblah)
{
// run function instantly, name timer same as function name
PLAYER_FLOAT("PLAYER_FLOAT");
}

void PLAYER_FLOAT(string &in timer)
{
//add player vertical body force here
//loop it
AddTimer(timerfPausetimer);


(This post was last modified: 01-26-2012, 03:07 PM by palistov.)
01-26-2012, 03:06 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#4
RE: Floating :P

(01-26-2012, 03:06 PM)palistov Wrote: Use this loop. You'll need to experiment to find the proper values yourself. Just a word of warning, if you constantly apply vertical force to the player to make them float, it may make it extremely difficult for them to move around. You may need to experiment with also drastically increasing their movement speed to compensate for this unresponsiveness. Just make sure you turn it back down when you want them to stop floating Wink
PHP Code: (Select All)
float fPause =  0.0166f;
void SomeRandomFXN(blahblahblah)
{
// run function instantly, name timer same as function name
PLAYER_FLOAT("PLAYER_FLOAT");
}

void PLAYER_FLOAT(string &in timer)
{
//add player vertical body force here
//loop it
AddTimer(timerfPausetimer);

I didn't know you could make a void like that..(PLAYER_FLOAT("PLAYER_FLOAT")Wink

Also what does float fPause do?



Current - Castle Darkuan
Other - F*cked Map
01-26-2012, 03:09 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#5
RE: Floating :P

@Shadowfied, fPause is just a variable.

01-26-2012, 03:12 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#6
RE: Floating :P

(01-26-2012, 03:12 PM)palistov Wrote: @Shadowfied, fPause is just a variable.
Yeah didn't see the timer at the bottom, just by seeing that I think I understand it. Tongue


Current - Castle Darkuan
Other - F*cked Map
01-26-2012, 03:13 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
RE: Floating :P

Just use block boxes.

Tutorials: From Noob to Pro
01-26-2012, 05:57 PM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#8
RE: Floating :P

(01-26-2012, 05:57 PM)Your Computer Wrote: Just use block boxes.
I was thinking that too, but what if you were walking and want the player to float up, as if someone going to heaven or something, you know?
01-26-2012, 06:51 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#9
RE: Floating :P

(01-26-2012, 06:51 PM)Statyk Wrote: I was thinking that too, but what if you were walking and want the player to float up, as if someone going to heaven or something, you know?

Make stairs out of block boxes.

Tutorials: From Noob to Pro
01-26-2012, 06:56 PM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#10
RE: Floating :P

(01-26-2012, 06:56 PM)Your Computer Wrote: Make stairs out of block boxes.
But say you don't want the player to descend when going backwards. Then you know it's a "staircase" =\
01-26-2012, 09:24 PM
Find




Users browsing this thread: 1 Guest(s)