Hwo to take kind of hit object: landscape or clonk.
For example:
protected func Hit(){
if(hit ladscape){
nothing
}
if(hit clonk){
explode
}
}
For example:
protected func Hit(){
if(hit ladscape){
nothing
}
if(hit clonk){
explode
}
}

You could use that call in the clonk to make a call to the object (by).

If you add the effect
AddEffect("HitCheck", this, 1,1, nil,nil, shooter);
and it hits an object public func HitObject(object obj)
is called. So you could try:func Initialize()
{
AddEffect("HitCheck", this, 1,1, nil,nil, shooter);
}
func HitObject(object obj)
{
Explode(10);
}

But of course, as anything else you can implement this in script by checking each frame if at the position of the object, there is another object. This has already been done for objects like the arrow. See Pyrit. Note though that you should probably add the effect when your object is thrown (exits it's container) and pass the container object to the hit check effect. Otherwise, the hit check would find the clonk that throws the object right away and explode on his hands :-). Like this:
func Departure(object container)
{
if(container
AddEffect("HitCheck", this, 1,1, nil,nil, container);
}
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill