|
I'm making a horror game on unity that I started not too long ago where enemies pop out at you. I realized people could just memorize where the monsters are, making it only scary the first time. I was wondering if there was a code or something to make it possible to randomly choose rooms that I have already made, similar to SCP-containment breach. I would like to have it so there is about 5 random rooms, and some rooms look the same, except have the monster in it (So you can't memorize what room they spawn in either). I started unity about a week ago, and i'm still horrible at coding, so could someone start me off with some advice? Thanks in advance :D
(comments are locked)
|
|
You can have a script that uses Would this script go in a spawner or something? Sorry for the nooby question
Jun 24 '12 at 11:11 PM
Cbjfan1
Whoa whoa whoa Use arrays! var room : Transform[]; roomNumber = Random.range(1,5); Instantiate(monster, room[roomNumber].position, room[roomNumber].rotation);
Jun 25 '12 at 01:29 AM
Loius
(comments are locked)
|

Also, is there a way to create a seed generator?
You could put more spawners in a room and make them randomly spawn at each of them, sure ppl can memorize them too but if you put more than 3 in each room they might forget where they spawn :)
Yeah, but the thing is some of these creatures teleport you, and others kill you + You don't have a gun (To make it more scary :D). So having them spawn almost every room would be a deathtrap