dMZX Forums: Another quick question.. - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Another quick question.. ...another programming question

#1 User is offline   MzXr468 

  • Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 06-August 01

Posted 07 August 2001 - 04:14 AM

How exactly do I fade certain colors of the palette?  I know there is some kind of tool for it, but I have no clue how to use it.  How would you do it without the tool?  There's one point in my game where I want black to fade slowly to white, how would I do this?
0

#2 User is offline   Tixus 

  • cancelled by fox
  • Group: DigiStaff
  • Posts: 1,841
  • Joined: 11-December 00
  • Gender:Male
  • Location:Springfield

Posted 07 August 2001 - 04:29 AM

palfade.exe...All you need to do is make two palettes...The one you want to fade from, and the one you want to fade into.  It'll make a text file that you can import into a robot, that has the fades.
0

#3 User is offline   MzXr468 

  • Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 06-August 01

Posted 07 August 2001 - 04:49 AM

Hmm I see..  I'll try it out, thanks a lot for the help.
0

#4 User is offline   RoSS 

  • RIP Fred Friedberg 2004
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,283
  • Joined: 22-October 00
  • Gender:Male
  • Location:Right in front of behind you.

Posted 07 August 2001 - 05:36 AM

I think there's a slightly better way to do this in this case.
set any color (in this example "1") to R=0,G=0,B=0

loop start
set color 1 "loopcount" "loopcount" "loopcount"
wait 3
loop 63


this will be much, much easier than messing around with palfade because it's only 5 lines wheras palfade I believe would take over 900 lines (I might be wrong)
also, take note that that "1" in set color is the color you want to fade from black to white and the wait 3 can be set to anything.
0

#5 User is offline   Nanobot 

  • It's in your blood
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,623
  • Joined: 11-October 00
  • Gender:Male
  • Location:Chico, CA (USA)

Posted 07 August 2001 - 06:37 AM

Or you could do this way:

set color 0 63 63 63
loop start
color intensity 0 loopcount percent
wait 1
loop 99

Always remember to set the "loop [number]" to 1 less than the total value. RoSS's idea should have it "loop 62"
0

#6 User is offline   MzXr468 

  • Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 06-August 01

Posted 07 August 2001 - 07:21 AM

OK I tried using palfade.. How the #### do I use that thing!?  First it doesn't name the files right, and I gotta change the filename to .txt (I'm supposed to.. right?).  Then I check out the txt and it turns all of the colors to 0 0 0!!  And I don't know how many steps I should do it in to look the best.. what do you recommend (that is, if I can get the #### thing working).  I may have to do what you guys recommened (with the color inensity, etc.)  But in the future I may really need palfade, so can someone tell me what's going on?
0

#7 User is offline   Tox 

  • Gay cowboy
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,380
  • Joined: 25-January 01
  • Gender:Male
  • Location:Toowoomba, Queensland. Australia.

Posted 07 August 2001 - 09:14 AM

With mzxAK, you don't need palfade.
0

#8 User is offline   MzXr468 

  • Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 06-August 01

Posted 07 August 2001 - 06:25 PM

Nah I don't want to switch versions of megazeux.  I'm happy with 2.51.. I just need to get palfade working.
0

#9 User is offline   Lc3 

  • Five Star Lamer
  • PipPipPipPip
  • Group: Members
  • Posts: 878
  • Joined: 18-July 01
  • Location:Scotland

Posted 07 August 2001 - 10:45 PM

use RoSS' way
0

#10 User is offline   RoSS 

  • RIP Fred Friedberg 2004
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,283
  • Joined: 22-October 00
  • Gender:Male
  • Location:Right in front of behind you.

Posted 07 August 2001 - 11:30 PM

Don't get me wrong, Nano's way is just as good. The only difference is afterwards, once you're done with mine, you gotta switch the color you want back to 0,0,0 (or leave it at white or switch it to whatever color) as with nano's, if you want it white you don't have to have anything after it.
0

#11 User is offline   inmate2993 

  • Not an actual sockpuppet.
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,024
  • Joined: 21-October 00
  • Gender:Not Telling
  • Location:Mystery Bronx Theater 3000

Posted 08 August 2001 - 02:22 AM

