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 name111 · Sep 22, 2010 at 02:04 AM · systemexperience

Experience system help (easy)

hey guys, im still stuck on my dumb old XP stuff for my FPS, and none of my questions have been answered so i come to you with 1 more question, one i think should be easily answered. since i could not manage new script i read over and over again the ones i found here. the closest i came was w/ this

http://answers.unity3d.com/questions/18589/how-can-i-make-it-give-u-a-certain-xp-everytime-u-kill-someone any way, it still didnt work. so all i ask for is for someone to explain to me how to go about putting these scripts into action, because clearly im dong something WRONG

waiting patiently,

PathKiller29

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

Answer by jlocke · Sep 22, 2010 at 06:48 AM

One way to accomplish what it sounds like you're trying to accomplish is to use 2 scripts. One script would apply to your character/player. That one would be like the one you linked to from the other question. It would handle how much xp the character has, how much is needed to level and what level the player currently is.

The second script would attach to each enemy. That script would hold a value for how much xp killing this particular enemy is worth (we'll say xpValue) (you'll probably want that to be an exposed variable for easy editing / balancing). When the enemy dies (where you determine the hp <= 0), you'll want to add its xpValue to the variable from the first of these two scripts (the one that tells how much xp the character has).

Comment
Add comment · Show 4 · 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 Bampf · Sep 22, 2010 at 10:55 AM 0
Share

Here are instructions for exactly this method: http://answers.unity3d.com/questions/10505/variables-acesssed-by-other-scripts-and-change-int-values First set it up as written, even if that's not quite what you need. Then you can make small changes, testing each time, until it does what you want.

avatar image name111 · Sep 23, 2010 at 08:04 PM 0
Share

uhh i tried adding them in these places and i feel like im an inch away but im getting a script error saying "unknown identifier 'xp'" from my experience system script co$$anonymous$$g from the line "xp += addedXP"

so what do i do?

avatar image name111 · Sep 23, 2010 at 08:44 PM 0
Share

ohh never $$anonymous$$d i got it. thanks a LOT!! one more thing though, how can i make it show my XP, display points earned on kill, and make a GUI animation i guess.

avatar image name111 · Sep 23, 2010 at 09:56 PM 0
Share

well never$$anonymous$$d that previous comment i was being slow. all i ask for now is since you know what im heading at here, if you could just look at my other question here http://answers.unity3d.com/questions/21068/gui-text-grow-animation

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

1 Person is following this question.

avatar image

Related Questions

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

Experience System 1 Answer

How to import the object from server to unity 2 Answers

Sailing Ship Control Script Help 1 Answer

Login System using SQL with Registration on a Website 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