PDA

View Full Version : Displaying the model into 3d space more than once after loading it once.



randomthings
28-09-2009, 22:11
Does anyone think that TBGL has the capability to display the model more than one time?

For an example, projectiles using an M15 model. Where more than one is drawn on the screen when being fired out by the player.

For more understanding:

Code:
Load a 3DModel

For T=1 to 5
Draw a 3DModel at X*25,0,100
Next T

the result would be 5 models being drawn on to the screen.

possible?

Petr Schreiber
28-09-2009, 23:04
Sure this is possible!

I will again show you version using entity system.
You simply create 5 models, nick name them with equate (%eModel1 to %eModel5) and you can control them later.

Please download the attached script, models are art by Michael Hartlef.

can5145
29-09-2009, 17:39
i somehow looked at the code that somewhat looked interesting.

is there any way those object models can be initialized using with the for loop method or arrays instead of using %model1, %model2, %model3 and so on?

if not, i probably have another way of doing this.

Michael Clease
29-09-2009, 18:17
simple answer YES.

%model1 is a number so just replace %model1 with your T variable( as per your example)

Petr Schreiber
29-09-2009, 21:12
Michaels advice is perfectly valid,

you can use it that way of course.
You can also retrieve unused IDs for entities using TBGL_EntityGetFreeID.