The Daily Click ::. Forums ::. Klik Coding Help ::. I've got a problem that prolly needs an extension to fix. But which one?
 

Post Reply  Post Oekaki 
 

Posted By Message

Jon Chambers



Registered
  25/08/2002
Points
  1071
15th September, 2005 at 22:23:32 -

Okay, imagine a rectangle that has one corner at the co-ordinates of an active object, and another at the co-ordinates of the mouse. No matter where the mouse and object move, the rectangle resize.

Now imagine a diagonal line running over the rectangle from the object to the mouse. So instead of forming a rectangle as such, it forms two triangles that together make a rectangle.

I can already do this much with a line object, but this next thing is just impossible for me...

How do I make one traingle a different colour to the other?

 
Copy this to your hard drive. It will be worth alot when I'm famous.

Notice: Spelling mistakes above left in for people who need to correct others to make their life fulfilled.

Robbert



Registered
  19/06/2003
Points
  420
16th September, 2005 at 11:45:08 -

Well that ain't gonna happen with the line-object that's for sure.

Maybe you can draw 2 triangles and just resize them in-game when the position of your mouse changes. But that will get ugly I guess.

 
Hey mates, I'm Iglo yeah =P!

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
17th September, 2005 at 08:17:55 -

i guess you'd have to make them separate objects for that

Try just making to alpha channel object triangles and resizing them in-game?

 
n/a

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
18th September, 2005 at 08:00:43 -

Overlay Redux can do this. I'm just making you an example.

 
191 / 9999 * 7 + 191 * 7

Jon Chambers



Registered
  25/08/2002
Points
  1071
18th September, 2005 at 08:04:16 -

Thanks. Would it be too much for me to ask if you would also post a link to the overlay redux you used? I think there is more than one.

 
Copy this to your hard drive. It will be worth alot when I'm famous.

Notice: Spelling mistakes above left in for people who need to correct others to make their life fulfilled.

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
18th September, 2005 at 08:10:44 -

Just curious...

With Line Object, do you mean the buggy DRAWLINE or is there a newer, better line extension available?

 
Old member (~2004-2007).

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
18th September, 2005 at 08:21:17 -

Think he means the buggy Drawline one.

The example's here:
http://chris.planetabeo.com/files/triangles%20between%20objects.zip

I don't know if there are other versions of Redux, I'm not sure which one this would be. I'm assuming it would be this one:

http://click.spatang.com/ext/view.php?ext=10

 
191 / 9999 * 7 + 191 * 7

Jon Chambers



Registered
  25/08/2002
Points
  1071
19th September, 2005 at 05:38:34 -

Dude, you rock. Not only did you show me that it is possable, but you also put it in dumbass friendly comments in. Just one question. What is "Str$", and the whole + and ""s thing? I'm used to just numbers and values.

 
Copy this to your hard drive. It will be worth alot when I'm famous.

Notice: Spelling mistakes above left in for people who need to correct others to make their life fulfilled.

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
19th September, 2005 at 11:18:07 -

Yeah, that 'shape' feature of Redux takes lots of points as text. So instead of adding each point using an action, you give it a big long text string like this:

"(12,14)(9,11)(15,22)(200,12)" and so on. Each set of brackets means a single point, so "(12,14)" means 'a point at 12x14 on the screen'.

I was grateful for doing that though, cos up until I tried that I didn't actually know how much Redux could do, LOL!

Glad it helped.

 
191 / 9999 * 7 + 191 * 7

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
19th September, 2005 at 13:22:03 -

Wow, I've never used the overlay extension before, but it seems to be l337

 
n/a
   

Post Reply



 



Advertisement

Worth A Click