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 invisibleshadow4 · Jul 30, 2012 at 04:22 AM · missions

how to make an objective for a game (like slender)

im trying to make a game kinda like slender but i need to know how to make it when u click on a note or something it triggers something and if u collect all of them u trigger something else. thnx :-D

Comment
Add comment · Show 2
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 AlucardJay · Oct 10, 2012 at 11:58 PM 1
Share

So many Slender Questions! I am ready to make a tutorial just to stop them! And so it cannot be said that I wasn't constructive or helpful, everything you want is here :

http://answers.unity3d.com/questions/287355/slender-like-game.html

http://answers.unity3d.com/questions/296068/how-to-make-a-slender-man-follow-character-script.html

http://answers.unity3d.com/questions/319733/how-to-make-enemy-kill-you-if-starring-at-it.html

http://forum.unity3d.com/threads/134862-Slender-$$anonymous$$an-Design-Outline

http://www.parsecproductions.net/slendermangame.txt

http://forum.unity3d.com/threads/141488-Slender-Beta-0.9

http://forum.unity3d.com/threads/138399-Slender-$$anonymous$$an-WIP

It's up to you to find the useful information among that. Read.

Break it down to one simple thing. Work out how to find if one object can "see" another. Once you do that, you can make it do anything you like with that as a trigger. And you can do it both for the player and the 'man' .

http://answers.unity3d.com/questions/239927/Collecting-Papers-and-$$anonymous$$eeping-Track-of-how-many-collected--need-help.html

http://answers.unity3d.com/questions/323129/if-anyones-looking-for-a-flashlight-script-with-a.html

http://answers.unity3d.com/questions/316189/i-want-to-turn-my-flashlight-on-and-off-while-stil.html

http://www.youtube.com/watch?v=nmvCaqNGEFU&feature=related

http://answers.unity3d.com/questions/15438/trying-to-pick-up-and-see-paper-pop-up-gui-window.html

http://answers.unity3d.com/questions/321749/how-do-you-pick-up-pages-like-in-slender.html

http://cgcookie.com/unity/2011/12/05/introduction-to-character-controllers/

http://unity3d.com/support/resources/assets/terrain-assets

http://unity3d.com/support/resources/unity-extensions/terrain-toolkit

avatar image AlucardJay · Oct 23, 2012 at 11:44 PM 0
Share

Well to answer some questions like 'How to pick up papers' and how to have the enemy follow when not looking', I have written a 'Slender' guide, here is the link ($$anonymous$$ $$anonymous$$ay) : http://answers.unity3d.com/questions/321749/how-do-you-pick-up-pages-like-in-slender.html

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Wiki

Answer by chrisall76 · Jul 30, 2012 at 06:16 AM

You should learn the Unity engine a bit more and the basic scripting, because it's pretty simple. I won't exacly give you the code, but I'll give you the basic idea of what I know. You need to apply a collider to the object you want clicked, and then put a tag on it (most likely want "paper"). When the player collides with it and checks it's tag for "paper", make it delete the gameobject and add 1 to the total of collected items.

Comment
Add comment · Show 3 · 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 invisibleshadow4 · Jul 30, 2012 at 07:28 AM 0
Share

ok i will try and learn a bit more about the engine and a bit more of scripting. thnx for the advice :-D

avatar image AlucardJay · Jul 30, 2012 at 07:48 AM 0
Share

Check my answer on this question, it should help =]

http://answers.unity3d.com/questions/240136/sliding-door-animation-question.html

avatar image invisibleshadow4 · Jul 30, 2012 at 12:20 PM 0
Share

thnx it did help a little :)

avatar image
0

Answer by williampigmeu · Jul 30, 2012 at 04:44 AM

Simply, there is an algorithm (not an script):

when Player:Click Note do show Note NoteCount = +1 end when

if NoteCount = TotalNoteCount do GameIsComplete = true end if

Now, just ask for someone for any script, or try to make yours one.

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 invisibleshadow4 · Jul 30, 2012 at 04:54 AM 0
Share

im a beginner at this and i dont know where u r meant to actually input this code and link it to when someone clicks on the object.

avatar image williampigmeu · Jul 30, 2012 at 05:11 AM 2
Share

I said that's not a script, if you don't know scripting, ask someone to make it for you, it's sorta easy (not for me) for the pros.

avatar image invisibleshadow4 · Jul 30, 2012 at 05:16 AM 0
Share

but were do u input this to make it work in game?

avatar image roman8880 · Oct 23, 2012 at 08:13 PM 0
Share

He said, you cannot put that anywhere, you need to make from that an script, or let some one make a script for you, when you've done that, you will be able to put that "script" you / somebody made for you into the engine.

avatar image
0

Answer by williampigmeu · Aug 01, 2012 at 06:57 PM

This above example in form of an algorithm: You will need: A note texture placed in a Plane with isTrigger Collider, a invisible Sphere (search for Occlusion Culling) with an Collider, attached to the main player camera, and this algorithm (in form of script, obviously):

Array NoteCount = 5 Int NotesYouHave = 0

If Mouse.LeftClickPressed do: Sphere.Z = this + 5 If Sphere.Collider touch Paper.Collider do: PickupPaper(Paper.Id) end if Wait 1 Second Sphere.Z = this - 5 end if

PickupPaper function do: NotesYouHave = this + 1 if NotesYouHave = NoteCount do: GameFinished() end if end if

It's very easy to do.

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 williampigmeu · Aug 01, 2012 at 06:59 PM 0
Share

It works like that: When you click left mouse button, it moves the invisible Sphere to your front, like a punch, and checks if it collided with a Paper, if yes, it adds this paper to the count and check if you have all the Papers, and it moves the Sphere back to you.

avatar image Dududu · Oct 10, 2012 at 06:44 PM 0
Share

Ive been trying to make this work, this is the code ive come up with:

Array NoteCount = 5; int NotesYouHave = 0;

If ($$anonymous$$ouse.LeftClickPressed){ Sphere.Z = this + 5 If (Sphere.Collider Touch Paper.Collider) { PickupPaper }

}

Function PickupPaper { NotesYouHave = this + 1 if(NotesYouHave = NoteCount){ } }

but i get errors! could someone help?

avatar image williampigmeu · Oct 20, 2012 at 10:38 AM 0
Share

You can't define an array using "Array" in Unity, in "if (Sphere.Collider Touch Paper.Collider)", first: You can't use "Touch", search for Collision Events in the documentation, second: "Sphere" and "Paper" needs to be defined first.

avatar image williampigmeu · Oct 20, 2012 at 10:40 AM 0
Share

Whoops, there is no need for an array, you will use: "int NoteCount = 5", it was my mistake in the algorithm.

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

10 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

Related Questions

GUI message scripting need help to create a info box 0 Answers

How to make a pedometer in UNITY 1 Answer

Making a GTA-style game 1 Answer

How to make NPC Routine Movements? 1 Answer

One Action/Mission at a time 1 Answer


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