Jump to content

Question on the scene manager


Gabriel
 Share

Recommended Posts

Hello,

 

Is there a debugger for the Lua scene editor?

Or there is a working method to debug a script editor without increasing the code with AppLog ()?

 

Because I doubt the behavior of the loader scene. In my project,

 

- I created a model "ObjTest" with a script. As a result I did a copy paste the folder of my model that I call "ObjTestV2" and the first "ObjTestV1".

 

- Then I renamed the files "gmf" in Obj_test_v1.gmf Obj_test_v1.gmf and the other in the same thing for the script file.

 

- In both script files evenemt UnlockKey, I have a log for a AppLog ("from V1") and the other AppLog ("from V2").

 

- And then, i reload my scene, the first model has disappeared since I renamed, so I instantiate the object ObjTestV2 and I have a funny surprise, I log in "From V1" and then "From V2 "!

 

This is normal or not to run a script that is not from the scene?

 

If this is normal, there is documentation that describes how the scene manager work and the interaction with scripting?

 

Thank you for your answer

 

Gabriel

Link to comment
Share on other sites

Renaming the model file and not removing it from your scene will most

likely result in a placeholder which can still run the script.This is

because the .sbx scene file will still have the information about the

model you just renamed. Therefore it can't find the model and maybe

uses a pivot or some other placeholder for this. I'm not sure, as i never

tried it. I do it the proper way, which is removing it in the editor first,

then renaming/deleting the model file.

Dunno if i got your question right, don't hesitate to ask again :unsure:

 

PS: there is no lua debugger in LE2, YOU are the debugger...

Edited by DaDonik

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

hello Josh,

it is not you who does not understand, but as I am Belgian and my English is very bad so I use Google translation ^ ^.

 

ok google is not that great when you have a technical problem;-)

Hey beligsche man, hier een nederlander. ik hoop niet dat je een frans talige belg bent want dan heb je hier nog niets aan.

als eerst, wat bedoel je?

en als 2de als je een scene wil spelen als een "standalone game" moet je toch echt de Loadscene() command gebruiken.

 

misschien is het handiger dat jij, je vraag anders formuleert zodat we het kunnen begrijpen envertalen :lol:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...