Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Rocco on September 28, 2005, 06:36:07 PM

Title: problem with background image in spriteEdit
Post by: Rocco on September 28, 2005, 06:36:07 PM
the background pics are completly crappy in SpriteEdit.
i tried *.bmps and *.pngs.
here is an example -> http://www.virtual-illusion.com/rocco/ex.jpg
is this a known problem?
Title: Re: problem with background image in spriteEdit
Post by: Mnemonic on September 28, 2005, 06:57:25 PM
Oops, it got broken somewhere along the way. You can download a fixed version here: http://dead-code.org/download/SpriteEdit_fix.zip
Title: Re: problem with background image in spriteEdit
Post by: Rocco on September 28, 2005, 07:22:19 PM
thx, works perfect now.
Title: Re: problem with background image in spriteEdit
Post by: Rocco on September 29, 2005, 09:46:38 AM
a little question about sprite controlling:

i have this code, in the scene_init script:
Code: [Select]
global seilwinde;

var seilwind = Scene.GetNode("seilwinde_ani");
var seilwindesprite = seilwind.GetSpriteObject();

if(!seilwinde.finish)
{
  seilwindesprite.Pause();  // ani is in initialstanding at frame 1
}
else
{
   seilwindesprite.[glow=red,2,300]SetFrame[/glow](30); <- i need a method similar to this, to set the ani to frame 30
}

the if case is the initial condition, if the player triggers the right item, the ani plays to frame 30 and stop there.
this is perfect and how i need it, the problem is if the player change the room and come back again to this scene,
the ani is reseted and stands at frame 1.
then comes the else section in use, where i want to set the sprite to frame 30.
but im not able, to accomplish this case by myself.
thanks in advance
Title: Re: problem with background image in spriteEdit
Post by: Nihil on September 29, 2005, 12:44:00 PM
I can't test it right now, but I think you can use CurrentFrame for that ->  seilwindesprite.CurrentFrame = 30 (but I'm not sure about it :-) )
Title: Re: problem with background image in spriteEdit
Post by: Rocco on September 29, 2005, 12:58:25 PM
thx, it works :-)))
i thaught CurrentFrame works only for determining which frame is displayed at the moment.
help file -> Specifies the index of the currently playing animation frame.
my english is too bad.
Title: Re: problem with background image in spriteEdit
Post by: Nihil on September 29, 2005, 01:01:14 PM
You can use it for both then :-)
I think attributes that can't be changed via code have a "read-only" behind them in the docs.
Title: Re: problem with background image in spriteEdit
Post by: Rocco on September 29, 2005, 01:16:23 PM
rather logical, thx this is a very useful hint :-))))