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
#11
RE: Floating :P

Nah, the black box are last option. I prefer if it slowly goes down.

(01-26-2012, 03:09 PM)Shadowfied Wrote:
(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?
I did use that, but the effect was as I said in the beginning:

In onstart: AddEntityCollideCallback("Player", "slowmo", "slowmotion", true, 1);

void slowmotion(string &in asParent, string &in asChild, int alState)
{
AddTimer("FlyDown", 0, "FlyDown");
AddTimer("EndSlo", 1.5, "EndSlo");
}

void FlyDown(string &in asTimer)
{
AddPlayerBodyForce(0, 1700, 0.0, false);
AddTimer("FlyDown", 0, "FlyDown");
AddDebugMessage("Happens", false);
}



Dare to explain more please Smile?

The Interrogation
Chapter 1

My tutorials
(This post was last modified: 01-26-2012, 10:01 PM by Elven.)
01-26-2012, 09:59 PM
Find
Your Computer Offline
SCAN ME!

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

(01-26-2012, 09:24 PM)Statyk Wrote: But say you don't want the player to descend when going backwards. Then you know it's a "staircase" =\

Then make a block box that is a MoveObject that moves along the Y axis. Then use collision callbacks to move the box up or down.

Tutorials: From Noob to Pro
01-26-2012, 11:13 PM
Website Find
Elven Offline
Posting Freak

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

that is also good way Big Grin, thank you!

The Interrogation
Chapter 1

My tutorials
01-26-2012, 11:54 PM
Find
Dobbydoo Offline
Member

Posts: 50
Threads: 6
Joined: Aug 2011
Reputation: 0
#14
RE: Floating :P

Just a suggestion, but you could use multiple timers with different forces instead of just one, so that when you start going down, you get lifted up again by a stronger force, and when you go up you have a weaker force.
01-27-2012, 04:06 PM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#15
RE: Floating :P

(01-27-2012, 04:06 PM)Dobbydoo Wrote: Just a suggestion, but you could use multiple timers with different forces instead of just one, so that when you start going down, you get lifted up again by a stronger force, and when you go up you have a weaker force.
yes

Discard that comment. i thought u were asking a question

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-27-2012, 04:26 PM by Tripication.)
01-27-2012, 04:26 PM
Find
Elven Offline
Posting Freak

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

(01-27-2012, 04:06 PM)Dobbydoo Wrote: Just a suggestion, but you could use multiple timers with different forces instead of just one, so that when you start going down, you get lifted up again by a stronger force, and when you go up you have a weaker force.
Very good suggestion. I'll try it out! Prob needs like hour of testing tho =.=

The Interrogation
Chapter 1

My tutorials
(This post was last modified: 01-28-2012, 10:17 AM by Elven.)
01-28-2012, 10:16 AM
Find




Users browsing this thread: 7 Guest(s)