- Home /
How to pick a weapon of the ground
im making a kinda thriller action game and you start in a camp i want to be able to pick a weapon of the ground and be able to switch from a flash light to the gun please help
UA is not for "write script for me" / general "how do I...?" questions.
Head to the forums for that.
-1.
This question can be answered using logic, in fact in 5 steps.
First, create the item in your scene(your item object).
Second, use logic to deter$$anonymous$$e when you can pick up the item.(distance)
Third, use a second set of logic on how the player picks up the item(key press or collision?)
Fourth, Run a function contain what the item will do(e.g +35 health).
Fifth Destroy the item so you don't pick the one thing a gazillion times.
5 Steps... not only that this question has been asked ALOT. there are also lots of tutorials on FPS that cover this.
also please spell and grammar check"pick a weapon of the ground"?
-1
Answer by william9518 · Aug 12, 2013 at 02:06 PM
(facepalm) How i did it is added a preferredPosition to each gun, set it child to player, release old weapon from player, set new weapon to preferredPosition, BAM i picked it up
Your answer
Follow this Question
Related Questions
Object pick up script 1 Answer
Pick Up Coins 1 Answer
Picking up object occasionally causes player to fly through air 0 Answers
switching gun on screen with gun you pick up. 3 Answers
Mouse locked in center 1 Answer