Pretty neat canvas selection (Animated)

Talk about making games.

Pretty neat canvas selection (Animated)

Postby Hblade » Wed Nov 17, 2010 4:50 am

I made a neat canvas selection tool, where you can use multiple canvas (AND COLORS :D) actors as selectors (or just 1 with different variables, bleh bleh). It's animated by having 4 white bars move across the selection area at your desired speed.

IMPORTANT
You will need to make an ACTOR variable called "VAR" in order for this to work.


Screenshots:
Screenshot-1.png


The screenshot makes it look buggy :P

Demo:
Scripts.zip
(51.65 KiB) Downloaded 84 times


Script:
Code: Select all
void selection(int R, int B, int G, int SPEED) {
    //Background Color
      erase(R, G, B, .64);
 
    //Set the color of lines
      setpen(255, 255, 255, 0, 1);

    //Make the 4 lines
    //LINE 1:
         moveto(VAR, 0);
         lineto(VAR, height);
 
    //LINE 2:
         moveto(VAR-16, 0);
         lineto(VAR-16, height);
 
    //LINE 3:
         moveto(VAR-32, 0);
         lineto(VAR-32, height);
 
    //LINE 4:
         moveto(VAR-48, 0);
         lineto(VAR-48, height);
 
 
 
   //ADD Variables
         VAR+=SPEED; if (VAR>=width+48) {
             VAR=0;
                                }


                                    }
}

The C file inside of the zip hasent been updated from the previous version so please use this script xD :3



Usage:
selection(R, G, B, Speed);

Example:
selection(14, 28, 255, 2);

Have fun ^^
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Pretty neat canvas selection (Animated)

Postby lcl » Wed Nov 17, 2010 8:09 am

Looks cool. :D
I'll try it. :D
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Pretty neat canvas selection (Animated)

Postby Hblade » Wed Nov 17, 2010 1:42 pm

thx ^^
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Pretty neat canvas selection (Animated)

Postby lcl » Wed Nov 17, 2010 3:19 pm

Nice. :D Good work! :D
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Pretty neat canvas selection (Animated)

Postby Hblade » Wed Nov 17, 2010 7:14 pm

ty ^^
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest