The most short code for grag'n'drope?

For problems with creating games or for reporting bugs of the Tool.
pavka_1
PaC-DK Newby
Posts: 26
Joined: 25 Jan 2011, 09:23

The most short code for grag'n'drope?

Post: #78048 pavka_1
16 Mar 2011, 13:24

Can somebody write the most short code for drag'n'drope? Like in Windows.
One object in empty room. Free move of the object in this room.

User avatar
Zimond
Der Engine Papa
Posts: 3318
Joined: 06 Apr 2003, 19:34
Location: Krefeld
Contact:

Re: The most short code for grag'n'drope?

Post: #78049 Zimond
16 Mar 2011, 14:01

there is an example on the Homepage that you can download, its called "Slidebar Demo". It also contains some simple dragndrop objects
Image

pavka_1
PaC-DK Newby
Posts: 26
Joined: 25 Jan 2011, 09:23

Re: The most short code for grag'n'drope?

Post: #78050 pavka_1
16 Mar 2011, 15:48

Zimond wrote:there is an example on the Homepage that you can download, its called "Slidebar Demo". It also contains some simple dragndrop objects

Yes. Good. But it was so hard to understand for me...i fucked my brain, but did it by myself.

In room
On (loop1)
{
if_bool (step; false)
{
setnum (obx; 0)
setnum (oby; 0)
}
if_num (pos; 1)
moveobj (Object2; [mousex]-[intervalx]; [mousey]-[intervaly];0)
setbool (step; true)
}

in object
on (click)
{
setnum (intervalx; [mousex]-[obx])
setnum (intervaly; [mousey]-[oby])
setnum (pos; 1)
}

on (release)
{
setnum (pos;0)
setnum (obx; [mousex]-[intervalx])
setnum (oby; [mousey]-[intervaly])
}

You work under new version ot the (great) editor?


Return to “Problems and Bugs”

Who is online

Users browsing this forum: No registered users and 2 guests