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 → client/server weapons
client/server weapons
2002-09-24, 9:18 AM #1
What cog flags to use in the client cogs? Most seem to use 0x440, while others use 0x240...

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-24, 10:35 AM #2
0x240 works fine for a typical weapon client cog. 0x200 stops the weapon creation from being synced on other computers, and 0x40 makes the cog function locally - no event messages are forwarded to the server. And there is no 0x400 Cog Flag.

If the client cog you're using is an inventory cog, then you shouldn't have to use the 0x40 flag, just 0x200.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-24, 11:00 AM #3
Ok, thanks a lot.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-24, 12:29 PM #4
Another related question:
Would it be better to handle sound playing and animations in the main cog, or in the client cog?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)

[This message has been edited by zagibu (edited September 25, 2002).]
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-24, 2:20 PM #5
It depends on the usage of the sound.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-09-25, 1:17 AM #6
just the standard firesounds and external animations...

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-25, 3:50 AM #7
Another question:
Since FireProjectile() isn't synched, is it safe to use it for displaying local effects? Or does it create lag anyway?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-25, 7:38 AM #8
Quote:
<font face="Verdana, Arial" size="2">Would it be better to handle sound playing and animations in the main cog, or in the client cog?</font>


Either way will work. If you play them from your weapon cog, then the weapon cog will tell the other computers to do the same. If you play them from your client cog (with 0x200), then they'll play locally on each computer anyway. Just the same, I would use the weapon cog.

Quote:
<font face="Verdana, Arial" size="2">Since FireProjectile() isn't synched, is it safe to use it for displaying local effects? Or does it create lag anyway?</font>


FireProjectile() normally syncs (or tries to), but using the 0x200 flag will stop that. When unsynced projectiles are created on each computer, they may be given different thing numbers, and each computer will be responsible for its own projectile. So it depends on what kind of local effect you need.

Without the 0x200 flag, a cog will broadcast sync information - creating some degree of lag. With the flag, no sync information is sent.

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

[This message has been edited by SaberMaster (edited September 25, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-25, 8:30 AM #9
Hmmm. I always thought FireProjectile does not try to sync, cause if you use it to fire custom projectiles, they are only displayed on the local machine. Anyway, I try to fire particles locally in a weapon cog. Any suggestions on how to do that?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-25, 11:25 AM #10
No matter which verb you use, the creation of a thing using a static.jkl template cannot be synced. LEC did not intend for the static.jkl to have templates.

In MotS, there are verbs to create things locally in a cog without the 0x200 flag, but not in JK. The best way to do it in JK is to send a local trigger to a 0x200-flagged cog.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-25, 12:31 PM #11
How do you send a trigger that is not broadcasted to the other players?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-25, 1:29 PM #12
Give the trigger a player for a destination. For example:
Code:
SendTrigger(player, ID, 0, 0, 0, 0);


------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-25, 1:56 PM #13
Yey, thank ya.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-09-26, 6:35 AM #14
Glad to help. [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!