Character Transparency (Solved)

Started by Dualnames, Tue 24/08/2010 18:10:30

Previous topic - Next topic

Dualnames

I'm using this:
Code: ags

ViewFrame*framed=Game.GetViewFrame(plyer.View, plyer.Loop, plyer.Frame);
ViewFrame*framed2=Game.GetViewFrame(shadow.View, shadow.Loop, shadow.Frame);
framed2.Graphic=framed.Graphic;


Where shadow is a character script name, and plyer is another character script name.
Okay, so anyhow, all is well, and the frames are coordinated greatly (I run that code on a repeatedly execute always). However no matter where I put the line I can't set the transparency to player shadow. If I set to 100 it disappears and if i set it to 0 it appears, but the values in between don't do much effect. I'm on version 3.1.2 and I'm on a 320x240 32bit game, and I just started coding the game, so that's the only code that is running.

Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

I could be wrong here, but I think all that code does is change the sprite slot numbers of shadow's view to plyer's view. As in, just use an identical view for shadow and you don't even need to run anything inside rep_ex_always (unless of course the shadow is meant to look like the player even if it is facing somewhere else or moving in another direction).

Regarding the problem, select the sprite the character uses in the sprite manager. Its ColorDepth should say 16. If it doesn't and says 8 instead, there's your reason why the transparency won't work.

Dualnames

Quote from: Khris on Tue 24/08/2010 18:36:18
(unless of course the shadow is meant to look like the player even if it is facing somewhere else or moving in another direction)

Regarding the problem, select the sprite the character uses in the sprite manager. Its ColorDepth should say 16. If it doesn't and says 8 instead, there's your reason why the transparency won't work.

That's what I'm trying to do Khris yes. However the color depth of the sprite is indeed 8bit, so that is the issue. Surprisingly I've used Tween Module on roger using tween transparency and it worked. So I wasn't aware of the Transparency thing. So thanks Khris, its solved.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk