|
|
member
|
OP
member
Joined: Jul 2014
|
Anyone know a function to automatically trigger combat?
I'm having trouble finding one in both the story editor and the script editor.
|
|
|
|
apprentice
|
apprentice
Joined: Aug 2014
|
So far I've just been using alignment. When I set an box to evil, they fight my hero's immediately. This works in 90% of situations, but if your concerned about them sneaking or being too far away or you have some situation where you don't want to change alignment, you'd have to use a different way
|
|
|
|
member
|
OP
member
Joined: Jul 2014
|
So far I've just been using alignment. When I set an box to evil, they fight my hero's immediately. This works in 90% of situations, but if your concerned about them sneaking or being too far away or you have some situation where you don't want to change alignment, you'd have to use a different way Thats exactly how i have it at the moment. It seems a bit clunky though. As i can sit for several seconds staring at the npc before it starts combat. And the way i have this setup is combat starts if a guard sees you out of your cell*After a short dialog* and unfortunately for me the "Charactersawcharacter" function has a greater range then the combat start. Its also very important that the dialog starts before any type of combat.
Last edited by Demonata08; 07/08/14 09:55 PM.
|
|
|
|
stranger
|
stranger
Joined: Aug 2014
|
I'm not entirely sure I understand what you are wanting to do. It looks to me like you want: 1. Player escape from cell 2. Guard sees player 3. Player approaches guard or guard approaches player without being hostile 4. Dialog is started 5. Combat triggered after dialog finishes
I have only just started working with the divinity engine so I don't know if this would work in practice, but if I understand what you're trying to do correctly, in theory I would try: 1. Create an empty database DB_OutOfCell 2. Set up a small trigger box (i forget the actual name of it, but the green box that triggers an event... event box?) just outside the cell door 3. Upon entering trigger, set DB_OutOfCell(1) 4. On dialog startup, if DB_OutOfCell is empty, engage in normal dialog with the guard, no combat 5. On diaolog startup, if DB_OutOfCell is NOT empty, use second dialog options, and on dialog exit set guard alignment to hostile
If you've already tried that and it didn't work or I am totally off base, I apologize. Also I am not in front of my home PC at the moment, so I can't actually look at the engine and try to do anything to see if it works, so it's all just pseudo-code-ish off of the top of my head.
Along with the above setup, you would also want to probably set up another trigger box inside the cell so that if you were to re-enter, it would clear the DB_OutOfCell flag again. And you'd want to enable that trigger when you entered the outside of cell trigger, and disable the outside of cell trigger after entering it once so that it didn't continually fire if you walked back and forth. And of course re-enable it if you went back inside the cell.
|
|
|
|
member
|
OP
member
Joined: Jul 2014
|
I'm not entirely sure I understand what you are wanting to do. It looks to me like you want: 1. Player escape from cell 2. Guard sees player 3. Player approaches guard or guard approaches player without being hostile 4. Dialog is started 5. Combat triggered after dialog finishes
I have only just started working with the divinity engine so I don't know if this would work in practice, but if I understand what you're trying to do correctly, in theory I would try: 1. Create an empty database DB_OutOfCell 2. Set up a small trigger box (i forget the actual name of it, but the green box that triggers an event... event box?) just outside the cell door 3. Upon entering trigger, set DB_OutOfCell(1) 4. On dialog startup, if DB_OutOfCell is empty, engage in normal dialog with the guard, no combat 5. On diaolog startup, if DB_OutOfCell is NOT empty, use second dialog options, and on dialog exit set guard alignment to hostile
If you've already tried that and it didn't work or I am totally off base, I apologize. Also I am not in front of my home PC at the moment, so I can't actually look at the engine and try to do anything to see if it works, so it's all just pseudo-code-ish off of the top of my head.
Along with the above setup, you would also want to probably set up another trigger box inside the cell so that if you were to re-enter, it would clear the DB_OutOfCell flag again. And you'd want to enable that trigger when you entered the outside of cell trigger, and disable the outside of cell trigger after entering it once so that it didn't continually fire if you walked back and forth. And of course re-enable it if you went back inside the cell. Thank you for replying. Actually i already have all that setup correctly. My problem is i was wondering if there was a function to automatically start combat. See when you change their flag to Evil Npc the guard will stand there for several seconds looking at you like hes confused what to do lol. Its not a huge deal. Its just purely aesthetic. I rectified this by making the guard attack the player. Therefore combat triggers immediately.
|
|
|
Moderated by Bvs, ForkTong, gbnf, Issh, Kurnster, Larian_QA, LarSeb, Lar_q, Lynn, Monodon, Raze, Stephen_Larian
|
|
|