How can I code something to react with any particle it touches?
In the regular code, if I want element X to react with element Y to create element Z, I would code
int update_X(UPDATE_FUNC_ARGS) {
...
if (((r&0xFF)==PT_Y))
{
create_part(i,x,y,PT_Z);
}
But what would I code if I wanted it to react with all particles?
please fill in the blank
int update_X(UPDATE_FUNC_ARGS) {
...
if (((r&0xFF)==PT_____))
{
create_part(i,x,y,PT_Z);
}
thanks, firefreak11
thanks i will give it a try
if( (r&0xFF) ) {
// do_stuff
}
else {
// dont_do_stuff
}