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 remvan3d · Aug 17, 2010 at 12:49 PM · performancevariableschangerespawn

Trigger respawn point through player variables.

Ok... I relly need to make the player respawn on different points depending on the player performance, to be more presice when certain requests are fullfilled.

This is my respawn script

var reSpawnPoint1: Transform; var reSpawnPoint2: Transform; var reSpawnPoint3: Transform; var timer : float = 0.0;

function Update () { if(gameObject.transform.position.y < -3) { timer += Time.deltaTime; if(timer>5) { timer = 0; gameObject.transform.position = reSpawnPoint2.position;

         SplashScript.SPLASH = 15;
     }
 } 

}

The last line showing "SplashScript.SPLASH = 15;" is where i change the GUItexture back to normal after each respawn. I have 15 different GUI textures, but I want to respawn to reSpasnPoint 2 if the GUItexure reaches 7 before dying/respawning, and reSpawnPoint 3 if GUItexture reaches 15 before dying.

Currently I only respawn on reSpawnPoint2 every time except for when I load the level. I know this probably should be a simple task, but I am still very inexperienced with scripting.

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
1

Answer by Julian-Glenn · Aug 17, 2010 at 03:54 PM

The Lerpz tutorial has multiple respawn locations based upon progress through the level. I'd say take a look at it.

http://unity3d.com/support/resources/tutorials/3d-platform-game

Comment
Add comment · Show 2 · 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 remvan3d · Aug 18, 2010 at 09:14 AM 0
Share

I thought the spawnpoints in that tutorial was triggered when the player stepped on them, and not through how well the player performed.

avatar image Julian-Glenn · Aug 18, 2010 at 07:34 PM 0
Share

Yes bit you can easily modify the script to make it use a static variable such as score etc.

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

No one has followed this question yet.

Related Questions

How to use a script on multiple gameobjects, then change a variable for one of them, not the other. 3 Answers

How to link this 2 variables from 2 different scripts / gameobjects? 1 Answer

Respawn Script 1 Answer

Script access (without script name) 1 Answer

RTS Style Selection system (How to control one unit and not the others) 2 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