Character in a smooth and gradual Transparency transition

Started by I<3Pindorama!, Sat 20/12/2014 22:09:20

Previous topic - Next topic

I<3Pindorama!

Hi! It's me ... the hard begginner! :-D

When the cursor is over in the character I'd like to execute a transition
smooth and gradual transparency to a certain level (either higher or lower).

I search, find and put in the game the command that makes the character detect when the cursor
is over it and also not. I tried input a level of transparency like a fadein and
fadeout one by one, but the processing is very fast and did not make the slightest
difference.

Below is my attempt:

Code: ags

if (Character.GetAtScreenXY(mouse.x, mouse.y) == cEgo){
      cEgo.Transparency=(43);
      cEgo.Transparency=(53);
      cEgo.Transparency=(63);
      cEgo.Transparency=(73);
      cEgo.Transparency=(83);
      cEgo.Transparency=(93);
      }
      else {
        cEgo.Transparency=(80);
        cEgo.Transparency=(75);
        cEgo.Transparency=(70);
        cEgo.Transparency=(65);
        cEgo.Transparency=(60);
        cEgo.Transparency=(55);
        cEgo.Transparency=(50);
        cEgo.Transparency=(45);
        cEgo.Transparency=(43);
}


I even tried using the WAIT command, but it did not work ...  :~(

A little help... please...

Don't do for me... do it for Dusko!

                           (o)< - Quáx! <3
/\/\/\/\/\/\[  ]/\/\/\/\/\/\
Ooooh...Dusko say: "I Love You!"

Kidding!
Just to de-stress :P

My eternal gratitude to who suggest or indicate a solution!   ;)

Cassiebsg

I can't help you with a script solution like that, since it's not something I've tried yet.

But can suggest you try some alpha-transparent sprites. ;)
Create your picture with 90% transparency, 80%, 70%... etc
Import them, create a view and loop a zoom in and zoom out... then just call the view/loop.

There are those who believe that life here began out there...

Slasher

Hi,

You could also import the TWEEN module.

I think this is the one: http://www.adventuregamestudio.co.uk/forums/index.php?topic=38015.0

I created a boolean and named it cEgo_Trans and set it to false.

When cursor over cEgo it will tween trans to 93% and when cursor off cEgo tween trans to 43%.

add this in either Room or Global (if for more than one room)  Rep Exec:

Code: ags
function room_RepExec()
{
 if (Character.GetAtScreenXY(mouse.x, mouse.y) == cEgo && cEgo_Trans==false){
 cEgo.TweenTransparency(1.5, 93, eNoBlockTween);
 cEgo_Trans=true;
}
 else  if(cEgo_Trans==true){
 cEgo.TweenTransparency(1.5, 43, eNoBlockTween);
 cEgo_Trans=false;
}
}


Something like this should work....



I<3Pindorama!

Really I have strived so much to give life to this project.
I have a doubt in every second. I insist searching informations
in this forum team but sometimes the words come to dance and this
dance burn my eyes ... and i insist and to continue my search.

You know I like it all... but it's not exactly a pleasure...
because I'm not in the player position ... but a creator position ...
so now it comes to the search for relief from this terrible
and distressing desire and which is often a painful spiritual
challenge ... but much worse is to contain, store and swallow...
and I need and I want to get rid of it ... art is my vomit ...
my birth ... is the statement my deepest feelings and secrets ...
it's like if this thing staying inside of me can will tear my soul.

Are these times that the patience and your help make all the difference to me.
I would love to have at least half the knowledge you have. So I can would
repay up to any questions that you have.

Extremely grateful for the generosity of you!
Thanks Slasher and Cassie!

     [ <3 ]
        /
\_O<
- - - - - -

Mandle

Quote from: I<3Pindorama! on Mon 22/12/2014 03:07:55
... art is my vomit ...

THAT! That right there!!!

THAT IS AWESOME!!!

I'm being very serious! That is the pain of creativity that every artist tries to express...

Now I get glib:

Just never reverse that statement and you will do great with all your projects (too many artists have gone that path already)...

I<3Pindorama!

Thanks Mandle!

If Necessary i will bury my hand
in my throat and pull it from inside...

This vomit will have to gush!

SMF spam blocked by CleanTalk