A moving emitter that gets turned off in one room and turned on in another - by sNeaksieGarrett
sNeaksieGarrett on 1/6/2013 at 19:40
Quote:
And you have the script TrigRoomObject on BreathSpout too, right?
Yes.
Quote:
Trader'sBank is the concrete room brush for just the building? And Baron's_Way is the concrete room brush for the just the outside? And you have a Route link from BreathSpout to Baron's_Way? And since the the AI starts in Baron's_Way, you start the BreathSpout on, because the first message it should get will be TurnOff (It is when the object enters or leaves Baron's_Way that the TurnOn/Offs are sent), and you have a CD link from the the BreathSpout to the relay trap and then back to BreathSpout to turn it on/off. Right?
Trader'sBank is a room brush for just the building, afaik yes. Baron's_Way is the parent of Trader'sBank in the Room hierarchy. Yes, the breathspout is already on from where he currently stands. I have a CD link
To the BreathSpout but not
From the Breathspout to the relaytrap. I have one Route link from the BreathSpout to Baron's_Way.
I went ahead and did as you suggested and made a quick demo from scratch. I also have a CD link this time TO and FROM the emitter to the relay trap. I set up the breath as I wanted it, created two rooms, I have a patrolling AI and it
still does not work. I have him walk from the room in which he's already got the breath emitter enabled, and then walk into a room where it is supposed to turn it off. It doesn't.
I went ahead and attached a zip file with my demo if you want to check it out and see if I'm missing anything.
[ATTACH]1683[/ATTACH]
R Soul on 1/6/2013 at 20:30
The breath object also needs the TweqOnOff script, because it uses a Tweq > Emit property.
Also, you don't need the RelayTrap. You can just link the breath to itself.
LarryG on 1/6/2013 at 21:49
Quote Posted by sNeaksieGarrett
... Baron's_Way is the parent of Trader'sBank in the Room hierarchy.
...
I went ahead and attached a zip file with my demo if you want to check it out and see if I'm missing anything.
One problem I'm sure is that Baron's_Way is the parent of Trader'sBank.
Quote:
... Any room object that inherits from one of the linked rooms will trigger the script ....
I think this means that walking between Baron's_Way and Trader'sBank won't do anything. Make them independent in the hierarchy.
Also what R Soul said. I wanted the relay trap for diagnostics, so you could see what was happening more easily.
I'll take a look at your demo.
LarryG on 1/6/2013 at 22:30
I updated your demo to make it work. In addition (I hope you don't mind) I adjusted your AI's breathing a little so that he breathes a bit more in line with normal respiration for a walking man (about every 20 seconds or so) and made it a bit more transparent so that it doesn't look like he is smoking. That's just a suggestion. Do what you want. In any event, what I did was add two scripts to your breath emitter, TweqOnOff and ReloadTweqEmit. I tested starting him walking in the TurnOn room, and he puffs just fine until he crosses over to the TurnOff room and starts up again when he crosses back. So I think this is exactly what you wanted. You can now get rid of the relay trap as R Soul suggested.
sNeaksieGarrett on 2/6/2013 at 01:26
Thanks Larry. Yeah, I was worried that was the issue, which is why in my demo I created an entirely new room separate from Default Room... Or at least I tried to.
Also, I thought The TrigRoomObject was replacing the TweqOnOff anyway, but I just tested it by adding that and it made no difference. I'll go ahead and take a look at your update Larry, thanks again.
Edit:
Hmm, I'm seeing a problem on my end. Demo starts with him breathing, walks into the next room (which is where it should turn off) and it's still on. However, I had him chase me back into the room he started in and then it turned off. :confused:
Update: Oh, I see why. You made the room he walks into the TurnOn room and the room he starts in the TurnOff room. I actually wanted him to start in the TurnOn room and then only turn off if he walks inside the building.
Okay I fixed it, I just moved the guard into the other room and it works the way it should. Thanks for the help guys, really appreciate it. ;)
sNeaksieGarrett on 2/6/2013 at 04:25
I spoke way too soon. Tried to put into the level the same damn thing as the demo and it's not working. Ugh, this is driving me crazy. This time what I did was created a new room type called TurnOn Room in the object hierarchy and then replaced Baron's_Way with that. Guard enters building, still has the emitter on. Sigh. Do I need to recalculate the room database or something? I just don't get what the problem is. NVSpy is reporting ObjRoomTransit when he enters the building.
Also, my apologies for double-post, but that last post has been skewered enough, and plus you may not have seen my update.
LarryG on 2/6/2013 at 05:42
You need to describe exactly what your setup is, including your hierarchy of rooms, all the scripts on all the objects, and all the links between objects. Clearly you have made some simple error in your setup, because the demo does work and works just like you want it to. You just need to copy it exactly.
If you want to PM me with the real mission and the AI's ID, I will attempt to fix the problem and send it back to you.
sNeaksieGarrett on 2/6/2013 at 16:52
But that's just it - I've opened two copies of dromed and looked at the demo and the level to see what was different, and I can't see anything wrong.
Both have a total of 5 links* on the BreathSpout, both AIs start in the "TurnOnRoom," both rooms have a route link from the emitter. The only thing that I wonder that could be the problem is the room brush itself. In the level I hit create on an existing brush (baron's_way) and then chose the new room brush I made.
The new room brush is called TurnOnRoom and only has these properties: ~route from BreathSpout, an automap entry, a Weather entry, and finally a renderer entry about it not being rendered. Trader'sBank, the room in which the BreathSpout should turn off, has no links whatsoever.
*The links are:
ControlDevice From BreathSpout To RelayTrap
Route From BreathSpout To TurnOnRoom
~ControlDevice From BreathSpout To RelayTrap
~CulpableFor From BreathSpout To SheriffsBowman
~Contains From BreathSpout To SheriffsBowman
LarryG on 2/6/2013 at 16:54
Quote Posted by LarryG
One problem I'm sure is that Baron's_Way is the parent of Trader'sBank. I think this means that walking between Baron's_Way and Trader'sBank won't do anything. Make them independent in the hierarchy.
Baron's_Way and Trader'sBank cannot have a parent-child relationship.
If you still don't see it, send me the mission and the AI's ID and I'll take a shot at figuring it out for you.
sNeaksieGarrett on 2/6/2013 at 18:37
I know, those room brushes no longer have any links associated with them. I made a new room brush that replaces Baron's_Way. I went ahead and sent you a PM, thanks though.