The Powder Toy
Download
Forum
Browse
Wiki
FAQ
Play online
Register
Login
Discussions
/
Development Assistance
/
Checking if not touching... Read On
«
1
2
»
Checking if not touching... Read On
me4502
19th Apr 2011
Member
0
Permalink
Checking if not touching any particle but itself.
plz help
my current code doesnt work at all
it is
if ((r&0xFF)==PT_CFIR){
}
else
{
if (!(r&0xFF)){
parts[i].y++;
}
}
i thought that would check if its not touching a particle... it doesnt work
Diissaster
19th Apr 2011
Member
0
Permalink
EDIT: Challenging.
I will have a go later when I get my laptop back.
vanquish349
19th Apr 2011
Member
0
Permalink
cant you just do
if ((r&0xFF)==PT_< partcle > ){
}
else {
Diissaster
19th Apr 2011
Member
0
Permalink
@vanquish349
(View Post)
He doesn't mean that.
That wouldn't work.
@me4502
,
I can do it, but in like 5-10 lines.
Again, I will do it later when I have time
me4502
19th Apr 2011
Member
0
Permalink
@Diissaster
(View Post)
thanks :)
vanquish349
19th Apr 2011
Member
0
Permalink
@Diissaster
(View Post)
why wouldnt it work
me4502
19th Apr 2011
Member
0
Permalink
@vanquish349
(View Post)
its not really what im trying to do... as in the else statement it would even come true if it was touching something
vanquish349
19th Apr 2011
Member
0
Permalink
ohh i understand know i what i did wrong
Diissaster
19th Apr 2011
Member
0
Permalink
@me4502
(View Post)
What are you needing it for, and what is the radius of your for loop?
me4502
19th Apr 2011
Member
0
Permalink
ive now got
if ((r&0xFF)==PT_CFIR){
}
else
{
if (!(r&0xFF)){
parts[i].y++;
}
}
that doesnt work either
«
1
2
»