Author |
Message |
chimerix
|
Posted: Sat Nov 28, 2009 10:22 pm Post subject: 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 |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: Sat Nov 28, 2009 11:14 pm Post subject: RE:Help needed with collision initiation. |
|
|
use less-than and greater-than comparison, instead of equals-to, to define ranges. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
andrew.
|
Posted: Sat Nov 28, 2009 11:33 pm Post subject: RE:Help needed with collision initiation. |
|
|
Here's a hint:
"1 < x < 50" in Turing would be "x > 1 and x < 50". |
|
|
|
|
 |
Tony

|
Posted: Sun Nov 29, 2009 12:19 am Post subject: RE:Help needed with collision initiation. |
|
|
You can even keep the same order
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
chimerix
|
Posted: Sun Nov 29, 2009 11:19 am Post subject: RE:Help needed with collision initiation. |
|
|
Um, I'm still a bit wonky on this subject. I tried it out, however the "<"s and ">"s don't work. It says syntax error.
I'm too noob guys. |
|
|
|
|
 |
andrew.
|
Posted: Sun Nov 29, 2009 1:17 pm Post subject: RE:Help needed with collision initiation. |
|
|
That means that you are using the < and > wrong. It should be used like this:
Turing: | if 1 < x and x < 50 then
% there was a collision
end if |
|
|
|
|
|
 |
|