Packets
#1
I'm not realy familiar with packets but is it possible to do for example:
World:SendPacket(PACKET_SOUND_PARTICLE_EFFECT, 2000*, BlockX, BlockY, BlockZ)
*2000 is the fire particle
to spawn smoke particles at a point?
Reply
Thanks given by:
#2
Currently, no. It is planned that some packets may be available to plugins, but only a handful, such as the plugin channel message or the scoreboard (when I find out what it does Wink )

To make things more complicated, MCServer is trying to walk away from these cryptic functions (see, you yourself had to put a note underneath it saying what it does) towards more friendly names. So we have cProtocol::SendSpawnObject() and cProtocol::SendSpawnVehicle() functions, although they both use the same packet. This might come in handy if ever the protocol decides to spawn vehicles in a different way than "objects", but it's also handy in how people reading the code immediately know what the function does, instead of looking up parameters for packets.
Reply
Thanks given by:
#3
then is there a way to spawn:
  • lightning
  • Particles of any kind
  • Sounds
Reply
Thanks given by:
#4
Do you mean lightning?
Reply
Thanks given by:
#5
(03-29-2013, 02:58 AM)bearbin Wrote: Do you mean lightning?

yea sorry. Wink
Reply
Thanks given by:
#6
Lightning: cWorld:CastThunderbolt(BlockX, BlockY, BlockZ);
Particles: not available to plugins yet; C++ uses cWorld::BroadcastSoundParticleEffect()
Sounds: not available to plugins yet; C++ uses cWorld::BroadcastSoundEffect() or cWorld::BroadcastSoundParticleEffect() (depending on the sound)
Reply
Thanks given by:
#7
thanks but maybe something to note is that i just found out that CastThunderbolt doesn't make any sound.
Reply
Thanks given by:
#8
I'm not sure whether that's a bad thing or a good thing. Imagine a plugin wants to cast thunderbolts with different sound / no sound at all. This way it'd be possible (when sounds are exported to API)

Definitely good to mention that in the documentation, though.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)