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: Smooth scaling going left to right?  (Read 2295 times)

0 Members and 1 Guest are viewing this topic.

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Smooth scaling going left to right?
« on: August 10, 2006, 01:31:10 AM »

I have a wide screen that appears to go farther away as it pans right. This would require the character to be at a different scale level than when he is on the left side. I know that you can set scale levels with decoration layers....I suppose I could have a ton of decoration layers and go 1 percent at a time but that would be a pain and I dont know if that would affect performance in a negative way. Is there any other way to do this?
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: Smooth scaling going left to right?
« Reply #1 on: August 10, 2006, 09:02:50 AM »

you can of course scale actor based on his actor.X position through actor.Scale

this would be very easy to script and you can set any ratio you want.

ok, some untested code:

#include "scripts/base.inc"

var RATIO = [some float here];

while (1)
{
  actor.Scale = 100 - (actor.X / RATIO);
  Sleep(10);
}

this you would put to some separate file and attach it to the scene in scene_init.script through

Scene.AttachScript("your file goes here");

Of course there are other ways to do that, but this should work. Also instead of dividing you can make some other algorithm how to scale
actor. It's hard to know how you want actor to be scaled without actual gfx.

Hope that helps
« Last Edit: August 10, 2006, 09:08:19 AM by metamorphium »
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet
 

Page created in 0.045 seconds with 20 queries.