Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Problem with Collisions

Author
Message
DannyISahero
14
Years of Service
User Offline
Joined: 8th Mar 2010
Location:
Posted: 9th Apr 2010 20:23
Rem Sphere Collision
NumberOfFruits)>0
for t = 1 to NumberOfFruits : rem If I hit one of the little fruits
if Object collision(1,t +
play sound 4
Timer = Timer + 10 : rem Adds 10 more seconds to the time

` delete object t + NumberOfFruits
exclude object on t + NumberOfFruits
endIf
next t

If Object collision(1,100)>0 : rem If I hit the super fruit
play sound 5
exclude object on 100
Timer = Timer + 20 : rem Adds 20 more seconds to the time
endIf

the code in bold is the problem, the game says it doesn't recognize the command
Mazz426
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: Edinburgh
Posted: 9th Apr 2010 22:22 Edited at: 9th Apr 2010 22:23
i don't know what you're coding in, and at that matter why you posted here but have you checked you havn't entered the name incorrectly or its an incorrect function? other than that with whatever i've programmed with i've had to close my brackets and i notice a lot of open brackets, depending on what you program in that can become a problem for performance and errors later, what sort of translator are you running this with when you test it, it may not be the only issue just the first detected one, you may want to try changing it from > 0 to = > 1, that may help

mike5424
15
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 9th Apr 2010 22:56 Edited at: 9th Apr 2010 23:00
Quote: "for t = 1 to NumberOfFruits : rem If I hit one of the little fruits
if Object collision(1,t +
play sound 4
Timer = Timer + 10 : rem Adds 10 more seconds to the time

` delete object t + NumberOfFruits
exclude object on t + NumberOfFruits
endIf
next t"

for t = 1 to NumberOfFruits : rem If I hit one of the little fruits
if Object collision(1,t)
play sound 4
Timer = Timer + 10 : rem Adds 10 more seconds to the time

` delete object t
exclude object on t
endIf
next t
There is no need to add on the number of fruits. If the object you created was 2, T is 2 and number of fruits is 5 it would check for number 7

EDIT: Oh, NumberOfFruits)>0. What are you trying to do, It seems "NumberOfFruits" is the amount of fruits you want in the game. You need to give it a specific value like "NumberOfFruits = 5"

---
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 9th Apr 2010 23:55
Quote: "NumberOfFruits)>0"

I don't recognize it, either. What are you trying to do there?

Login to post a reply

Server time is: 2024-11-24 15:37:42
Your offset time is: 2024-11-24 15:37:42