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 → JO jump
JO jump
2002-12-20, 5:10 AM #1
How can I reedit force_jump.cog to set force jump like in jedi knight outcast. I want just to hold the button and my actor will jump higher, higher and higher until I stop to hold the button.
2002-12-20, 5:22 AM #2
No. Not in the way your thinking. When you activate an invetory cog (Force powers, feildlight, etc), 'Activated' is called once. So, the only way to do it would be to start a pulse the first time Activated it called, and starting counting up an integer in the pulse. Then, the second time Activated is called, and hte pulse, and propel the player at X times, where X is the integer that you were counting in the pulse...
And when the moment is right, I'm gonna fly a kite.
2002-12-20, 7:38 AM #3
GBK, I don't exactly understand how to do it(what functions I need to add to "activate" and "pulse" messages). Can you write a code?
2002-12-21, 9:52 AM #4
you arent right GBK, 'Activated' isnt called once, look at force jump - if you press F5 short kyle will jump, if you press it longer he will jump higger. I thing that you should edit orginal Force Jump cog Starkvad
2002-12-21, 10:08 AM #5
No, I wasnt wrong. Activated IS called only once. Check your references before citing them. LEC's force jump uses 'Deactivatebin' to time the jump. I forgot about that method... [http://forums.massassi.net/html/frown.gif]


In a nutshell, when you use 'Activatebin', JK times how long the bin is active. 'Deactivatebin' returns that amount of time. Its kinda tricky to set up, but it should work.
And when the moment is right, I'm gonna fly a kite.
2002-12-21, 1:16 PM #6
Well, this should work how I think you want it to:

In the activated message, set a relatively small pulse, and in the pulse use ApplyForce to propel the player upward. Then in the deactivated message, stop the pulse. You should probably also use a SetTimerEx of about...5(?) to stop the pulse also, so they don't, well...fly.

Try that...it should do the trick. It'll probably take abit of messing with the pulse size and the ApplyForce scale to make it look natural, though.

[edit - Oh, and if this still looks odd, try removing the gravity flags, ClearPhysicsFlags(player, 0x1) I think it is, and he won't seem like he's jumping and falling really fast...]

-TIE

[This message has been edited by TIE_14 (edited December 21, 2002).]
2002-12-21, 1:37 PM #7
I have an idea, I'm not going to code it bacause I'm feeling abit lazy right now [http://forums.massassi.net/html/wink.gif]. The origanal cog runs by taking the time inbetween activated and deactivated, the same is true for the bowcastor weapon cog. I applies force upward based on that time, so instead of afterwords, do it while its being deactivated. Add the apply force each time its deactivated. If you don't understand me, I'll become slightly less lazy and code it.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-12-22, 7:48 AM #8
I'm sorry, but I still dont understand how to whrite it. And one more question: does anybody know where the Datamaster is located.
2002-12-22, 8:13 AM #9
http://www.geocities.com/sabersdomain/files.html
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!