Os comento mi problema:
Tengo diseñado el proceso disparo al que lo llaman los procesos enemigo y nave. Y, claro, depende de quién lo llame, su comportamiento es distinto. ¿Hay algo que sirva para saber qué tipo de proceso es el padre?
Modifica la llamada al proceso disparo es una opcion... Sobre lo que dices, con get_id(father) a lo mejor
Lo recomendable es utilizar variables locales para averiguar cosas entre diferentes procesos.
De todas formas se puede averiguar el nombre del proceso, pero no es la forma más recomendable.
Para ello tendrás que utilizar un bucle, get_id(father) y una comparación con cada tipo de proceso que quieras comprobar.
tipo=0;
while(posible_id=get_id(type proceso1) and tipo==0)
if(posible_id==father.id) tipo=1; break; end
end
while(posible_id=get_id(type proceso1) and tipo==0)
if(posible_id==father.id) tipo=2; break; end
end
while(posible_id=get_id(type proceso1) and tipo==0)
if(posible_id==father.id) tipo=3; break; end
end
while(posible_id=get_id(type proceso1) and tipo==0)
if(posible_id==father.id) tipo=4; break; end
end
Por otro lado, si utilizas variables locales lo tendrás mucho más fácil:
Local
tipo;
Begin
tipo=4;
gorila();
while(!key(_esc)) frame; end
End
Process gorila();
Begin
write(0,0,0,0,father.tipo);
End
repetido...
variable local
reserved.process_type
gracias! Al final he optado por crear un proceso a parte llamado disparoenemigo. Era mucho lio de colisiones. Así más fácil.