Blockland Forums > Modification Help
onCollision for a projectile?
Pages: (1/1)
halcynthis:
What is the code for onCollision on a weapons projectile? Isnt it something like this:
projectilename:onCollision(%obj,%play)
{
Stuff that happens on impact here
}
MegaScientifical:
Although I don't remember the variables, it definitely needs "Function" before it, like this:
--- Code: ---function projectilename:onCollision(%this,%play) {
Stuff that happens on impact here
}
--- End code ---
Somewhere in there is the real %obj, which is what it collides with.
lilboarder32:
If you're talking about colliding with a player, use ProjectileData::damage, there's a sticky about it.
blitz9100:
--- Code: ---function projectileName::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
//code here
}
--- End code ---
ottosparks:
--- Quote from: blitz9100 on June 15, 2010, 01:57:22 AM ---
--- Code: ---function projectileName::onCollision(%this,%obj,%col,%fade,%pos,%normal)
{
//code here
}
--- End code ---
--- End quote ---
i was ninjs'd. >:C
Pages: (1/1)