Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → How do you get the "bouncepad.cog" to work?
How do you get the "bouncepad.cog" to work?
2003-07-03, 2:32 PM #1
I've tried doing it, it looks simple enough, but my character's feet just fall through the floor and he starts sliding around, like when you haven't flagged a surface floor correctly.

I think my problem is with the "xvec (int)" and etc. I've tried entering in vectors but it won't accept. I also tried putting a ghost at the point I want the player to jump to and typing the ghost's positional info into the blanks, but that didn't work either.

What am I doing wrong?

------------------
You'll just have to accept that some days you're the pigeon, and others the statue.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2003-07-04, 10:30 AM #2
This is the one Gunboy wrote, right? What value do you have for the x, y, z and force values?

BTW, the x, y, z, and force variables should not be declared as ints because they need to hold flex values. Change them if you want.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-07-05, 7:32 AM #3
Yeah, it's Gunboy's cog.

Excuse me, I'm very inexperienced with cog, what are you saying? What should I put in the x, y, z, and force variables banks? What do you mean change them if I want? The bouncpad.cog has to know where it's sending the player, right? Default, they all had "1" in them? Should I just leave them all at 1, or do I need to use veccalc or something?

------------------
You'll just have to accept that some days you're the pigeon, and others the statue.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2003-07-05, 4:31 PM #4
Okay, the x, y, and z values are for direction. Enter 0 for x and y, and enter 1 for z. Then enter 500 for force.

If it doesn't work with those values, something is wrong with the way the cog is being used. If you want to use a ghost for the player to jump at, then you'll need to modify the cog - the code would be:
Code:
dirVec = VectorSub(GetThingPos(ghost), GetThingPos(player));
dirVec = VectorNorm(dirVec);
ApplyForce(player, VectorScale(dirVec, force));


What I meant by changing the variables' type is that vector and force values can have a fractional portion like 0.1. Integers don't hold fractions so if you want to fix that, open up the cog and change 'int xvec' to 'flex xvec.' And the same for yvec, zvec, and force.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-07-05, 6:53 PM #5
Yay! It works! Thankyou so much, I feel like such a dodo!

------------------
You'll just have to accept that some days you're the pigeon, and others the statue.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2003-07-05, 8:05 PM #6
You're welcome. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!