GlasWolf on 18/9/2008 at 21:26
Quote Posted by Beleg Cúthalion
I'm just trying one detect-difficulty-and-turn-into-global-flag script so that I can add difficulty-based mission objectives later hopefully, but I have an issue I already had yesterday, namely that I cannot type in custom global flag or variable names. The window pops up, I can write what I want but when I click OK nothing happens. What am I doing wrong?
Have you created the flag first? You need to do so before you can use it (after which it should appear in the list). I can't remember exactly where it is, but there is a "create flag" option in the menus somewhere.
Judith on 19/9/2008 at 21:16
Nice! :)
I'm currently working on a wall lock, opening the nearby door (DM, EoB, etc. "dungeon-style"). The problem is that after frobbing the lock the game crashes (FrobBias set to 8, highlight distance to 64)...
[Edit] Ok, I had to set LockPlate to False :)
[Edit2] I had to make a new actor class under doors, changed the mesh to lock and blocked it's physical properties. Otherwise it wouldn't work. Strange, but at least I got what I wanted :)
Beleg Cúthalion on 21/9/2008 at 20:48
Does anyone know what to look out for when dealing with GlobalInts? I'm working on a little (probably unnecessary) experiment now, born from Renzatic's shutters and a lucid dream, and I believe the final version doesn't work because The random GlobalInt actions don't work. The integer is defined as from 1 to 4 and I use: "Set [GlobalInt xyz] to a random number from stream [Rnd] between [1] and [4]". I set the stream (?) to Rnd, just to have something in it, but I don't know what it exactly does. The integer is queried by "When [GlobalInt xyz] becomes [Equal To] [1 (or 2,3,4)]". The other actions should work since they did so in a test earlier this day, that's why I think I've done something wrong with the GlobalInts.
Edit: Meanwhile I fixed the following issue... for now. I had to use the ACTION "When propagated message [String] detected on linked object(s) [LinkFlavor]" instead of "Received trigger message [String]" to query when both guards shall start their different patrols again. Plus, I've just added two scripts to make the following guard wander the place in case his patrol leader was taken out and could not send his let's-start-again message.
Edit2: GlobalInt issue solved, I just had to actions in reverse order which didn't work with the when/query conditions of the executing scripts.
Beleg Cúthalion on 26/9/2008 at 13:15
New problem: I want to have a squad of City watchmen to run through the town. After lots of experiments and tries (because of the ever same issue, see below) they all now have scripts for certain stages of this run, each queried by a GlobalInt that gets increased after they've completed one étape (and thus sends them to the next one). I had much simpler things before (breached volume --> make approach to next marker etc.) but I re-worked it several times because they always refuse to accept another running command after they've reached their first destination. Whatever I do, even if I smuggle it into scripts which already work, they just won't move - as if using two Make-AI(s)-approach ACTIONs consecutively did not work in general.
They have to pass through a main gate and the NavMesh works, so they could get through and reach the marker behind it. I could do a work-around and have them enter a patrol leading through the gates but that wouldn't clear up the issue itself. Has anyone encountered similar things? Do they need a sort of ramp down order before they can start again? All the markers were above the ground and the ACTION was not different from their first one to get near the gate.
Edit1: The enter-patrol work-around didn't work. :wot: The rest of the script did, though, and the tour even continues if I manage to lure the squad through the gates and trigger the GlobalInt +1 for the next stage. I set a ramp-down action just before the patrol command but it had no effect either. Unfortunately there seems no action like "stop everything what ever it's doing", just to make sure they have no overlaying run orders.
Edit2: All stages work now, although it seems like there are some moody volumes which trigger sometimes... or not. :weird:
Beleg Cúthalion on 4/11/2008 at 22:10
Wow, third post, but at least most of my stuff works for now. Regarding the last Edit2, I want to repeat what I've read somewhere in the fora, namely that volumes might loose their function if they are resized or moved from their place of creation.
And now for something new: I want to have a guy whom the player must protect from being killed. To do this with a bunch of thugs is not a problem, but for realism's sake I want them to attack the guy even if he has been knocked out by the player before. So just in case there is a simpler solution than making them approach and start fence barks (is this action used for the training Pagans? haven't T3Ed open right now) or the cool kicking finishing move while decreasing the guy's health points, I'd try it out. Otherwise I'll just make them approach the guy and thus make it harder for the player to save him, but it wouldn't seem real I guess.
nateurnal on 15/12/2008 at 03:03
OK. I'm trying to set up a script system that brings an AI back to life:sly:
I have:
When I am frobbed by player
Send trigger message [Alive] (on a switch)
TriggerScriptLinks connect the switch to the emitter and the AI.
Received trigger message [Alive]
Set [EmitterSpawnState] to [EDS NormalSpawning] on linked objects of [Myself] (on the Electric Beam)
The Emitter has EmitterSpawnState = EDS_NoParticles
Received trigger message [Alive]
Delay [4.00] GAME seconds
Set [HealthState] to [HealthState_Alive] on linked objects of [Myself] (on the AI)
The AI is HealthState_Dead
But it doesn't work naturally:tsktsk: Is there something blatantly wrong with my scripts or...what? Any ideas?
Tiens on 15/12/2008 at 12:47
Quote Posted by nateurnal
...Received trigger message [Alive]
Delay [4.00] GAME seconds
Set [HealthState] to [HealthState_Alive] on linked objects of [Myself] (on the AI)
The AI is HealthState_Dead...
I don't remember what's the matter with the other scripts but in case of this one... Try to add one more action "Set Current Health to 5.00 on MYSELF" or something like that. As far as I understand your NPC becomes alive for a moment but his current health is zero so the game kills him once again.
nateurnal on 16/12/2008 at 21:42
That doesn't work either for some reason.
Also, when I add the MainHealth property, current health is already set to 8, even when then Ai is healthstate_dead.
Beleg Cúthalion on 14/4/2009 at 10:52
Just in case natuernal still has this problem... what about having two AIs and toggling the outofworld property?
I'm having my City watch guards being neutral on EASY/NORMAL, however, they get angry when they see the player (hack, hehe... and) picking a lock or entering a forbidden area OR if they see the player with weapon drawn. The thing is, after walking past a guard and drawing the blackjack (which might occur often when people play it), the City watch guard still kind of sees it, turns around and tries to kill Garrett. If he hasn't seen him before, everything is alright.
So, any idea how to make this condition work properly? The action takes place in a sort of critical district and people walking with a bow in their hand shouldn't be tolerated just like that. :p