Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Problems with entities  (Read 5636 times)

0 Members and 1 Guest are viewing this topic.

Musta Kaapu

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 55
  • "I'm a bunny rabbit!"
    • View Profile
    • SomethingAwful
Problems with entities
« on: May 11, 2003, 12:59:35 PM »

I started scripting my first scene and I ran into very bizarre problems. Idea was to add a hotdog seller to the scene but I couldn't do it, whatever I tried I couldn't get the seller to appear to the screen. The seller is an entity in the project, just like in the oldguy in the wme_demo. In wme_demo project the  room.scene's scene_init.script has these two lines:
global OldGuy = Scene.LoadEntity("entities\oldguy\oldguy.entity");
OldGuy.SkipTo(505, 330);

I added these to my scene's scene_init.script  (of course changed  the name and parameter to point to my entity)

Well nothing happened, the hotdog seller didn't appear. I tried with the wme_demo project and I did managed to get it working (I changed the oldguy to hotdog seller). At this point I was kind a frustrated, so I checked all scripts. Everything was in order, all scripts were fine and I could compile the packages without problems.  But still I couldn't get my entity to the screen.

Then I tried a different approach. I added my scene, actor and entity to the wme_demo, changed game.script to load my scene and actor...and now comes the weird part. The game starts in my scene with my actor, but it starts running the wme_demos/room scene's tour script!!!!  I found out that it uses room scenes scripts but all other things are from my scene (backgrounds, walking areas...) Why is this happening?

If anybody has some good ideas how to get my entity to show up without the tour thingie, I would like to hear.
Logged
"Do you still wish to fight me?"

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re:Problems with entities
« Reply #1 on: May 11, 2003, 01:35:49 PM »

I added these to my scene's scene_init.script  (of course changed  the name and parameter to point to my entity)
Well nothing happened, the hotdog seller didn't appear.

Hm, probably just some little error... you could try to enable the debug mode and to lookup the logfile for possible runtime errors.

Quote
Then I tried a different approach. I added my scene, actor and entity to the wme_demo, changed game.script to load my scene and actor...and now comes the weird part. The game starts in my scene with my actor, but it starts running the wme_demos/room scene's tour script!!!!

Maybe you just copied the scene_init.script in your own scene ?
Well however - at least I can offer you this: zip your game directory and send it to me by email: timo@waelisch.de and I'll try to find the error and to correct it.

Greetings, Jerrot.
« Last Edit: May 11, 2003, 01:36:54 PM by Jerrot »
Logged
Mooh!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Problems with entities
« Reply #2 on: May 11, 2003, 04:03:36 PM »

Yes, like Jerrot said, be sure to check the log file for possible problems (like missing files etc.). The log file should be in the same folder where is your project file (.wpr) and it's called "wme.log".
About the tour script... you probably forgot a tour.script reference in your scene_init.script file.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Musta Kaapu

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 55
  • "I'm a bunny rabbit!"
    • View Profile
    • SomethingAwful
Re:Problems with entities
« Reply #3 on: May 11, 2003, 04:31:25 PM »

I found these in wme.log
18:19: Error opening file 'fonts\outline_red.fnt'
18:19: CBFont::LoadFile failed for file 'fonts\outline_red.fnt'
18:19: Error opening file 'scenes\Room\scr\scene_init.script'
18:19: CScEngine::GetCompiledScript - error opening script 'scenes\Room\scr\scene_init.script'

At this time I have deleted whole scenes\Room directory from the project, so that's why those appear. But I also went through all the .script files in the project and none of them have any room word.  So where does this sudden need for Room\scr\scene_init.script come from? It isn't refrenced in anywhere in the project...

By the way, when you make a new entity it automatically writes the font as .fnt file not as .font in the .entity file's FONT section.

EDIT:

I got it, the engine requires that there is one scene in scenes\Room directory. The engine tries to load scene from scenes\room directory even if it doesn't exist!!

But still the engine tries to load outline_red.fnt which isn't referenced anywhere. Guess I just have to copy outline_red.fnt from outline_red.font :)
« Last Edit: May 11, 2003, 05:21:28 PM by Musta Kaapu »
Logged
"Do you still wish to fight me?"

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Problems with entities
« Reply #4 on: May 11, 2003, 06:02:39 PM »

I got it, the engine requires that there is one scene in scenes\Room directory. The engine tries to load scene from scenes\room directory even if it doesn't exist!!

Are you sure you've changed the LoadScene() line in game.script to load your scene instead of room.scene?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Musta Kaapu

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 55
  • "I'm a bunny rabbit!"
    • View Profile
    • SomethingAwful
Re:Problems with entities
« Reply #5 on: May 11, 2003, 07:07:07 PM »

Quote
Are you sure you've changed the LoadScene() line in game.script to load your scene instead of room.scene?

Well I can't say for sure now 'cause I don't have the same settings anymore. But I had changed it earlier so I knew about it...

Let me think about it.... No I checked every file in the project and none of them contained word room or Room, so I had changed it. This is really bizarre 'cause if I now change the wme.log it shows correctly that it cannot load the scene...

But it works now, so I'm happy :)
Logged
"Do you still wish to fight me?"
 

Page created in 0.044 seconds with 20 queries.