Contact between two actors

Non-platform specific questions.

Contact between two actors

Postby Troodon » Wed May 30, 2007 5:41 pm

Hi,
I just heard that GE can draw pixels. Is there a way to draw line between two of my actors?
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Fuzzy » Thu May 31, 2007 2:57 am

make a one pixel actor and use draw_from.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby Sgt. Sparky » Thu May 31, 2007 2:58 am

Fuzzy wrote:make a one pixel actor and use draw_from.

or just use a variable called Actor[2] (an array of 2 points, 0 and 1)
and use the linto or whatever. :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Thu May 31, 2007 9:14 am

I think there is no draw_from function in my GE version so I will use the lineto.
Is it simple system?
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Thu May 31, 2007 4:18 pm

yes it is. :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Thu May 31, 2007 4:45 pm

Can you tell me how it works? :)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Thu May 31, 2007 4:48 pm

okay,
on the create actor event of the canvas:
setpen(the r value you want, the g value you want, the b value you want, the transparency, the size);
on the draw actor event of the canvas(make the canvas the size of the view and make sure the upper left corner of the canvas is touching the view.)
erase(0, 0, 0, 1);
moveto(Actor1.xscreen, Actor1.yscreen);
lineto(Actor2.xscreen, Actor2.yscreen);

:D
as simple as that.
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest