EOF

Blitz3D Forums/Blitz3D Beginners Area/EOF

Killsgaurd(Posted 2014) [#1]
Graphics3D 640,480,32,2
SetBuffer BackBuffer()

Camera = CreateCamera()

Light = CreateLight()

russeng = LoadMesh("Russeng.3ds")
PositionEntity russeng,0,0,5
ScaleEntity russeng,0.1,0.1,0.1
EntityRadius,1

A1 = LoadMesh("A1.3ds")
PositionEntity A1,0,0,5
ScaleEntity A1,0.2,0.2,0.2
EntityRadius,1

While Not KeyDown(1)


;if [condition] the [do something]
If KeyDown(203) Then TranslateEntity russeng,-0.1,0,0
If KeyDown(205) Then TranslateEntity russeng,0.1,0,0
If KeyDown(208) Then TranslateEntity russeng,0,0,-0.1
If KeyDown(200) Then TranslateEntity russeng,0,0,0.1


RenderWorld
Flip

Wend

End







This is my code and im asking you guys for help in answereing why it keeps coming up with Expecting file close thing as an error and wont run my .bb :( plz help


Zethrax(Posted 2014) [#2]
You've got a couple of EntityRadius commands there that are missing the entity parameter.

"Expecting end of file" and similar commands usually mean that the compiler can't make sense of your code, so look for a syntax error when you see these types of error messages.


Killsgaurd(Posted 2014) [#3]
is that all i need to do Zethrax? lol im not judging youre knowledge im asking is there anything you recomend I do or try to keep the code good an crisp and not trashy? and thanks man


RustyKristi(Posted 2014) [#4]
Killsguard, I think your code is missing the Entity name in EntityRadius part. should be..


EntityRadius russeng, 1


do the same thing with your other mesh and try running that code again


RemiD(Posted 2014) [#5]
learn the difference between a function and a variable/reference and write functions correctly to prevent errors...
The blitz3d commands are functions.
examples of what i mean :

variableinteger% = 1
variablefloat# = 1.0
variablestring$ = "one"
reference% = 1234567890
r% = Add( 10, 20 )

funtion Add( a%, b% )
r% = a + b
return r
end function

in blitz3d commands/functions and in custom functions, there are some parameters which can be required and others which can be optional. You need to at least provide the required parameters.


Killsgaurd(Posted 2014) [#6]
Thanks for the help guys i have my .3DS objects imputed and i can run the Code but The Russeng (russian engineer) is too big and A1(MilitaryTent) is like way to what basic Entity Command can i use to downscale it. But when i removed the EntityRadius command it ran without a problem so now i figured out it was the entityradius command. Thanks :D but ill need more help from you guys in the future because im a newbly


Zethrax(Posted 2014) [#7]
When you say 'too big' are you talking about the size of the visible model or the size of its collision volume? The EntityRadius command sets the size of the object's spherical collision volume. And the object will only have a spherical (or some other) collision volume if you've set that using the Collisions command ( http://www.blitzbasic.com/b3ddocs/command.php?name=Collisions&ref=3d_cat ). To change the relative scale of the mesh model you would need to use ScaleMesh ( http://www.blitzbasic.com/b3ddocs/command.php?name=ScaleMesh&ref=3d_cat ). Note that ScaleMesh modifies the actual mesh data that copies of the mesh entity reference from, so ScaleMesh will also scale copied (instanced) entities. If you just want to modify the scale of the copied entity then use ScaleEntity ( http://www.blitzbasic.com/b3ddocs/command.php?name=ScaleEntity&ref=3d_cat ) instead.

I'm going to post this info here that I posted into another one of your threads. It seems like you're trying to run before you can walk and I think you'll benefit from setting your goals a bit smaller until you have a better understanding of how Blitz3D works.

---

Read all the help file tutorials that came with Blitz3D (click the 'Help' tab in the Blitz3D IDE. The help page should show by default when you start the IDE). Read the various tutorials in the forums. Read through the command instructions in the help files too, to give yourself a rough overview. The help files appear to be out-of-date ( http://www.blitzbasic.com/Community/posts.php?topic=103568 ) so you might be better off looking through the ones in the online manuals linked in the navigation bar at the top of this page( http://www.blitzbasic.com/Manuals/_index_.php ).

Once you've got a rough overview of the language, start looking at the various samples that came with Blitz3D (you can find them linked from the the main help page in the IDE). Also take a look at the various bits of code in the code archives on this site (navigation bar above > Community > Code Archives ( http://www.blitzbasic.com/codearcs/codearcs.php )).

Copy some of the samples or code archive code and play around with it (that's what it's there for). Note that the samples that come with Blitz3D include ( http://www.blitzbasic.com/b3ddocs/command.php?name=Include&ref=2d_cat ) a file that sets the graphics mode manually. You'll probably want to comment out the line the include command is on and code the missing graphics command ( http://www.blitzbasic.com/b3ddocs/command.php?name=Graphics&ref=2d_cat | http://www.blitzbasic.com/b3ddocs/command.php?name=Graphics3D&ref=3d_cat ) into your copy of the code sample.

Usually you're not going to get far asking people to explain high-level stuff to you on the forums. Most people are happy to help you out with specific lower-level problems (questions about commands, problems with your code, etc), but the higher-level stuff takes far too long to explain and the questions involved are often too vague to really formulate a good answer to.

The best approach is usually to start small and work your way up to larger projects over time.


Killsgaurd(Posted 2014) [#8]
@Zethrax i didnt know this was advanced stuff i watched tut's on youtube and it seemed pretty easy what would you recommend i start off doing sir?


Zethrax(Posted 2014) [#9]
what would you recommend i start off doing sir?

Y'know I just kind of answered that in my post above. I don't want to be rude, but my palm and face are making contact here.

As I said, the best way to learn is to copy a code sample and start dicking around with it for funsies. >>AFTER<< going through the tutorials and command help files to get at least a basic overview of the language.

Asking questions before you have some sort of basic understanding of the language is a bit pointless. The answers you're likely to get to those questions will make a lot more sense to you once you have at least a basic understanding.


RemiD(Posted 2014) [#10]
To be more precise :
scalemesh will reposition the vertices so it can be used to scale non changing meshes.
http://www.blitzbasic.com/b3ddocs/command.php?name=ScaleMesh

scaleentity will reposition the vertices and the joints (=bones) so it can be used to scale rigged skinned meshes (=meshes with a skeleton with joints, and with influences of some joints over some vertices, and with animations)
http://www.blitzbasic.com/b3ddocs/command.php?name=ScaleEntity


Killsgaurd(Posted 2014) [#11]
Thanks Guys