What happened to "destroy"?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

What happened to "destroy"?

Post by The Burrito »

With the most recent builds of 0.6.0 my game is very close to working but destroy() no longer exists, I notice its not listed in http://love2d.org/potato/ either.
Was it removed? if so, why?

I need an efficient way to delete shapes primarily, and I was hoping for a way to delete bodies with implicit destruction of all attached shapes / joints.
perhaps theres another way to do it that I'm overlooking?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: What happened to "destroy"?

Post by bartbes »

Just setting the variable in which the shape/body is stored to nil should be enough.
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

Re: What happened to "destroy"?

Post by The Burrito »

oh, I tried that and thought it didn't work, but under further inspection it appears that I was getting collision with an overlapping invisible shape.

Thanks!
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: What happened to "destroy"?

Post by rude »

I don't remember removing destroy.

WTF, sirs.
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

Re: What happened to "destroy"?

Post by The Burrito »

So does shape:destroy() do the same thing as shape=nil ?
I would assume I would want to use destroy.

I'm getting some random glitchy things happening still, but I'm assuming those are related to other things (currently I think most of it has something to do with testsegment).
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 41 guests