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.

Newcomers DBPro Corner / Weird collision problem

Author
Message
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 13th Oct 2005 22:02
Ok I was using intersect object in this program to check for a collision with object 2 (the room). It worked fine up until I put the collision and movement code into labels. I even changed back and the player can move straight through a wall. Any thoughts or suggestions?

CODE:


I R tEh Antid0te! ROOOAAAR!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 13th Oct 2005 22:59 Edited at: 13th Oct 2005 23:02
Where are you determining the value of the variable "limb" at that you use in the intersect object query?

Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 13th Oct 2005 23:21
here.


I used the variable limb because I needed to determine how many limbs were already on my object without doing a checklist. I just used trial and error.

I R tEh Antid0te! ROOOAAAR!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 14th Oct 2005 11:15 Edited at: 14th Oct 2005 11:23
Is the variable "limb" declared as global?

[edit] Here is a slightly modified version that works here.



Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 14th Oct 2005 23:30
I found the problem! I probably should've posted this last night when I found it but, whatever. Anyway what it was was that I had the intersect object command in a function. The function was not returning the value of the intersect object command. All I had to do was either make the function return the IO command or change it to a label and use a gosub. I chose the later and it works now.

I R tEh Antid0te! ROOOAAAR!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 14th Oct 2005 23:48
As long as you got it working

Login to post a reply

Server time is: 2024-09-24 05:26:01
Your offset time is: 2024-09-24 05:26:01