
-----------------------------------
chimerix
Sat Nov 28, 2009 10:22 pm

Help needed with collision initiation.
-----------------------------------
What is it you are trying to achieve?
I have a tank shooting a bullet at another tank, and have allowed collision. However the explosion only happens at the exact point i set it to. I was wondering if you could change that point to a wider radius so the bullet would initiate the explosion if it came into a certain space.


Please specify what version of Turing you are using
4.1.1

-----------------------------------
Tony
Sat Nov 28, 2009 11:14 pm

RE:Help needed with collision initiation.
-----------------------------------
use less-than and greater-than comparison, instead of equals-to, to define ranges.

-----------------------------------
andrew.
Sat Nov 28, 2009 11:33 pm

RE:Help needed with collision initiation.
-----------------------------------
Here's a hint:
"1 < x < 50" in Turing would be "x > 1 and x < 50".

-----------------------------------
Tony
Sun Nov 29, 2009 12:19 am

RE:Help needed with collision initiation.
-----------------------------------
You can even keep the same order
[code]
1 < x and x < 50
[/code]

-----------------------------------
chimerix
Sun Nov 29, 2009 11:19 am

RE:Help needed with collision initiation.
-----------------------------------
Um, I'm still a bit wonky on this subject. I tried it out, however the ""s don't work. It says syntax error. 
I'm too noob guys.

-----------------------------------
andrew.
Sun Nov 29, 2009 1:17 pm

RE:Help needed with collision initiation.
-----------------------------------
That means that you are using the < and > wrong. It should be used like this:
if 1 < x and x < 50 then
    % there was a collision
end if
