Some noob questions

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
Saint Lazarus
Posts: 3
Joined: Sat Apr 04, 2009 5:02 am

Some noob questions

Post by Saint Lazarus »

Hey im pretty new to ZGE and I just have some questions, its the only way to learn!


k first off im having real trouble figuring out how exactly reading from text files works, I keep editting the FPS sample but they come out nothing like what I type. So im clueless as to how exactly it reads from the file

say I type a line like this xxxxx

editor seems to read that the same as

x
x
x
x

both be going across, only theres a space between the walls on the line going down. im sure its a noob misunderstanding of a simple feature, but I just dont get it.

EDIT: Just occured to me that maybe because im on Linux texts I edit dont have same char values?, but I think I had same problem on windows PC when i tried first



Second, how can you create fancy 3D models like the wolf head in the FPS sample, is there a way to load meshes? (in the sample theres a component labelled MeshImport) but the option of importing anything is hashed out and I dont see a MeshImport when I try add one. Is that an old feature that was taken out/replaced?

And in other games I see meshs made with code ala MeshExpression, how exactly do people manage that? just know how to manuipulate models offhand with code alone through practice or making a model in some external program that can export code?


Is there any way to alter the properties of indivual models, like say I have several bricks and I want one brick to turn red or something by pressing a button without effecting all the other models of the same type



Probably have more questions just cant think of'em right now, thankies for any help :D


If I manage to stick with it and figure it out im going to try make a turn based strategy game
User avatar
VilleK
Site Admin
Posts: 2371
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

I'll try to answer some of your questions:

About the text-file: make sure you are using a text editor for simple ascii-files. Because you get spaces between tiles it sounds like your editor use 2-byte unicode encoding, you should use 1-byte ascii encoding. Look in your editors settings.

The MeshImport-producer is created when you import a 3ds-model using menu item "File- Import 3DS-file". Take a look here: http://www.zgameeditor.org/index.php/Ho ... ort3dsfile

MeshExpression is basically a filter for mesh data. So first you use a MeshBox or similar to generate a mesh, then use a expression to modify the vertices the way you want. It is not easy, but really not that hard either when you get used to it. Try modifying a expression in one of the sample projects to see how it works.

A model instance can modify itself, so if you want to modify the color you can add a RenderSetColor-component to the OnRender-list, name it "MyColor" or something, then in a ZExpression in the model use "MyColor.Color.R=rnd();". The tricky part is how to modify a single instance from another instance, or the main app.onupdate, because there is currently no support in the scripting language to iterate through other instances. We are working on a solution, but the effect can currently be achieved using Arrays to communicate between instances.

And welcome to this forum! :)
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Re: Some noob questions

Post by kattle87 »

Saint Lazarus wrote: Is there any way to alter the properties of indivual models, like say I have several bricks and I want one brick to turn red or something by pressing a button without effecting all the other models of the same type
Well, keep in mind that you can also use the "OnCollision" inside the brick model so that it turns to red when EG a projectile hits it or a model moves over it.
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
Post Reply