Actually, the command LOOP START sets loopcount to 0 and LOOP is an inclusive condition, so loop for 100 would include both 0 and 100 in the code, making 101 steps. As for a fade into white, you could change your palette into numbers, oh, COL[&NUM&].R COL[&NUM&].G COL[&NUM&].B, just for simplicity, :P, and then do that on a loop.

SET LOCAL 0
:LOOPOUTER
LOOP START
INC COL[&LOOPCOUNT&].R 1
IF COL[&LOOPCOUNT&].R < 64 OKAYR
SET COL[&LOOPCOUNT&].R 63
:OKAYR
INC COL[&LOOPCOUNT&].G 1
IF COL[&LOOPCOUNT&].G < 64 OKAYG
SET COL[&LOOPCOUNT&].G 63
:OKAYG
INC COL[&LOOPCOUNT&].B 1
IF COL[&LOOPCOUNT&].B < 64 OKAYB
SET COL[&LOOPCOUNT&].B 63
:OKAYB
SET COLOR LOOPCOUNT COL[&LOOPCOUNT&].R COL[&LOOPCOUNT&].G
>>> COL[&LOOPCOUNT&].B
LOOP 15
WAIT 1
INC LOCAL 1
IF LOCAL <= 63 LOOPOUTER

:D
0

#12 User is offline   MzXr468 

  • Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 06-August 01

Posted 08 August 2001 - 11:53 PM

Err... I didn't understand that last suggestion.
But anyway, I figured out how to do it.  Thanks everyone.
0

#13 User is offline   RoSS 

  • RIP Fred Friedberg 2004
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,283
  • Joined: 22-October 00
  • Gender:Male
  • Location:Right in front of behind you.

Posted 09 August 2001 - 04:00 AM

I think inmate's was a joke.
0

#14 User is offline   Artith1 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 188
  • Joined: 05-July 01

Posted 09 August 2001 - 04:05 AM

color intensity "color" "percent" percent

Where color is a numeric/counter pointing to the color and percent is the percentage. thats how you set up one colors brightness

loop start
set local to 100
dec local loopcount
color intensity 1 local percent
wait 1
loop 100

theres how to fade out color 1

loop start
color intensity 1 loopcount percent
wait 1
loop 100

to fade in color 1

Tada!

-=Artith=-

*easy!*
0

#15 User is offline   RoSS 

  • RIP Fred Friedberg 2004
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,283
  • Joined: 22-October 00
  • Gender:Male
  • Location:Right in front of behind you.

Posted 09 August 2001 - 06:32 AM

Artith, did you even read other people's messages? We've already discussed that. Also, you may not want to put that set local 100 after the loop start ;)
0

#16 User is offline   Nanobot 

  • It's in your blood
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,623
  • Joined: 11-October 00
  • Gender:Male
  • Location:Chico, CA (USA)

Posted 09 August 2001 - 06:23 PM

RoSS, on Aug 8 2001, 11:32 PM, said:

Artith, did you even read other people's messages? We've already discussed that. Also, you may not want to put that set local 100 after the loop start ;)

No, that's right. Each loop, it takes 100 and decreases it by the loopcount. It's just another method.

However, once again, you should have it loop for 99, not 100.
0

#17 User is offline   RoSS 

  • RIP Fred Friedberg 2004
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,283
  • Joined: 22-October 00
  • Gender:Male
  • Location:Right in front of behind you.

Posted 09 August 2001 - 07:46 PM

Oh, I'm sorry, the way I'm used to seeing that is having the set local 100 outside of the loop, then decreasing it by 1 each time. It's slightly more efficiant. Sorry, it appeared I hadn't read your message properly.
0

#18 User is offline   Kuddy 

  • nobody
  • Group: DigiStaff
  • Posts: 4,823
  • Joined: 26-January 01
  • Gender:Male
  • Location:Philadelphia
  • 3DS Friend Code:4227-0979-0064

Posted 22 March 2007 - 08:14 PM

this thread is #1

Posted Image
Posted Image
bollocks
0

#19 User is offline   Val 

  • ring ring zap
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,233
  • Joined: 19-February 04
  • Gender:Female
  • Location:Bartholomew

Posted 22 March 2007 - 08:25 PM

I love you, Kuddy.
0

#20 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,960
  • Joined: 12-October 00
  • Gender:Male

Posted 22 March 2007 - 08:39 PM

#moderation Mode

This topic is too old. Locked.

----

Thinking at the speed of dark.
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users