Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> GML, I have Pro so no restraints
Unspecified
Mr.Cintrak
Posted: Jul 14 2008, 08:18 PM
Quote Post


No More.


Group Icon
Group: Members
Posts: 494
Member No.: 5413
Joined: 13-June 08

Status: (0d) [--]


I Want to Make afterimages on my main character, as simple as that. Can you guys help me out?

I want the afterimage to look interlaced like checkered with transperency, (with those details you might know what I mean)

Thing is I ONLY want two afterimages maximum I don't want three to come out or four (because then it will look like superspeed and he aint THAT fast).

SO MAIN REQUEST: Afterimage GML code Draw code or whatever I got PRO so no hold backs (please refrain from scripts)

FOR ANY MOVEMENT of my character and two afterimages maximum.

Think you can help me out?
Please and Thank You.


--------------------
My Ryhmes Are No More I've changed for these times.Good By MC I am Only Cintrak Now.
Ref2,Courtesy of shymouse. Ref 3 Courtesy of Iceinwar


QUOTE (Boxxy)
i love how you are all **** WHERE IS MY MARIO ZELDA HYPER PIKMIN GAME when e3 comes along but when those kinds of games come out you just say THIS GAME IS **** DAMN THAT CONTROLLER LOOKS LIKE A DIL-DO
PM
Top
Canada
MegaTailzChao
Posted: Jul 14 2008, 10:46 PM
Quote Post


So long, and thanks for all the fish.
[S][*][*][*][*]
[*][*]

Group Icon
Group: Site Staff
Posts: 15788
Member No.: 2267
Joined: 2-July 06

Status: (0d) [--]


First of all you need to define 4 variables for each afterimage.

Let's call them x1, y1, sprite1, image1, x2, y2, sprite2, image2, and so on.

Set an alarm, and on the alarm set the last variables (For this example we'll use 2) to the next variable's sets, and the next to the next, and so on. Set x1, y1, sprite1, and image1 to x, y, sprite_index, and image_index accordingly.

On the draw event, put draw_sprite(sprite1,image1,x1,y1), and repeat for every afterimage you want.

So...

Alarm event:
CODE
//Makes it so the oldest after-image goes away, and replaces the newest one with an older one to make room for another.
x2 = x1
y2 = y1
sprite2 = sprite1
image2 = image1

//Creates a new after-image
x1 = x
y1 = y
sprite1 = sprite_index
image1 = image_index

alarm[whatever alrm you set this to] = however much delay you want between images

Draw event:
CODE
//Draws the after-images
draw_sprite(sprite1,image1,x1,y1)
draw_sprite(sprite2,image2,x2,y2)
//etc.


Simple enough.


--------------------
user posted image
user posted imageuser posted image
PMEmail PosterMSN
Top
Unspecified
Mr.Cintrak
Posted: Jul 14 2008, 11:39 PM
Quote Post


No More.


Group Icon
Group: Members
Posts: 494
Member No.: 5413
Joined: 13-June 08

Status: (0d) [--]


QUOTE (MegaTailzChao @ Jul 14 2008, 10:46 PM)
First of all you need to define 4 variables for each afterimage.

Let's call them x1, y1, sprite1, image1, x2, y2, sprite2, image2, and so on.

Set an alarm, and on the alarm set the last variables (For this example we'll use 2) to the next variable's sets, and the next to the next, and so on. Set x1, y1, sprite1, and image1 to x, y, sprite_index, and image_index accordingly.

On the draw event, put draw_sprite(sprite1,image1,x1,y1), and repeat for every afterimage you want.

So...

Alarm event:
CODE
//Makes it so the oldest after-image goes away, and replaces the newest one with an older one to make room for another.
x2 = x1
y2 = y1
sprite2 = sprite1
image2 = image1

//Creates a new after-image
x1 = x
y1 = y
sprite1 = sprite_index
image1 = image_index

alarm[whatever alrm you set this to] = however much delay you want between images

Draw event:
CODE
//Draws the after-images
draw_sprite(sprite1,image1,x1,y1)
draw_sprite(sprite2,image2,x2,y2)
//etc.


Simple enough.

thanks ill try it tomorrow!


--------------------
My Ryhmes Are No More I've changed for these times.Good By MC I am Only Cintrak Now.
Ref2,Courtesy of shymouse. Ref 3 Courtesy of Iceinwar


QUOTE (Boxxy)
i love how you are all **** WHERE IS MY MARIO ZELDA HYPER PIKMIN GAME when e3 comes along but when those kinds of games come out you just say THIS GAME IS **** DAMN THAT CONTROLLER LOOKS LIKE A DIL-DO
PM
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0446 ]   [ 13 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.40 ]