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: Flipping windows?  (Read 3653 times)

0 Members and 1 Guest are viewing this topic.

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Flipping windows?
« on: September 06, 2009, 05:45:19 AM »

Hi guys,
Is their a way to flip windows?
We want to use face portraits in conversations and then flip them when the character is facing the other direction.

Cheers  ::beer
Myles Blasonato.
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Flipping windows?
« Reply #1 on: September 07, 2009, 01:13:23 PM »

You can flip sprite frames programatically by setting their MirrorX / MirrorY properties.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: Flipping windows?
« Reply #2 on: September 07, 2009, 02:04:40 PM »

Sweet!
Thanks alot Mnemonic.

Cheers  ::beer
Myles Blasonato.
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: Flipping windows?
« Reply #3 on: September 08, 2009, 05:04:25 AM »

Hi guys, here is my code for showing portraits. Everything works except for MirrorX and the Rotate. Why?

Code: [Select]
method showPortrait(image,fade,frames,posX,posY,dir,rot){
port = Game.CreateEntity("port");
port.SetSprite("interface\Conversation Graphics\Portraits\portraits.sprite");
port.X = posX;
port.Y = posY;
port.Rotate = rot;
sprite = port.GetSpriteObject();
sprite.AddFrame(image);
sprite.Reset();
if(dir == "left"){
sprite.MirrorX = sprite.MirrorX + 500;
}else{
sprite.MirrorX + 100;
}
fadeIn(port,fade,frames);
}

Cheers  ::beer
Myles Blasonato.
« Last Edit: September 08, 2009, 05:45:15 AM by mylesb »
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Flipping windows?
« Reply #4 on: September 08, 2009, 07:11:44 AM »

I don't know what "sprite.MirrorX = sprite.MirrorX + 500;" is supposed to do, but:

1) MirrorX and MirrorY are logical properties (do I want to flip the image? yes / no)
2) They are properties of individual sprite frames, not the whole sprite
3) you probably want to mirror along Y axis here, not X
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: Flipping windows?
« Reply #5 on: September 08, 2009, 09:16:30 AM »

Oh ok. I tried something like that earlier but i will give it another shot but their was another problem. Because it was an entity it was at the very front. How do i make it in front of everything.

Cheers  ::beer
Myles Blasonato.
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38
 

Page created in 0.037 seconds with 21 queries.