Another Basic Problem Door Open/Shut

Blitz3D Forums/Blitz3D Programming/Another Basic Problem Door Open/Shut

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Just one other question. How would I go about using the Type command to create many doors?

Do you mean the command to create a new type element ?
type t_door ;type declaration
field ... ;fields...
.
.
end type
Global door.t_door ;global pointer

;let's create 10 'doors'
for n = 1 to 10 ;loop from 1 to 10
door.t_door = New t_door ;Note the New statement. This creates a new door element
next


Being more specific, what I do is to place 'door' objects using Droplet (see above post), and then in the program, at the beginning of a level, I read each 'door' info from the .drp file generated by droplet, which contains the info related to each object placed from within droplet.

Then, simply check wich type of object should be created, and if it is a 'door', then... creates a door !!

Advice: Download droplet, is free and very useful. Have a play with it, position some object in your .B3D level, then use the object viewer - an handy function included in Droplet - and see how it works; I bet you can master it in a couple of minutes..

;-)

Hope this has sense for you,
Sergio.