coding pro needed...

Talk about making games.

coding pro needed...

Postby DBGames » Fri Jun 26, 2009 11:58 am

hey dellzby here with a question..

could anyone tell me the code for a slow transparancy change. its change must be 100% but it must be noticable at the same time

thx in advanced i hope to post my completed game soon...
User avatar
DBGames
 
Posts: 113
Joined: Wed Jun 24, 2009 10:13 am
Location: Bismarck, North Dakota
Score: 8 Give a positive score

Re: coding pro needed...

Postby MrJolteon » Fri Jun 26, 2009 11:59 am

I tried making that myself, but it didn't work for me either.
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: coding pro needed...

Postby DST » Fri Jun 26, 2009 2:22 pm

Code: Select all
transp+=.01;


Note to all: When images become transparent, they still render, and use up cpu!

If you want it to stop rendering, set
Visibility State to disable or don't draw/but allow events once the transp =1.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: coding pro needed...

Postby DBGames » Fri Jun 26, 2009 5:38 pm

DST i like your idea but im sure itll work the way needed.

i have TWO actors right in layers the only difference is the word on both actors. on mouse button UP for the only visible actor, it slowly becomes transparent showing the other actor. BUT after its 100% trans parent i want it to stay that way...

When you mouse button UP on the below actor i need the top actor to slowly transparent in. if you get is try your best but if you don't, then say and ill try my best at describing...
User avatar
DBGames
 
Posts: 113
Joined: Wed Jun 24, 2009 10:13 am
Location: Bismarck, North Dakota
Score: 8 Give a positive score

Re: coding pro needed...

Postby DST » Fri Jun 26, 2009 7:01 pm

Create a variable, real, actor integer. Here i named it 'fade'.

Actor>Createactor>
Code: Select all
fade=-.01;


Actor>mousebuttonup>
Code: Select all
fade*=-1;




Actor>Draw Actor>
Code: Select all
transp+=fade;
if(transp>.99){
VisibilityState("Event Actor", DONT_DRAW_ONLY);
EventDisable("Event Actor", EVENTMOUSEBUTTONUP);
}
else if(transp<=.99){
EventEnable("Event Actor", EVENTMOUSEBUTTONUP);
VisibilityState("Event Actor", ENABLE);
}



There's one way to do that. There are lots of ways to do it.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: coding pro needed...

Postby DBGames » Sat Jun 27, 2009 9:03 pm

wow thanks :D
Last edited by DBGames on Thu Dec 03, 2009 1:06 am, edited 1 time in total.
User avatar
DBGames
 
Posts: 113
Joined: Wed Jun 24, 2009 10:13 am
Location: Bismarck, North Dakota
Score: 8 Give a positive score

Re: coding pro needed...

Postby MrJolteon » Mon Jun 29, 2009 8:41 am

I did something else to make one button disappear, and another one appear. DEMO:
G-E-P-A-I-N-T-E-R.zip
demo
(737.38 KiB) Downloaded 106 times
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest