2014-12-05 19:54:35 (edited by matt1211 2014-12-05 19:56:43)

Hi. I'm having problems with a level class, that's not letting me write if statements to the 2d array of bools I am using to check for walls. When I do this in my player class, there's no issue. however when I do it from within my enemy class, i get the error that object handles are not supported by this type. The code is practically identical, so I'm really not sure why one works and the
Any suggestions would be greatly appreciated.
The link to my enemy class can be found below.
https://www.dropbox.com/s/s6y5sy29ky3vv … y.bgt?dl=0

Prier practice and preparation prevents piss poor performance!

2014-12-05 23:38:57

My first reaction is that the pathfinder needs to be a handle.

But your post implies that the error is pointing to this line:

        else if (this.p.level.walls[this.x+xInc][this.y+yInc] == true) 

Which does seem weird. It might help to see your player or level classes?

But, if it's this:

        if (this.l.checkForWall(X,Y) == null) 

I'm not really sure how that gets interpreted, in terms of handle shenanigans.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2014-12-10 06:17:56

Hi, thanks for the help! I was also wondering. Is it possible to change the sound'pool class in such a way as to allow for rotation of the player? or would it just be easier to find a different sound library and rewrite in a different language? it's all sort of confusing.

Prier practice and preparation prevents piss poor performance!

2014-12-10 07:16:18

You might try this big package of includable scripts:
https://dl.dropboxusercontent.com/u/165 … cludes.zip
custom_pool.bgt does what you're asking for. It's just like the sound_pool, but it supports rotation, plus a few other things. You'll definitely want to set the max_distance property if you're using rotation, though, since the calculations can get laggy with a lot of sounds.

(the readme file is out of date, but I think it's mostly accurate for custom_pool. Custom_pool includes math.bgt, so you'd want at least those two in the same folder. Graphics and graphics_engine don't do anything; they're just hypothetical wrappers.)

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2014-12-10 16:38:22

Hi, thanks very much, this is exactly what I was looking for! Sorry I'm asking you so many silly questions smile

Prier practice and preparation prevents piss poor performance!

2014-12-10 21:42:27

It's cool; if people didn't ask these sorts of things I'd probably never get around to doing anything. smile

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.