Click and drag resource pack? [Solved]

DeathWish

  • Posts: 31
I'm not sure if this is in the right forum, but meh, I'll post it here anyways.

I'm making a physics game, and I wanted to know if there was any Click-and-Drag resource pack.

« Last Edit: August 07, 2011, 08:05:53 am by DeathWish »

waterstorm

  • Posts: 11
You can use the Drop Block kit that comes with StencylWorks, but I don't know about a resource pack.

Hectate

  • *
  • Posts: 4645
Are you asking to click and hold to drag and drop an object? Originally I thought you were asking to click and hold to drag a selection region, but the first makes more sense for a physics game I think.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

DeathWish

  • Posts: 31
Are you asking to click and hold to drag and drop an object? Originally I thought you were asking to click and hold to drag a selection region, but the first makes more sense for a physics game I think.
Click and drag an object, I said actor, didn't I? :P
And to waterstorm, I haven't learned to use that yet, I'm planning on learning tomorrow, but today I want to toy with other things :P

Hectate

  • *
  • Posts: 4645
I'm making a physics game, and I wanted to know if there was any Click-and-Drag resource pack.
Nope, no mention of actors  :o

But worry not, I have your solution!

Creating behavior in 3...2...1...
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Hectate

  • *
  • Posts: 4645
Attached is an image of how it works.

You can find it on StencylForge as "Grab and Drag Actor". It's an actor behavior.

I also created a sample game of it functioning. Note, since there's no gravity in this scene, you may need to enable/disable gravity when it's grabbed/released by modifying the behavior.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

DeathWish

  • Posts: 31

Hectate

  • *
  • Posts: 4645
Sorry, that was my last post before disassembling the PC to put in a new PSU, now I'm on my phone. How is it glitchy? All it does is follow the mouse.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

DeathWish

  • Posts: 31
I meant my project (The code was messed up), but I fixed it :P For some reason your actor behavior didn't import correctly the first time, but when I downloaded it again it worked... Well, whatever. Now it works fine :D

goatsoup

  • Posts: 20
I already have a resource in Forge for this called MouseDrag.
it is very similar to the one above but it also keeps the actor within the screen. As used in my game BIDMAS.