Aller au contenu

Photo

Might need some help with a cutscene including groups


  • Veuillez vous connecter pour répondre
17 réponses à ce sujet

#1
andysks

andysks
  • Members
  • 1 650 messages

Hi all. I tried my own ways but they didn't work, so I ask your help on this. Here's the situation.

 

NPC sits in the middle of the room, and creatures are locked in cells around it. She pushes a lever, the cells open, and the creatures run and kill her, ending the conversation and starting battle with the PC and the party. I tried putting the creatures in a group, then called GroupActionMoveToObject and GroupGoHostile. They failed from the start because... maybe my scripts, even though they compiled there's no telling if they were correct. Then I tried to move them all with seperate stock sctripts like ga_move and ga_faction_join. Of course, like that they would not attack the woman first but anyone I guess. Also, the weirdest bug happened during that last method. The creatures moved, the convo ended (without an attack), and they were hostile, but they were not moving or doing anything. I could click them to attack, but my PC wouldn't. He would just run towards them... :).

 

 



#2
rjshae

rjshae
  • Members
  • 4 491 messages

Sounds almost like conversation disabled some behavior that didn't get re-enabled, or the creatures are missing their event scripts.



#3
Tchos

Tchos
  • Members
  • 5 054 messages

If they do have their event scripts, have you tried ga_attack_target?



#4
andysks

andysks
  • Members
  • 1 650 messages

Hmm they are blueprints from Pains pack. And the events are there. ga_attack_target causes them to run, buff themselves etc, but they won't kill her. They just keep running in circles around her lol. Pretty funny actually. And they pay no attention to the PC, and I still cannot attack them. I tried starting them as hostile, even though I'd like them to be visible in the scene before the battle, just to see. But nothing different happened.



#5
andysks

andysks
  • Members
  • 1 650 messages

Could it be the path they have to take? it's pretty weird.

 

See, they are locked and then they have to run in the middle, where it's pretty narrow to be honest. Although I don't see why they wouldn't attack...

 

pathsanit_zps7b85d8ab.jpg



#6
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages

I wouldn't make them hostile.  Just add in some placeable i-points around your victim, and then have each creature attack its own i-point, it'll look like they're attacking the victim in the center of the i-points.  Then all you have to do is make your victim play some appropriate animations, and you have your cutscene.



#7
andysks

andysks
  • Members
  • 1 650 messages

Hi Lugaid and thanks for the reply. So you think the go hostile breaks their events? Because I do need to turn them hostile, at least after her death in order to fight the PC. But your system, as a cutscene should work. Maybe the go hostile after her death will work fine... who knows. Maybe, long shot, they are stuck in a loop because they don't kill her in time, then the convo breaks and they keep running around her ignoring my PC. Maybe if she was dead they would attack me as well.



#8
kevL

kevL
  • Members
  • 4 061 messages

i can't speak to details,
but I'd probably try setting it up using a custom faction for the prisoners. Make "Prisoners" faction hostile to the NPC, neutral to PC. Then use the onDeath script of the NPC to loop over left-alive prisoners and there switch them to the regular "Hostile" faction ...

 

no need for Groups like this, they'll probly start snarling in their cages from the git go, hehe



#9
Dann-J

Dann-J
  • Members
  • 3 161 messages

I'd follow Lugaid's advice and 'fake' the attack in a cinematic scene. I'd only be switching their factions to hostile on the very last conversation node, after killing the victim via script (EffectDeath). Changing factions inside of a conversation could have unpredictable results.



#10
andysks

andysks
  • Members
  • 1 650 messages
Hmm nothing seems to work. I start believing that it's the blueprints. I'll check with other creatures later and report my findings.

#11
andysks

andysks
  • Members
  • 1 650 messages

OK. The faction thing didn't work. I don't know why. Too far away? Who knows. The closest I came is by Lugaid's way. Here's what happens. Ah, I changed the creatures to stock ghouls as well... just in case. The doors open, the creatures run towards the center and the woman dies. Then, from her OnDeath they all turn hostile. Then weird stuff happen. They might attack, or not my PC. And I say it like that because they seem to want to, but they might as well just run around me. And on one test I let them do that and they eventually killed me after a couple of minutes. I couldn't attack them though. What messes this up? Is it the conversation? All it calls before that is some custom animations and ga_moves and stuff. Nothing really crazy. The conversation starts by a trigger which spawns an ipoint speaker.



