Blau on 16/6/2006 at 04:23
I have a plan for a map im making, the idea is that there is some loot behind barred doors/whatever and the locks are powered by a generator, there are also electrical lights powered by this generator that would all switch off (mabye some flicker a bit) when you disable the generator. When deactivated, every AI in the area becomes permanently alert (if possible I would like to exclude any who are sleeping, though it could make more sense if they wake up due to the sudden commotion). When the
generator is disabled, I also want a nearby guard/s to come and see whats going on, and mabye have a conversation with actions. Also, disabling the generator causes the player to be 'locked in' to the mission, so then they have to go back after collecting the special item or whatever and turn the generator back on. But I want the guards to stay alert even after it has turned back on. Also, when the item is stolen I was thinking of having an alarm go off? I dont know if theres sounds for that or anything, but in conjunction with the alarm I want nearby guards (the closest three for example) to come and investigate.
I would like the generator to have a moving part or parts that stop when it is disabled.
So basically the way I see it is this -
1.Generator is turned off (switch on the wall, nothing too fancy) lights fade out and moving parts stop, barred doors unlock and security doors close to stop the player from leaving. All AI's enter an alert state permanently but still follow their patrol points
2.A guard or guards enter the room (possibly ones that already existed or spawned for that purpose) and have a conversation with actions
3.Player goes and gets the item, and an alarm goes off when it is taken, guards come to investigate
4.Player goes back and turns the generator back on, lights come back on and doors open/close and lock/unlock. All non combat AI's go back to an un-alert state, Combat AI's stay alert.
Basically, I want to know if anyone has any tips or advice on how they would do this, and if anyone thinks some things are not possible to do (like the investigating guards and such) and if anyone would like to do some custom conversations for me :)
I forsee that theres alot of things I will have to learn to do :sweat:
Blau on 16/6/2006 at 11:37
Thankyou, thats was a very helpful link :)
Some input would still be appreciated fro manyone else though!
GlasWolf on 16/6/2006 at 17:16
Some very general pointers that you've probably already figured out:
Quote Posted by Blau
1.Generator is turned off (switch on the wall, nothing too fancy) lights fade out and moving parts stop, barred doors unlock and security doors close to stop the player from leaving. All AI's enter an alert state permanently but still follow their patrol points.
You'd have a script on the lever that sends out a trigger message such as "generator_off". The doors, lights and AI should also all have scripts on them that listen for that trigger message, and when its received the respective actions are run through the scripts.
Quote Posted by Blau
2.A guard or guards enter the room (possibly ones that already existed or spawned for that purpose) and have a conversation with actions.
You can trigger this easily enough, but conversations are a pig due to the need to patch any custom sound files (i.e. speech) into the SchemaMetafiles. Rantako did this with "All the World's a Stage".
Quote Posted by Blau
3.Player goes and gets the item, and an alarm goes off when it is taken, guards come to investigate.
Same as 1 - script on the item that when frobbed sends a trigger message. More scripts on the guards to react when it's received, plus (I'd guess) some invisible markers to trigger alarm sounds on. You could even use flashing red lights or something.
Quote Posted by Blau
4.Player goes back and turns the generator back on, lights come back on and doors open/close and lock/unlock. All non combat AI's go back to an un-alert state, Combat AI's stay alert.
Once again, trigger message sent for "generator_on" and receiving scripts on the affected actors to act accordingly.
nomad of the pacific on 16/6/2006 at 23:09
I don't think you can make guards continue to follow their patrol routes when they're alerted. They enter search mode at that stage and ignore patrol routes. :erg:
GlasWolf on 16/6/2006 at 23:44
Quote Posted by nomad of the pacific
I don't think you can make guards continue to follow their patrol routes when they're alerted. They enter search mode at that stage and ignore patrol routes. :erg:
You know that went through my mind as well, but I suddenly had a recollection of guards walking along routes with their swords drawn - was it towards the end of The Bridge?
Crispy on 17/6/2006 at 03:42
There's an AI property you can set which makes them always have their weapons drawn. I think Keeper Assassins use it. Dunno if it actually increases their alertness though (if it does, I didn't notice).
Blau on 17/6/2006 at 05:27
Thanks, thats actually what I wanted when I said 'alert' but I didnt think to say that I just wanted them to have their weapons out. I'll check out their properties and let you know what happens. If it does increase their alertness I shouldnt be able to blackjack them right?
EDIT: Ok I added some keeper assassins from the CombatAI list, and they wont show up in game. I did however notice that there were 'bUseTensePatrol' and 'bAlwaysWeaponSelected' in the keeper assains class.
I tried the AlwaysWeaponSelected option on a normal City Guard, and he kept his weapon out for about 5 or more seconds then put it away. Setting the option bUseTensePatrol made him keep the weapon out, but it was still possible to blackjack the gaurd. Excellent :)
EDIT2: Alright I've hit a snag in my door script. Currently the script is activated by a wall switch that sends a message telling all the doors to open, but I've also put the script to close all the doors on the same switch. I think whats happening is the switch is sending the message to open the doors and the message to close them at the same time, so the doors do nothing. Anyone know what to do now?
Crispy on 18/6/2006 at 11:41
I'm pretty sure that once a guard has been alerted a few times, he becomes "edgier" and gets re-alerted more easily. Either that or I'm just imagining things, but I think that's how it works. :) That's what I meant by alertness.
To make keeper assassins show up on the map, you need to delete the script that makes them not show up until game day 6, and re-tick all the unticked boxes on their "load filter" property (I forget the exact name).
As for the doors, I suggest you try sending the *same* message for opening and closing. Then put two scripts on the doors, that both respond to the same message (using a "When" condition). But also add a "Query" condition, so that one only fires when the door is open (this one should close the door) and the other only fires when the door is closed (this one should open the door).
Blau on 18/6/2006 at 14:06
Yeah I ended up doing just that, I also have the lights working (Ive got some lights turning on and some turning off as well as doors opening, so the script definatley works!) I ended up just messing around for a long time to work out the door queries. But thanks for putting it in writing so I wont forget later :)