Tiens on 15/4/2009 at 06:58
Beleg, try to play with AIPawn -> Sensory Model. For example, make a script that switches your guards from City Watch Sensory Model to something else on Normal Difficulty.
massimilianogoi on 5/8/2009 at 02:50
I have those hammerites in the prison, factioned as prisoner, that they bothers me when I try to free them unlocking the cell, telling that I won't do that:
Inline Image:
http://i29.tinypic.com/vpdd3c.jpgwhile other prisoners took directly from Pavelock didn't say anything.
How can I get rid of this problem?
Beleg Cúthalion on 5/8/2009 at 10:46
You want him to shut up? Try the GreetsPlayer properties and maybe something else in AIPawn. But that's a property issue and probably nothing about scripts (unless they got some which change these properties).
Beleg Cúthalion on 8/10/2009 at 10:27
Hi everyone, I have a problem with a sequence in my FM which is similar to the Assassins concept, i.e. follow guards without losing or alerting them (not by being seen, but e.g. drawing weapons etc.). There are four traps to query if the player lost sight of them and there is one single script which allows to end the mission if one of the conditions for the objective fail is true (the goal gets marked as failed beforehand). The problem is at the moment, the mission is sometimes marked as failed even after the following objective is set to "successful". Plus, no objective is marked as failed which is a bit surprising since there should be no other script with an "End mission [FALSE] successful" action in it (I've checked most of them yesterday). I think it has something to do with the alert traps which however shouldn't trigger when the goal isn't pending anymore (the guards do get alerted in the end). In any case, even then the mission fail thing should run via the only mission end script but in the menu afterwards I don't see any FAILED mark.
Long story short, to simplify the debugging process: Is there another way to check if the player has lost sight of the guards aside from using volumes and timers to check if the player has come to a certain point in a certain time after the guards have passed it? Is there a way to check a sightline or would the only way to do it use the objects-away-from-wach-other condition?
Judith on 8/10/2009 at 11:43
I had the same issue with my Cabal FM. I don't have the unr file but the first system I used was overly complicated, with something like 4 flags and a lot of scripts per each checkpoint. And it worked in some cases, and in some cases didn't.
Then I replaced it with gate system (there's a curfew in this mission). When the gate was closed after the AI came through it and player didn't do that as well, after a few seconds the mission objective was changed to Failed. I don't remember the scripts for that but I'm sure it can be achieved in many ways. And fortunately it worked every time :)
Beleg Cúthalion on 8/10/2009 at 12:04
I already have a gate but more of them would ruin the whole thing I fear and turn it into a sort of jump-and-run thing. I think I'll have a look at the distance condition.
Speaking of it, you guys did mention trigger script implementation during the whole GameSys thing; we're not somehow close to being able to add new conditions and actions, are we?
Beleg Cúthalion on 18/11/2009 at 13:06
Well, nevermind.
At the moment I'm having difficulties with my set of scripts to provide some AI reaction to the player trespassing in certain areas. The scripts look as follows:
(
http://s3.directupload.net/file/d/1982/amdcr4hi_jpg.htm)
Inline Image:
http://s3.directupload.net/images/091118/temp/amdcr4hi.jpgThere are two scripts at the end of the "private area" volumes to keep the flag PrivVolEntered either true or false (the whole system works without links by the way to keep thinks simple). Now the AI has the two scripts at the bottom. The "query" script fires when the AI sees the player while he is inside the pivate area volume. The TDS flag PlayerIsIntruding is simply used to create a delay for the player to escape once he's been warned by that AI. When the PlayerIsIntruding flag is set back to FALSE, the second script checks if the player is still inside the volume and if yes, changes disposition.
Now the problem is, the AI approach me and say their things about my intrusion (and also multiple times, so it fires not only once), but they don't become hostile afterwards. I strongly think that due to the order of actions in some script the flags (specifically CS_PlayerIsIntruding) are always re-written so that the Swap script never fires. But honestly I don't have a clue right now what I'd have to change in order to make it work. Or, if there would be a better way of scripting this. Any suggestions...?
GlasWolf on 19/11/2009 at 00:03
I always used to test scripts by flashing a message up on screen to make sure they fired appropriately. Might be worth testing this on the PrivatArea_Swap script to see whether it does actually fire and, if not, check each of the conditions to see which one is stopping it. That will at least confirm where the problem lies.
massimilianogoi on 19/11/2009 at 09:38
Have you tried to used the global variables? Setting a numerical value can help, for example:
(I don't remember the exact script syntax, but I've already seen something similar)
when linked volume are breached by the player:
bark the ammonition
add 1 to player_intrusion
-----------------------------------------------
when linked volume are breached by the player:
query if player_intrusion=3
action:
change AI_faction=*something hostile to Garrett*
Beleg Cúthalion on 19/11/2009 at 12:55
Thanks to both of you. The problem with GlobalInts is that they won't make it simpler; plus, the first suggested script would require links to either the AI or the volume (rather the latter I think because you cannot play barks at the end of a link AFAIK) or at least another script to split the volume check and bark action.
But... this GlobalInt thing gives me an idea. I could turn the VolumeEnter script into something like:
Fire this condition every 2 game seconds
Query if PrivateAreaCounter is less than 3
Query if linked volumes [MYSELF] contain...the player
Modify PrivateAreaCounter by 1
Reset script actions and conditions
The VolumeLeave script would then be:
Fire this condition every 1.5 game seconds
Query if PrivateAreaCounter is equal or less than 3 <-- don't know if that would be necessary
NOT: Query if the linked volumes contain... the player
Modify PrivateAreaCounter by -1
Reset script actions and conditions
This way the escalation system would be more gradual, don't know if you meant it this way, Massimiliano.
The warn script would then detect the increased GlobalInt, play the bark/reprimand and approach the player. If it becomes 3 or greater (maybe I should choose a higher value and decrease the condition fire interval), the AI will change disposition if it sees the player. Yeah, that sounds good. :) Does anyone know if you're able to query (I mean query in general, not in T3Ed scripting vocabulary) if the AI simply notices (i.e. also hears and not only sees) the player? I already had the case that I would be in a private area for a long time jumping around behind the AI's back and it would fire only after it turned around.
Again, thanks to both of you. I'll try it out when I'm home again.