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
Stuck in Combat anyone know how to get around this?
Débuté par
Lucrane
, févr. 26 2011 09:17
#1
Posté 26 février 2011 - 09:17
#2
Posté 26 février 2011 - 10:46
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?
If that's not the case, perhaps something you've scripted isn't quite right?
#3
Posté 26 février 2011 - 03:47
Another possibility - you're not using the old version of the toolset?
#4
Posté 26 février 2011 - 04:42
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
Posté 26 février 2011 - 07:19
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
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
Posté 27 février 2011 - 05:48
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
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
Posté 27 février 2011 - 08:45
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.
I have used that event many times to set a plot flag, but I've never got stuck in combat mode.
#8
Posté 27 février 2011 - 02:46
Sure you didn't override anything and blocking the combat-end event from turning of your character's battle stance?
#9
Posté 27 février 2011 - 06:54
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.





Retour en haut






