random targets help

kingloser

2009-06-24 09:42:25

Ok the idea here is to have a player enter a room through a door or teleport. there will be a total of 10 bullseye targets in the room, however when they come in only 1 is visible. ill make them func_buttons and have them on damaged kill this entity and add a counter to a math counter. then when its shot i want another target to appear and the same happens until all 10 have appeared and been shot. then the final one is shot and gives the math_counter a total of 10 and that unlocks the door for them to leave. i know how to make them appear in a sequence but i was wondering if there was a way to make them appear randomly. that way its not the same sequence every time u enter the room. is this possible?

boshed

2009-06-24 14:52:47

Yes :)

Instead of hiding / showing them you could make them pop out of the floor : that way you also make some of them move side to side or up and down as it you wouldnt have to stop or start the movement, just let them move but out of view and pop them up into view when needed.

logic_case has the inputs PickRandom and PickRandomShuffle which will deal with the randomising.

kingloser

2009-06-24 17:47:28

do i just make the first target activate the second one then? and trigger it to move or what? thanks for all the help ur givin too.

kingloser

2009-06-30 02:04:55

ok like boshed suggested i moved the buttons to inside the walls. then i put their move directions so that they will come out of the wall and put the return button to -1 so it stays out. However they are not coming out of the wall. i have the first target in view and have it set with

outputs:
on damaged "buttonname" press
on damaged add 1 to math counter
on damaged "thisbutton" kill

when i shoot the first target i got it set that i know where the next one should be but it either doesnt move far enough or doesnt move at all. any help would be greatly appreciated. thanks.

boshed

2009-07-10 21:23:11

Late as usual. Did you get this sorted?