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 M1n3cr4ftrul35 · Aug 14, 2013 at 01:50 AM · changeshooterstealth

FPS-Parkour Mode?

I was wondering something- How would you be able to change from one movement type to another? For example- Parkour-Shooter Shooter-Sneak Sneak-Parkour ETC? Thanks in advance.

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
0
Best Answer

Answer by 2d4Games · Aug 15, 2013 at 02:00 AM

Inside a script file, you could make a setting that will change how the character movement is calculated.

 var gameType = 0;
 
 //0 for Parkour-Shooter
 //1 for Shooter-Sneak
 //2 for Sneak-Parkour
 
 switch (gameType){
 
     case 0: //put Parkour-Shooter movement code here
 
     case 1: //put Shooter-Sneak movement code here
 
     case 2: //but Sneak-Parkour movement code here
 
 }

Depending on how you want to change the movement type, you could either set the variable to change when the player presses a key, selects an option in a menu, or you can set them in scripts if you don't want the player to have a choice between the movement modes.

Comment
Add comment · Show 8 · 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
avatar image M1n3cr4ftrul35 · Aug 15, 2013 at 02:36 AM 0
Share

Thanks. I was really wondering about that. And the variable is the "//#" thing, correct? Sorry, I'm new to Unity. I'm really nooby at this XD

avatar image 2d4Games · Aug 15, 2013 at 11:15 AM 0
Share

The variable is gameType. The //# thing is just saying what you can set gameType to (when you put two slashes at the start of a line, the program ignores that line. It's called a "comment"). If you do gameType = 1, then the program will do the Shooter-Sneak movement code. If you do gameType = 2, then the game will do the Sneak-Parour movement code. Etc.

avatar image M1n3cr4ftrul35 · Aug 15, 2013 at 06:28 PM 0
Share

$$anonymous$$$$anonymous$$, thanks. I get what you mean now. Good day sir!

avatar image 2d4Games M1n3cr4ftrul35 · Aug 15, 2013 at 07:45 PM 0
Share

Would you $$anonymous$$d setting my answer as "accepted"? I would appreciate it :D

avatar image M1n3cr4ftrul35 M1n3cr4ftrul35 · Aug 16, 2013 at 12:06 AM 0
Share

It doesn't let me. Sorry =/

avatar image 2d4Games M1n3cr4ftrul35 · Aug 16, 2013 at 04:39 AM 0
Share

isn't there a little checkmark button underneath the thumbs down?

Show more comments

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

16 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Gun Shooting bug 2 Answers

Making all instances of an object glow, and not get affected by post-processing 2 Answers

Change GUI size 1 Answer

Animation play when player collides/hits an GameObject 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