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.

DarkBASIC Professional Discussion / Enhanced animations -EnAn_OacUpdate not taking variables?

Author
Message
Qqite
16
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 14th Jun 2013 03:09
It's been a while since I've posted but I'm still working on my same project that I started 3 years ago

I've been stuck with default animations and I was tired of being limited, since I'm making an FPS, so I whipped out Enhanced animations that I bought some time ago. Everything is fine but this one quirky problem:

(Note: In all of these snippets, text ... prints out 17 just fine)

This works:


This DOESN'T work:


This works:


This DOESN'T work:


Is this a glitch in DarkBasic's casting system? If so, is there any way to get my time between frames in there and not using a constant?

Ventures of the worlds around us are limited only by our imagination.
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 14th Jun 2013 07:05 Edited at: 14th Jun 2013 07:06
What do you mean by "Doesn't Work"?

Qqite
16
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 14th Jun 2013 08:20
Oh, sorry, I mean it doesn't update.

If I do this

It updates with 17 milliseconds worth of change.

If I do this

It doesn't update, assuming it thinks its null or 0, even when right after that function call I print out its value (17).

Ventures of the worlds around us are limited only by our imagination.
Qqite
16
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 14th Jun 2013 10:43
Update: Still not fixed but I did a few more tests...

This doesn't update...


Yet this does...


This very much has to be a bug. At least it's a tiny bug :\ I'll have to work around it.

Ventures of the worlds around us are limited only by our imagination.
Qqite
16
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 14th Jun 2013 11:05 Edited at: 14th Jun 2013 11:06
For anyone who is looking for a fix...I dont have a clean one, but here's what I did:

tm is a local variable.
I save the timer() of the event in the object type itself, since globals hate me.


Essentially the same thing as what I had for tbmf_diff, but for some reason the function wasn't agreeing with that variable. So I made a new one that does pretty much the same thing but per object.

Ventures of the worlds around us are limited only by our imagination.
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 15th Jun 2013 01:20
Are you sure it does take a delta time rather than a timestamp?
I can't remember off the top of my head but if it is the latter you could only send it a constant value once. Of course if that was the case calling it with "17" would also only work on the first call...


"Why do programmers get Halloween and Christmas mixed up?"
Qqite
16
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 15th Jun 2013 03:58
Yea it is just a delta time.

Odd bug. I tried a smaller experiment with the global variable declared in the same file and it worked :\

Something about declaring globals in that fashion it doesn't like.

Ventures of the worlds around us are limited only by our imagination.
Bull Blake
19
Years of Service
User Offline
Joined: 27th May 2007
Location:
Posted: 15th Jun 2013 04:08
On a completely random note: I just found a piece of paper reminding me of my old login info for this site xD

Login to post a reply

Server time is: 2026-07-07 05:39:32
Your offset time is: 2026-07-07 05:39:32