|
Hi i created brick brekaer game and weapon it work great. But i dont want to player have always a weapon, i want to create a script so when player destroy every 20 brick, from top will be spawned pickup weapon object. I'm not asking you to make me all of that , just to help me to crate script that will Instantiate weapon object and stick it to player when player pickup weapon object! Tnx in advance!
(comments are locked)
|
|
okay, a solution that can be translated into working code. First, counting bricks. You need to have a variable to store how many bricks hit so far. Secondly, you need to check if you have reached that limit. Lets call it: Every hit will +1 to this variable. so you need a function like: After adding +1 then check if brickHits is above your wanted limit (20) tnx you gave me idea ;)
Aug 05 '11 at 12:57 PM
slajmstudio
ok i made it it works , but when player destroy 20 bricks, it spawn new collection on every next destroyed brick, it looks like rain of collection objects :D
Aug 05 '11 at 01:24 PM
slajmstudio
(comments are locked)
|
