Aller au contenu

Photo

Stuck in Combat anyone know how to get around this?


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

#1
Lucrane

Lucrane
  • Members
  • 163 messages
Fixed almost all of my problems that I have run into with the toolset, but this last one could take me a while. Whenever I enter combat I remain in combat with the module i made from the toolset. Anyone know how to fix this?

Thanks in advance

Lucrane

#2
Proleric

Proleric
  • Members
  • 2 361 messages
Usually this indicates that an enemy has spawned at a location which isn't immediately visible or accessible.

If that's not the case, perhaps something you've scripted isn't quite right?

#3
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
Another possibility - you're not using the old version of the toolset?

#4
Lucrane

Lucrane
  • Members
  • 163 messages
I have the latest version of the toolset, and in the area I don't have a script calling for a spawning of creatures, they are already placed and behind a locked door. However, once they are all dead, the characters remain in combat.Not sure what is causing it.

#5
Lucrane

Lucrane
  • Members
  • 163 messages
UPDATE:

I've cleared my override folder, have the placed creature in its own team, etc. etc. yet still I cannot leave combat after killing the monster. Seen this problem on a few post which led me to try and clear the override under core and my documents, but that did nothing. Any help would be much appreciated.



Thanks

#6
Lucrane

Lucrane
  • Members
  • 163 messages
UPDATE:
Ok this fixed my characters being in combat, but not entirely sure how:

#include "events_h"
#include "plt_chalice"
#include "wrappers_h"


void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);

switch(nEventType)
{
case EVENT_TYPE_TEAM_DESTROYED:
{
if(GetEventInteger(ev,0) == 1)
{
WR_SetPlotFlag(PLT_CHALICE, SAVE_KEVIN, TRUE);
DelayEvent(1.0f, GetModule(), Event(EVENT_TYPE_DELAYED_GM_CHANGE));
}
break;
}
}
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}

This was the line I added:
DelayEvent(1.0f, GetModule(), Event(EVENT_TYPE_DELAYED_GM_CHANGE));

It appears without this my characters remain in combat. The rest of the script calls for an update to the quest the monsters are associated with. This script goes into my area script location under the general tab. So I can kinda see how this works now. You can set several monsters in an area all to the same team and simply have

DelayEvent(1.0f, GetModule(), Event(EVENT_TYPE_DELAYED_GM_CHANGE));

minus all the quest material for sccript, i.e. all monster belong to a team and it calls this script in the area with this event and the above delayevent command. Seems kinda strange to have to do this, but it fixed my combat problem.

Hope this helps someone else out there too.

Lucrane

#7
Proleric

Proleric
  • Members
  • 2 361 messages
I'm pleased you found a fix, but it probably isn't addressing the root cause.

I have used that event many times to set a plot flag, but I've never got stuck in combat mode.

#8
0x30A88

0x30A88
  • Members
  • 1 081 messages
Sure you didn't override anything and blocking the combat-end event from turning of your character's battle stance?

#9
Lucrane

Lucrane
  • Members
  • 163 messages
It is a stand alone module, but I haven't taken a core script or anything like that and modified it. Additionally, even without the plot flag I was still get stuck in combat, I just found that the plot flag was a good place to stick that script to fix the issue. The issue would occur even in a fresh fully blank module with one enemy. The player would remain in combat even after the event.