#12
kamal_

kamal_
  • Members
  • 5 250 messages

Then weird stuff happen.


You just summed up the toolset experience in four words ;)
  • andysks et 4760 aiment ceci

#13
rjshae

rjshae
  • Members
  • 4 491 messages

Can you try simplifying the situation? Just one creature, the woman, and a single line conversation. If that still doesn't work, try it with a clean mod and an area with no clutter. The more extraneous stuff you cut out, the easier it is to isolate the problem.



#14
andysks

andysks
  • Members
  • 1 650 messages
I tried putting some hostile creatures on an empty area just to see if the fac file is wrong. Fight went normal. When I wake up I'll try to recreate the situation on an empty exterior and with different ways to initiate the dialogue. Maybe my ipoint speaker spawn causes troubles. Will see :).

#15
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages

My guess at the problem was that the creatures were getting stuck on the pathfinding - they're all trying to attack the same target, and then getting in eachother's way.  That fires the blocked script, does some AI shouts, and generally makes a mess of things. 

 

Making AI mobs flow well into combat is tricky, and I've certainly written enough spaghetti code trying to get it to work.  If you're willing to do something complicated here, maybe assign just one or two of your monsters to attack the PC, and the others to run around to the PC's flanks, using alternate doorways if possible.  Then later order them to attack.  In the meantime, though, their on-perceive scripts are going off, ordering them to attack the PC, so you have to turn them off...and so it gets complicated.


  • rjshae aime ceci

#16
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Pathfinding can be an issue, for sure. The other thing can be range of the enemy's hostility. 

 

I have an encounter in my prologue where you fight a very large, boss-type enemy, and while you're fighting him, up to 4 allies at a time will come at you from the walls of the crypt. Each time a "minion" dies, a new, non-hostile minion standing nearby turns hostile and engages the PC. I have two of the stone balconies in the room. 

 

I noticed during playtesting this encounter the very first time than the aggro range of the minions was too small for the room, and sometimes they'd stand at their spot, hostile, but not attacking. I had increase their hostility range (I had it set to short). Pathfinding around the balconies sometimes caused issues as well, but not often. 

 

Check your walkmesh after it is baked; it could be that simple. If there aren't enough paths for the creatures to walk, they get into a bottleneck, and then the individual AI for each creature starts doing some weird things while they try and wait for the path to clear, or find a new route. 

 

In any kind of encounter like this, I'd make sure you have a lot of space to work with. You just may have to increase the size of the room for it to work. 


  • rjshae aime ceci

#17
rjshae

rjshae
  • Members
  • 4 491 messages

My guess at the problem was that the creatures were getting stuck on the pathfinding - they're all trying to attack the same target, and then getting in eachother's way.  That fires the blocked script, does some AI shouts, and generally makes a mess of things. 

 

Making AI mobs flow well into combat is tricky, and I've certainly written enough spaghetti code trying to get it to work.  If you're willing to do something complicated here, maybe assign just one or two of your monsters to attack the PC, and the others to run around to the PC's flanks, using alternate doorways if possible.  Then later order them to attack.  In the meantime, though, their on-perceive scripts are going off, ordering them to attack the PC, so you have to turn them off...and so it gets complicated.

 

Yes, perhaps it might help to stage the group's switch to hostile with an iterative function call that has a built-in delay per creature.



#18
andysks

andysks
  • Members
  • 1 650 messages

Hi gents. I just recreated the cutscene on an empty exterior area and it worked as intended. The opposite functioned ghouls killed the woman and then turned hostile and came towards me. So it was the tight space. And now that I think of it, as it is now they have to go up the stairs from that RWS dungeon cell and through the door, take a turn to enter the arena, and between all that, because they are 6, they might also get in each others way. I guess if I simplify the area it will be possible for them to behave. Thanks so much for all the help.


  • rjshae aime ceci