Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: i cant upload image to scene  (Read 2257 times)

0 Members and 1 Guest are viewing this topic.

megane

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 13
    • View Profile
i cant upload image to scene
« on: March 28, 2010, 07:23:17 PM »


Hello,


i created a scene and i want to upload a background image this. but i am taking some errors..

CBImage::CreateTexture tile at 0,7 no texture set ..
CBSurfaceD3D:CreateEmptyTexture error creating an empty texture.
error gettting texture ...
..
...
..


help me, please



Best Regards.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: i cant upload image to scene
« Reply #1 on: March 28, 2010, 08:10:04 PM »

Can you post the entire log?
Also, how big is the image? Seems like you're trying to use some super-large image.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

megane

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 13
    • View Profile
Re: i cant upload image to scene
« Reply #2 on: March 28, 2010, 08:32:06 PM »


yeah some big image.but it is ok. i uploaded.
now i want to control my background image by keyboard.
i wrote these codes under the scene_init.script. but it doesnt work..


Code: [Select]
#include "scripts\base.inc"

// here comes the stuff which initializes the scene





////////////////////////////////////////////////////////////////////////////////
// scene state
global Statepanoroma;


// default values
if(Statepanoroma==null)
{
  Statepanoroma.Visited = false;
  // add scene states here
    if (Keyboard.KeyCode == "VK_UP")
{
      Scene.SkipTo(Scene.X, Scene.Y-50);
}
else if (Keyboard.KeyCode == "VK_DOWN")
{
      Scene.SkipTo(Scene.X, Scene.Y+50);
}
else if (Keyboard.KeyCode == "VK_LEFT")
{
      Scene.SkipTo(500, 300);//Scene.SkipTo(Scene.X-50, Scene.Y);
}
else if (Keyboard.KeyCode == "VK_RIGHT")
{
      Scene.SkipTo(Scene.X+50, Scene.Y);
}
}



////////////////////////////////////////////////////////////////////////////////
// setup scene according to state variables



////////////////////////////////////////////////////////////////////////////////
if(!Statepanoroma.Visited)
{
  Statepanoroma.Visited = true;

  // this is our first visit in this scene...
 


}

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: i cant upload image to scene
« Reply #3 on: March 28, 2010, 09:31:35 PM »

first of all you are missing this include at the top:

#include "scripts\keys.inc"

secondly remove parenthesis from VK codes


example: if (Keyboard.KeyCode == VK_UP)

thirdly you're putting your code to entirely wrong place.

place all your keyboard handling into

on "Keypress"
{

}

block and then modify your game.script to read something like this:

Code: WME Script
  1. on "Keypress"
  2. {
  3.     if (Scene.CanHandleEvent("Keypress")) Scene.ApplyEvent("Keypress");
  4.  
  5.    // the rest of your original handler here
  6. }
  7.  
  8.  
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

megane

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 13
    • View Profile
Re: i cant upload image to scene
« Reply #4 on: March 28, 2010, 10:07:24 PM »



Really thanks, i am asking so easy question...i know... but i am so new and i havent time...

Now .i am wrote these codes under the scene_init.script  and  myscene.script.i tried both.but it doesnt work :(



Code: [Select]
#include "scripts\keys.inc"

on "Keypress"
{
   if (Scene.CanHandleEvent("Keypress")) Scene.ApplyEvent("Keypress");
 
  if (Keyboard.KeyCode == VK_UP)
{
      Scene.SkipTo(Scene.X, Scene.Y-50);
}
else if (Keyboard.KeyCode == VK_DOWN)
{
      Scene.SkipTo(Scene.X, Scene.Y+50);
}
else if (Keyboard.KeyCode == VK_LEFT)
{
      Scene.SkipTo(Scene.X-50, Scene.Y);
}
else if (Keyboard.KeyCode == VK_RIGHT)
{
      Scene.SkipTo(Scene.X+50, Scene.Y);
}


}
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: i cant upload image to scene
« Reply #5 on: March 28, 2010, 11:41:06 PM »

megane, please read my post carefully. Especially the block which goes into your game.script file (in the scripts folder).
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

megane

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 13
    • View Profile
Re: i cant upload image to scene
« Reply #6 on: March 29, 2010, 07:14:32 PM »



Thank you so much. it is ok now. but i have another problem :)
i try to do a panoroma..you know.. and my image has width=wdith= 17845,  height=1791.
And i cant set my scene 's main layer's width . because integer can be 10000.
What should i do this stuation ?



Best Regards.
Logged

Nihil

  • Supporter
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 528
  • Fear me! I'm evil!
    • View Profile
    • Order of Dagon
Re: i cant upload image to scene
« Reply #7 on: March 29, 2010, 08:17:48 PM »

You could use 2 pictures. But generally I don't think it's a good idea to use such freakin huge images at all.
 

Page created in 0.16 seconds with 23 queries.