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 / Is there something wrong with OBJECT FRAME?

Author
Message
Sir Spaghetti Code
20
Years of Service
User Offline
Joined: 12th Jul 2004
Location: Just left of Hell
Posted: 31st Aug 2004 02:31
I was trying to check what frame my object is on so I can break him out of a loop, and it does not seem to work! Can someone tell me what is wrong with this code:
I don't see why this would be a problem!

Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 31st Aug 2004 03:25
what speed is the object playing at?

"We make the worst games in the universe."
Sir Spaghetti Code
20
Years of Service
User Offline
Joined: 12th Jul 2004
Location: Just left of Hell
Posted: 31st Aug 2004 11:10
I slowed it down to 35% becuz it was too fast. And I am using DBpro!

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 31st Aug 2004 11:18 Edited at: 31st Aug 2004 11:26
have you tired using chkfrm = object frame(1) I think that might be an integer value instead of a float. I will test when I can.

[edit] Yes this works.


Sir Spaghetti Code
20
Years of Service
User Offline
Joined: 12th Jul 2004
Location: Just left of Hell
Posted: 1st Sep 2004 03:16
Yep! It works now. For some reason, I have to set up an IF/ENDIF situation. It won't work on the same line. Hmmmm. Maybe it's just me! Thanks a billion!

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 1st Sep 2004 05:29 Edited at: 1st Sep 2004 10:05
Cool. I'll check it with an If Then statement when I get home.

[edit] This seems to work as well. DBP can be odd at time though.


Sir Spaghetti Code
20
Years of Service
User Offline
Joined: 12th Jul 2004
Location: Just left of Hell
Posted: 2nd Sep 2004 03:02
You're right! I don't know why, but it was simply not working then. It seemed to work when I did not have it on the same IF/THEN statement. Example:

frame = object frame(1)
if frame = 112 then hide object 1

This did not work, whereas this did:

frame = object frame(1)
if frame = 112
hide object 1
endif

Strange!

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Sep 2004 05:39
I have ran into this several times as well but cannot get it to be a permanent bug so I mainly code with if endif's. Every once in a while the if then just will not work. I recompile and it works. Then several weeks later it will stop working on a different if then. It mainly happens to me if I have alot of if then's in a subroutine like

Using this type of sub ... many times I have had the last 3 if then's to be ignored. It has nothing to d owith what is in the if then's either as I can swap them putting the first last and the last first and the last 3 still do not work. I have had no problems using if endif's like this. So, I mainly use them.

Login to post a reply

Server time is: 2024-11-27 08:42:04
Your offset time is: 2024-11-27 08:42:04