123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|717|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Room Type?

Sat, 05 Jan 2008, 15:56
Hotshot


For dim arrays and it work fine but TYPE with arrays is better but why doesnt it work?

Sat, 05 Jan 2008, 16:31
HoboBen
I can't remember much Blitz at all so I don't know why arrays in types may or may not work, but you don't need to load the room image for each type.

How about: (Pseudo-code)



-=-=-
blog | work | code | more code
Sat, 05 Jan 2008, 17:19
JL235
Why not something like:


Note: That is just meant to be a general idea not a complete working code sample.
Sat, 05 Jan 2008, 17:37
Hotshot
both of them are interesting thank you

I doing the enemys Type part


what do you think of Enemy Type above?

Sun, 06 Jan 2008, 08:40
Teasy
to answer the original question:



translates to:



and



translates to:



if you look closely
you can see that Room_Grids in the last part of the code
is the name of the TYPE
but it should be the name of the VARIABLE
e.g.




Sun, 06 Jan 2008, 10:01
Forklift_Fred
That's why I was confused by it then! I have just this week started to use arrays within Types and got it working with the blitzarray [] rather than normal array () and it worked perfectly. I couldn't see a problem with Hotshot's code. I always used to get confused by the Type syntax but found that using the same word worked OK so that's what I now do because it's easier to remember and handle. I'm sure someone else will be able to tell me why it's not good coding practice, where it can cause problems and where it is useful to use different variables, but at my stage in programing my method is working well enough for me so far.

For example:


It looks lazy and almost pointless but it works...

I guess using different variables allows you to be handling 2 or more points in the Type stack... Thinking about it, that could be really handy...

Sorry, I'm thinking aloud now!

-=-=-
Come rain or shine...
Sun, 06 Jan 2008, 10:33
Teasy
Yeah exactly, Fred
For example when comparing Room_Grids with Room_Grids,
or Enemy with Enemy,
in collisions for example.

There is a variable naming standard
which uses the VARIABLE TYPE as part of the variable.
For example:



Although in Blitz I prefer them clean (no prefix)
because I like the IDE to tell me what type a variable is


Sun, 06 Jan 2008, 13:58
Hotshot
Interesting stuff there Teasy(pointer and handle is somethings else).

thank you for all people who have help me.

so far I got two scene(where joe blade go to one room to other) with joe blade moving and I got the jumping working but it is quite funny cos if you keep press double up then the jump will be twice high! lol

It is progressing but I have to keep going with my code and if I ever get stuck...then I know where to post it


cheers