The Daily Click ::. Forums ::. General Chat ::. How do I make a line? Stetchable
 

Post Reply  Post Oekaki 
 

Posted By Message

eliris



Registered
  14/05/2010
Points
  1708

360 OwnerVIP Member
23rd August, 2010 at 10:38:47 -

I am wondering how they make those lines lately, it's a line attached to 2 active objects and when the object move further, the line become longer, I want to know the engine, plz reply

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
23rd August, 2010 at 11:10:02 -

If you mean what I think you mean, you do it by scaling and rotating an active object.
Start out by creating an active that's just a single pixel in size, and call it "Line".
Then...

+ Always
-> Line: Set X Scale to Sqr((X("A")-X("B"))pow 2)+((Y("A")-Y("B"))pow 2))
-> Line: Set Angle to ATan2(Y("A")-Y("B"), X("B")-X("A"))

You MUST use HWA, or it will be far too slow.

See the Laser Beam example here:
http://www.create-games.com/download.asp?id=8261


 
n/a

eliris



Registered
  14/05/2010
Points
  1708

360 OwnerVIP Member
23rd August, 2010 at 12:25:56 -

what I meant is like the one in the game "living for the little things" , download it a t TDC, and at the end of the day, where you take a dog with you, the dog chain is a line that can stretch
thanks for showing me the stuff

 
n/a
   

Post Reply



 



Advertisement

Worth A Click