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 → Two Questions, cog syncing/unsyncing and, player ducking
Two Questions, cog syncing/unsyncing and, player ducking
2004-07-22, 2:39 PM #1
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).]
I am _ Ace_1 _ , and I approve this message.
2004-07-22, 3:50 PM #2
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. -
- Wisdom is 99% experience, 1% knowledge. -
2004-07-22, 7:02 PM #3
Quote:
<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
Catloaf, meet mouseloaf.
My music
2004-07-22, 9:28 PM #4
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).]
I am _ Ace_1 _ , and I approve this message.
2004-07-23, 4:38 AM #5
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.
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-07-23, 7:44 AM #6
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
Catloaf, meet mouseloaf.
My music
2004-07-23, 1:58 PM #7
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
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-07-23, 2:06 PM #8
Player Action is MoTS only.

------------------
- Wisdom is 99% experience, 1% knowledge. -
- Wisdom is 99% experience, 1% knowledge. -
2004-07-23, 2:53 PM #9
wtf a double post. srry!

[This message has been edited by F-Body (edited July 23, 2004).]
This is retarded, and I mean drooling at the mouth
2004-07-23, 2:55 PM #10
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
This is retarded, and I mean drooling at the mouth
2004-07-26, 12:22 PM #11
message pulse

SetPulse(0.01);

pulse:
If(IsCrouching(player)) ClearPhysicsFlags(player, 0x10000);
Return;

Quib Mask
2004-07-27, 5:26 AM #12
But that's a pulse, which causes lag.

------------------
jEDIkIRBY - Putting the Romance back into Necromancer.
Proud Leader of the Minnessassian Council

Live on, Adam.
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-07-27, 6:35 AM #13
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

↑ Up to the top!