Forum rules - please read before posting.

2D custom draggable scripts?

I know that currently draggables are not currently built-into AC for 2D games. I have two questions:
1. Are there any plans to add 2D draggables into AC?
2. Does anyone have any scripts that they use for 2D draggables? I am not a C# programmer, so I don't really know how to do that on my own.

Comments

  • Are there any plans to add 2D draggables into AC?

    Not currently.

    Does anyone have any scripts that they use for 2D draggables?

    You may have luck on the Asset Store, or Unity's forums. If you do find something appropriate, I'd recommend trying it out separately to AC first. When you're ready to incorporate it into your AC game, know that you can use the Engine: Manage systems Action to selectively disable AC's various systems (e.g. Movement) while you're making use of it.

  • edited January 2021

    I just made a script for my invisible objects to follow the mouse cursor. Once I pick an item I set the following object visibility on and set the hotspot on on which I want to use it on and set visibility off of the picked up object . When I click on a hotspot I set visibility of the following object off.
    Here is the example in my game on 8:16

    I thought Chris had this feature with PUZZLE TEMPLATE: ITEM ARRANGING
    https://www.adventurecreator.org/downloads
    I haven't checked it out it might not be draggable.

    Or maybe this PHYSICS DEMO SOURCE FILES
    https://www.adventurecreator.org/downloads

  • Ok, I'll take a look at those. The main thing I want to do with draggables is for opening drawers or flipping switches etc. I can still do those with taps, but it adds to the tactile nature of the game I am trying to make to have them dragged.

  • For drawers open/close I use Object: Transform action.
    For switches I use mecanim animations, way easier. Or just change the sprites , you turn switches so fast.

  • That's what I've been doing, but I've begun to look around for other options for physical dragging to try to make the game a bit better.

  • Did you have any luck with this? I'm making a 2D game and I want to be able to click, hold & drag e.g to pull a lever.

    I got it working in the past with draggables but lost my project file and I can't reproduce what I did and it's driving me crazy!

    Any help would be hugely appreciated. If anyone has a game object I can import to look at that would be amazing.

    Thanks!

  • Yes, the way I've found to do this is just to use the 3D draggable system with 2D sprites, works perfectly fine. If you need some extra help or have questions on how to do this, feel free to come on the AC Discord and I can help you out on there! :)

  • Great, thanks very much. That is what I have been doing but I'll give it another try and if it doesn't work I'll find you on discord :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.