Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Pflobus · Jun 04, 2015 at 10:21 PM · unity 5rope

Spiderman?

So, I'm trying to create a game (sorta like this: https://www.youtube.com/watch?v=KJExQ1GhtcI (except replace the hidden blade with a Spiderman web slinger)) where you can run, jump, do 3rd person stuff, and have the webslinging Spiderman ability. But I don't really know where to start with the scripting. I want it to be able to grab objects and pull them to me, or allow me to grab onto a building and go up using the web, or to swing between buildings. I don't really know how to start...would I create a rope like thing, attach it to the object, and then try and swing or go up? I'm not really sure what and how to go about this. Any advice would be great.

Warm regards, and I appreciate the help. Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
4

Answer by Hexer · Jun 05, 2015 at 12:02 AM

Basically the idea is that when you click somewhere the string will go from the player to were you clicked. If double click pull the Spiderman to the position where you clicked this is done by using a joint2D+Raycast. When click again release poor Spiderman before he smash his head against the topside of the screen.

I suggest you look into raycast. you probably will need it. when the raycast hit something the string pull == true.

I ignore the fact that you want it to have button on the screen for running, It doesn't work well with all the inputs you want to have in the game (im thinking from a mobile point of view) WE ARE MAKING AN ENDLESS RUNNER so attach a movement script on the player that should look abit like this Void Update(){vector3.left = left; int speed = 3; transform.Translate(left*speed*Time.deltaTime);.

for the jump button. make a sprite in paint or photoshop, put a circle collider2d on it and attach a jump script to it, becarefull that you make a statement when the player can jump, because it wont be fun if spiderman could jump infinite time in the air right? So you get a script named grounded a.k.a we are making a bool, a bool is to check is something is true or false so if you leave the ground OnTriggerExit the jump = false when OnTriggerEnter the jump = true;.

for the score to make the game have a goal. We will use the x-axis as the score, our character begins at 0.0x position and the score will be the x value. If you want a highscore, look into PlayerPrefsGet and PlayerPrefsSet.

Last tips : Dont be picky about how you game looks, we can later on hire a professional for 1000$ a month and let it do all the fancy art work.

And! Never give up on improving and watching tutorials to get better at scripting. I'm scripting for about 1-2 years and I still consider myself not being adept at programming. This week I applied for an University for Art and Programming I got denied because I knew C# and little C++ also they said my potential "probably" laid at design and production, thinking about game mechanics, nah I didn't liked that idea. I thanked them for the time and will re-try to enter the course next year. So if you ever want to make this a job in the future and join a fancy University, than I will recommend to look also at c++.

Sorry for the long story.

Have a nice day

-Hexer

Lol just joking, here the actually advise, watch tutorials and try to understand them. try to understand what a Float and an Int is, know the difference. Make small projects in the beginning, projects that you can complete within 1 day.

Game Ideas: A wall is approaching you, what will you do? Ofcourse smash it apart with the hammer of Thor. Mjonir! (Everybody loves Nordic Mythologic right?). take the movement script I put above (check for errors as I stated Im terrible, some vars need to be defined). Put the script on the wall. Instantiate the wall, or make a loop of objects your choice. Instantiate(Obstacle,SpawnPosition,transform.position, Quarternion.identity); Use the InvokeRepeating for this because we don't want the wall to be spawning each frame with Void Update. When click on the screen(by using Input.GetMouseDown(0){ player.GetComponent() = true;} Then the collider got this script attached to it OnTriggerEnter(Collider other){Destroy.other}; hit BOOM wall smashed. {Score+=1;} static public int score = 0; a value you want to access from outside another script you always want that to be a static value. and with public you can edit the score in the inspector. If the wall hit you, so if OnTriggerEnter(Collider other){if(other.gameobjectWithTag == WALL){invoke gameOver} void gameOver{//put your gameover statements here, like disable some scripts and movement like disabling the instantiate script. If you want to go further, you can also increase the speed of the Walls for each 5 score you make.

so if(Score.score >=5){speed = 10;} if(Score.score>=10{speed = 10^100;}

Haha I still made a long post, so bored after I got denied. :3, And don't stop getting better at something you like to do.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to get ball and chain effect like in SkullChainz? 1 Answer

How do you make an wire/rope type object and attach to 2 separate objects 1 Answer

How to make an object like rope to bend towards camera / direction light position. 0 Answers

Why is my transform.rotatearound reset only working on positive Y? 0 Answers

Unity's built in function OnBecameInvisible glitching? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges