massimilianogoi on 20/11/2009 at 14:31
Quote Posted by Beleg Cúthalion
This way the escalation system would be more gradual, don't know if you meant it this way, Massimiliano.
What I meant is simple: after an estimated number n of caughting the player, the AI turn into a hostile faction, that you can create a new one too, as I've done for the Mechs. It's not important if it's increasing or decreasing, the only important thing is to fix a limit where the AI changes faction.
Quote Posted by Beleg Cúthalion
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.
Try to use something like (I will use pseudocode, since it's more easy):
1.
when my state changes to yellow_alert
player_intrusion
+= 1
2.
when my state changes to yellow_alert (script referred to the AI) and when player_intrusion = 3
change the AI's faction.
However this system of scripts has a bug: the AI could turn into yellow alert even if alerted by opposite factions, not the player.
Beleg Cúthalion on 21/11/2009 at 13:35
This system doesn't any sort alert state or a new faction, there are already enough of them. It's just about warning the player if he is seen by an AI in a private area volume and making the AI change disposition (not faction) after a certain time if the player doesn't leave. Beforehand the AI isn't "alerted" in a T3Ed way.
I think it should work as it is now, but this script fires only once when I'm in a private volume:
CONDITIONS:
Fire this condition every [1] seconds of GAME time.
Query if CUT_Herm_PrivateAreaCounter is [Less Than] 5.
Query if linked volume(s) [MYSELF] contains the linked object(s) at the end of [PLAYER]
ACTIONS:
Flash a non-blocking message... only for testing purposes, haven't found something simpler yet, but in any case I can check the GlobalInts via the console
Modify [CUT_Herm_PrivateAreaCounter] by [1]
Reset script conditions and actions.
It might have something to do with the fire condition which fires in both the enter and leave script everytime I either enter or leave the volume, but it doesn't fire multiple times.
~~~~~~~~~~~~~~~~~~~~~~~~
Different problem: I want an old door do open after a couple of dagger thrusts or a fire arrow etc., but the script detecting the five edge stimuli didn't fire (probably because you cannot deliver five edge stimuli at once) and giving it health properties and death reaction like a small crate (of course together with a script to make it open upon death) didn't work either. Any ideas?
Linda on 12/7/2015 at 11:01
I'm asking for help, since I have a problem which I can't get rid off. I want the script makes a sound (already tested and working) any time the global variable doorstate is between 4 and 11. Tried this four routes with no succes:
1. Logic AND operator -> ? Query if doorstate is Greater Than 4
-----------------------------? Query if doorstate is Less Than 11
2. ? Query if doorstate is Greater Than 4
---? Query if doorstate is Less Than 11
3. Logic AND operator -> ? When doorstate becomes Greater Than 4
----------------------------? When doorstate becomes Less Than 11
4. ? When doorstate becomes Greater Than 4
---? When doorstate becomes Less Than 11
The actions for any of each are:
Play sound schema doorbump2 at my location
Reset script conditions and actions
Beleg Cúthalion on 12/7/2015 at 20:15
You need at least one condition that triggers at a certain point ("when"), while others check if something else is already in place ("query"). Two "when"s do not work because these two conditions would have to happen at the same time which is hardly possible. Two queries do not work because there is no point to trigger the action. What I suggest is:
Logic AND operator:
--> Trigger this action every (whatever) seconds (depends on what kind of sound the doors are supposed to make)
--> Query if doorstate is Greater Than 4
--> Query if doorstate is Less Than 11
This means that the script will fire every (whatever) seconds if the GlobalInt is between 5 and 10. If you want 4 to 11, you need to select "Greater Than Equal To" or "Less Than Equal To". Your actions should be fine. Good luck!
Linda on 13/7/2015 at 01:08
That's what I just have tried. There's another script with condition (door): If I take more than 0.01 health damage of stimulus type Blunt
and action: Set doorstate 1 (that is +1) (this script is working, I've checked and it increases by 1 unit the global variable doorstate).
Linking the second script that scans for doorstate changing by seconds is wrong, because Garrrett can blackjack the door more than one time per second. Plus, I can't finy anywhere this condition: "Trigger this action every (whatever) seconds (depends on what kind of sound the doors are supposed to make)"
Quote Posted by Beleg Cúthalion
Two "when"s do not work because these two conditions would have to happen at the same time which is hardly possible.QUOTE]
That's just what I wanted: the two conditions happens when the value is between 5 and 10 (greater than 4 and less than 11).
Update:
just found the solution:
Logic AND operator -> ? Query if doorstate is Greater Than 4
--------------------------? When doorstate becomes Less Than 11
This is a total nonsense though... what a messy editor...
Beleg Cúthalion on 21/7/2015 at 12:11
Glad to find that this is working. By the way, with a "when" and a "query" condition, you don't need the logical operator. I had tried to make bashable doors but I found the same thing as you did: you cannot detect damage stimuli (or any stimuli, I bet) on a door unfortunately. But IMHO the scripting system isn't very messy in T3Ed.
Linda on 29/7/2015 at 22:29
Quote Posted by Beleg Cúthalion
I had tried to make bashable doors but I found the same thing as you did: you cannot detect damage stimuli (or any stimuli, I bet) on a door unfortunately.
Of course you can: just link the door archetype to a customized vulnerability you created. MetaProperty->VulnerabilityObject->create a new one with the vulnerability you want (edge for the dagger and blunt for the blackjack). The link with the archetype must be the type Vulnerability. Everything is about Health: create a script "when my health state changes to [death] Propagate [DoorState_Opened(or Opening)] to linked objects of [MYSELF].
Beleg Cúthalion on 31/7/2015 at 20:53
Oh, thanks! That is good to know. Maybe next time I'll have a bashable door. :)