Blockland Forums > Modification Help

Charging a projectile + Detecting water

Pages: << < (2/3) > >>

Greek2me:

No. There's a Player::onEnterWater function, but I'm not sure about projectiles.

Amade:

I looked for some sort of onEnterWater function for projectiles - datablocks and objects alike - but couldn't find anything relevant.

Nexus:

I do not know if projectiles have any function called when they enter water, but if you wanted to instead to a raycast, I am fairly sure that there is a raycast search typemask or whatever that will tell you if you hit water.

Demian:


--- Quote from: Nexus on September 27, 2011, 11:58:44 PM ---I do not know if projectiles have any function called when they enter water --

--- End quote ---
They must have. You can make the projectile emitter, explosion and light different when it is underwater.


--- Quote from: Appendix A ---particleWaterEmitter

ParticleEmitter datablock used to generate particles for the projectile when
it is under water, and when it is entering or leaving water.
--- End quote ---
I tested it and it works in Blockland.

Headcrab Zombie:


--- Quote from: Demian on September 28, 2011, 06:22:53 AM ---They must have. You can make the projectile emitter, explosion and light different when it is underwater.
I tested it and it works in Blockland.

--- End quote ---
Yeah sure, but is there any script callback for water entry?

Pages: << < (2/3) > >>

Go to full version