EMERGENCY--School Project: I need help for android scripting

Hello,

I am developing a game with two classmates for a school project. We are all new to unity and scripting, and we are asked to develop our game for the android.

So far, we’ve been developing a 2D platformer using keyboard controls. Unfortunately, our guy in charge of lead programming is having a hard time scripting for the phone.

We hope to script the controls to have two tall buttons on the left and right sides of the screen for movement; and up-swipe to jump and double jump; and left or right swipe to dash; and a down-swipe to jump cancel mid-air. I’m pretty sure we have all the Editor preferences right and stuff, it’s just purely scripting…

Can anyone please help? We desperately need to have these controls by the end of tomorrow at 4 (mountain time).

Here is our playerscript and a touch script we got from someone else deveoping a mobile game

1971689–127775–PlayerScript.cs (12.3 KB)
1971689–127776–DetectSwipe (1).txt (1.87 KB)

I don’t think you’ll find people too willing to do your homework for you. Especially when you post a 500 line script and aren’t asking for a specific thing. Are the buttons not showing up? Is there weird behaviour? Does your sister’s hair catch on fire when your dog sneezes?

You’re going to have to show some best effort. Paste in like 10 lines of code that you’ve isolated the problem to, give us some context, and ask for help based on that information – but still be extremely specific about what the problem is. 99.99% of the time we’re not running your code. We’re just looking at it and seeing if there’s anything obviously wrong based on knowledge or experience. Help us help you, and don’t ask us to do your homework for you. :stuck_out_tongue:

1 Like

I’m sorry if a came off naive or frank. As I said, we don’t have much experience in scripting. I’m spending time now figuring this out, and this is my first time looking into it directly myself.

I’m helping and picking up a group member’s slack, so I’m managing my time–and therefore, posting a thread as soon as possible seemed to make sense. As far as I could know, we might have had almost everything we needed but proper referencing between PlayerScript and DetectSwipe. I’m sorry, I can specify better in an hour or two if I need the help. Please understand that this is a post of eustress, and belittling phrases like “do your homework” isn’t the kindest ones to use.

I did, for the record, find a built-in package called “Standard Assets (Mobile),” which is helpful right now.

I apologize for seemingly taking advantage of forum-goers. If referencing a swipe was almost as easy as typing KeyCode.Left or Right, it would be worth to ask, you know? Also, if any forum-goers have a reference(s) in mind for ‘How to’ videos or articles that they can recommend, it would be appreciated :slight_smile:

I definitely didn’t meant to come off sounding like I, or anyone else, wasn’t going to help at all. I was just trying to give you some honesty by saying that you’re most likely going to receive zero help. You still haven’t really addressed what is or isn’t working. I did one google search for unity swipe controls and got

from the top video link.

Again, not trying to say I don’t want to help. I’ve been all over these forums trying to help people the last couple days, but you asked for everything and nothing at the same time. If you have a specific need, please do ask.

Thank you, I got them working. The DetectSwipe script was enough, but no one had tried attaching and using it for some reason.

The problem is largely solved. Thank you :slight_smile: