//weapon script code
function OnCollisionEnter(other : Collision) { if (other.relativeVelocity.magnitude > 2) SendMessage("GetTotalDmg",Damage); }
what the above code does is send info about the weapon to the monster that is being struck.
I’m a bit unsure if I am doing this right, as it doesn’t really work so I assume I’m having issues sending the message properly(since all the functions work properly, tested wit variables).
Any help would be appreciated.
I've tried that. It calls an error saying that send message isn't a part of collision. this.SendMessage() works, but still, no result seems to show up, the function doesn't even get called.
– TheEmeralDreamerFixed it.
– Peter_GWhat do you mean Fixed it?
– TheEmeralDreamer@emeraldreamer: He has edited his answer because his code example was wrong and now it's right ;)
– Bunny83