Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Problems loading character entity  (Read 3630 times)

0 Members and 1 Guest are viewing this topic.

helios

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 41
    • View Profile
Problems loading character entity
« on: January 06, 2007, 02:38:00 AM »

Hi,

I have inserted a entity in the game for a character that doesn´t moves, like oldGuy in WME demo game.
It works fine inside the same computer where the game data directory is. In other computers, the entity is not loaded, and I know it is this way cause it´s dinamically loaded.

How do I do it so? The game will need an installation system that copies the files for this entity for any computer where the game is installed? Is there a way to compile the exe with the entity inside (better option)?

Thanks for the help,
Helios
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Problems loading character entity
« Reply #1 on: January 06, 2007, 11:03:34 AM »

Read my answer in the FAQ:

http://wiki.dead-code.org/wakka.php?wakka=FAQ&v=d1z#pathproblem

And let me know if it helped. :)
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

helios

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 41
    • View Profile
Re: Problems loading character entity
« Reply #2 on: January 06, 2007, 01:30:54 PM »

Hi metamorphium,

You FAQ says:

"It's most probably path problem. Remember that you should use relative path to the package. So if you for example in WME demo have package called data, you don't include data into the path. So in demo you have Game.ChangeScene("scenes\room\room.scene"); and not Game.ChangeScene("data\scenes\room\room.scene");"

About it, I can say yes, I am using relative paths to load it:

global drunkMan = Scene.LoadEntity("entities\drunkMan\drunkMan.entity");

This "entities" directory is inside "data" directory.
Making a comparision with actor loading, that is loaded in the game.script, this drunkMan is loaded in the scene_init.script. Should it be the reason for not being included into the package?

I think so, and the reason is, I just compiled wme_demo and renamed directory to "_wme_demo". When I tryied to execute the game.exe generated by the compiler, it returned an error message saying that important files could not be found, asking for a new installation for correcting the problem.

In my game, it doesn´t occurs, cause only the drunkMan is not found.
That makes me believe that those loaded files (like drunkMan) are not included in compiled file, and are loaded while executing, and need the files to be into the computer the game is being executed.
That gives me a lonely solution that is creating an installation system that will copy those files to the user computer.

I would like to use it in another way, I´d like to include it in the compiled file, but how to insert an entity into the scene, other than loading it in code?

Hope I didn´t create a whole mess here. :)
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Problems loading character entity
« Reply #3 on: January 06, 2007, 07:36:33 PM »

it's definitely not the reason and it MUST work :)

Please make sure that the following points are correct:

1, in the entity file the images (whatever) points also as the relative path and this path is inside the data directory.

2, Paste here the log errors.

3, If everything else fails, make a tiny version of your project and pm me a link, I'll look it over for you.

Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

helios

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 41
    • View Profile
Re: Problems loading character entity
« Reply #4 on: January 06, 2007, 08:26:23 PM »

metamorphium,

Thanks for the help! My problem was inside the entity file. I just looked for absolut paths everywhere but there! :(

Extra help makes things more clear.

Thanks again! :)
Helios
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Problems loading character entity
« Reply #5 on: January 06, 2007, 08:28:04 PM »

glad it helped.

Also you may look at this:

http://wiki.dead-code.org/wakka.php?wakka=PackagingSystem&v=140c

I wrote it to explain packaging system fully. :)
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

helios

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 41
    • View Profile
Re: Problems loading character entity
« Reply #6 on: January 06, 2007, 08:30:00 PM »

Sure I will.
Thanks
Logged
 

Page created in 0.106 seconds with 24 queries.