G
Gerald Tyler
Guest
Hey guys, quick question, hopefully an easy answer.
So what I'm wanting to do is set up multiple stationary Conduits in a room, and have the first one fire a Bolt at a random one, then the one which has it will fire at another random Conduit, and so on and so forth.
So I know how to create the bolt, set alarms, the basic stuff. But how do I basically do
if (ready = true)
{
create and fire instance of obj_Bolt towards Random obj_Conduit that has ready = false<--Part I need help with
ready = false;
}
I know there's a long way I can do it for pre-fabricated rooms, but I'm hoping to get some code that would work even with procedurally generated levels, where I wouldn't know ahead of time how many conduits there are.
So what I'm wanting to do is set up multiple stationary Conduits in a room, and have the first one fire a Bolt at a random one, then the one which has it will fire at another random Conduit, and so on and so forth.
So I know how to create the bolt, set alarms, the basic stuff. But how do I basically do
if (ready = true)
{
create and fire instance of obj_Bolt towards Random obj_Conduit that has ready = false<--Part I need help with
ready = false;
}
I know there's a long way I can do it for pre-fabricated rooms, but I'm hoping to get some code that would work even with procedurally generated levels, where I wouldn't know ahead of time how many conduits there are.
Last edited by a moderator: