View Full Version : Two Questions, cog syncing/unsyncing and, player ducking
Ok, the first question. I have this cog, it uses an insanly fast pulse that can make tons of lag. I tried to put a special flag at the top to make sure the pulse isn't synced in a multiplayer game, but for some reason the host could use it, have no lag at all, but... when any other player used it, lag went through the roof from the pulse. The cog uses flags=0x240 and is activated with SendMessage();. I'm guessing the flag is all I need to change, but if not I can post the entire cog(it's long).
Ok, question number two... Is there any way at all to disable the player's abilty to duck? ParseArg()?, clearing a flag?, ANYthing?, and I'm leaning away from using another insanly fast pulse... unless number 1 gets fixed.
Ways to do any of these would be a REALLY big help.
------------------
GetThingSignature(Ace1);
[This message has been edited by Ace1 (edited July 22, 2004).]
The_New_Guy
07-22-2004, 06:50 PM
Well I dont have answers for either of your questions but possibly another path to explore... or another dead end.
Do you really need to be using a fast pulse, could you switch to a for() or while() loop instead?
The only reason I mention it - is because it has been my experience that when performing a some loops, that JK will not even attempt to 'sync' the event that are occuring within.
For example - changing every surface MAT in the level. When performed in a for() or while() loop I have noticed that the perhaps the first few surfaces change for everyone but then it becomes a local effect (without use of cog flags). Maybe at that point it just a matter of dropped packets, but it never seemed to lag host or other players in games.
I have often wondered if JK does an evaluation of how much data it can send and ignores the rest.
If this sounds crazy just ignore my ramblings. http://forums.massassi.net/html/wink.gif
------------------
- Wisdom is 99% experience, 1% knowledge. -
DogSRoOL
07-22-2004, 10:02 PM
<font face="Verdana, Arial" size="2">Originally posted by Ace1:
Ok, question number two... Is there any way at all to disable the player's abilty to duck?</font>Not unless you're using MotS.
------------------
For a healty meal, eat mashed potatoes, peas, and catloaf.
"Massassi's cuttin' into my free time, man."
Valuable Life Lesson: Frog + Potato Gun = Blindness (http://www.local6.com/news/2116865/detail.html)
No, no MOTS, but since some of the weirdest things have been figured out with just JK cog, I think there has to be at least some way to do it.
Any way at all, even if it can't truely be disabled, what about simulating it??
------------------
GetThingSignature(Ace1);
[This message has been edited by Ace1 (edited July 23, 2004).]
JediKirby
07-23-2004, 07:38 AM
The biggest problem right now, is that the player is able to hide in the ground with our current cog which makes the player lay down. We need to disable this. Also, is there any way to move JK's player hit radius with the player down?
JediKirby
------------------
jEDIkIRBY - Putting the Romance back into Necromancer.
Proud Leader of the Minnessassian Council
Live on, Adam.
DogSRoOL
07-23-2004, 10:44 AM
Try pulling the duck function out of the player's puppet file. I don't know if it'll work, but it'll stop the animation of the ducking keyframe at least.
------------------
For a healty meal, eat mashed potatoes, peas, and catloaf.
"Massassi's cuttin' into my free time, man."
Valuable Life Lesson: Frog + Potato Gun = Blindness (http://www.local6.com/news/2116865/detail.html)
LKOH_SniperWolf
07-23-2004, 04:58 PM
Actually, it is possible. At least I'm quite sure anyways. Check out this tutorial...
http://www.massassi.net/tutorials/keytrapping/player%20action.html
It has pretty much just what you want.
It talks about keytrapping... so just trap the crouch key, and change what happens if you're laying down at the same time. I've always remembered it because keytrapping seems something that would be extremely useful in a mod. Or perhaps even a level. (Maybe make a powerup or room where your movement keys are reversed... just for an example)
------------------
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
The_New_Guy
07-23-2004, 05:06 PM
Player Action is MoTS only.
------------------
- Wisdom is 99% experience, 1% knowledge. -
F-Body
07-23-2004, 05:53 PM
wtf a double post. srry!
[This message has been edited by F-Body (edited July 23, 2004).]
F-Body
07-23-2004, 05:55 PM
There is a "IfIsThingCrouching()" or something similar in JK cogs that I have used and it works, from experience. Maybe someone could conjur up some sort of code using that I don't know
------------------
nil nip nada zip zero naught lip zil
Quib Mask
07-26-2004, 03:22 PM
message pulse
SetPulse(0.01);
pulse:
If(IsCrouching(player)) ClearPhysicsFlags(player, 0x10000);
Return;
Quib Mask
JediKirby
07-27-2004, 08:26 AM
But that's a pulse, which causes lag.
------------------
jEDIkIRBY - Putting the Romance back into Necromancer.
Proud Leader of the Minnessassian Council
Live on, Adam.
Quib Mask
07-27-2004, 09:35 AM
A pulse by itself causes 0 lag. What you do IN the pulse is what can cause lag. In this case, the pulse unducks you, every time you duck, and only if you are ducking. The only data that's sent over the network (and can cause lag) is ClearPhysicsFlags(player, 0x10000), but that only happens every so often (not every 0.01 seconds, because it's only sent if you duck).
In my COGs I have probably 3 or 4 0.01 second pulses that cause no lag whatsoever (at least 1 of them does absolutely nothing that's sync'd).
Quib Mask
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.