Just as a note, my script is basically a carbon copy of the one used in the scripting tutorial on the wiki with the constants and such altered to fit my plot.
Help with plot scripting
Débuté par
bboyser8
, nov. 09 2009 03:40
#1
Posté 09 novembre 2009 - 03:40
So, I've been making a little campaign to test the toolset, and I've been running into some issues with scripting a basic "kill a bunch of enemies" plot. I've got two guys to kill, and I've been testing for the EVENT_TYPE_TEAM_DESTROYED event, and checking if its the right team number (I've gone over this, I'm pretty sure its correct), then calling WR_SetPlotFlag, with my plot and the flag, but nothing happens.I've double and triple checked that the team numbers are correct, that I'm setting the right plot and flag to true, but nothing happens. Any help?

Just as a note, my script is basically a carbon copy of the one used in the scripting tutorial on the wiki with the constants and such altered to fit my plot.
Just as a note, my script is basically a carbon copy of the one used in the scripting tutorial on the wiki with the constants and such altered to fit my plot.
#2
Posté 09 novembre 2009 - 03:43
There are plenty of information about plot scripting on the wiki. I would recomend this tutorial for starters...
http://social.biowar...ipting_tutorial
I am sorry, I did not see your last line of text before posting the respons. I do not know if this will help, but I came across something on the Dragon Age Central that might help...
http://old.dragonage...ngle/1221769380
http://social.biowar...ipting_tutorial
I am sorry, I did not see your last line of text before posting the respons. I do not know if this will help, but I came across something on the Dragon Age Central that might help...
http://old.dragonage...ngle/1221769380
Modifié par Krusing, 09 novembre 2009 - 03:47 .
#3
Posté 09 novembre 2009 - 03:48
I am sorry, I did not see your last line of text before posting my response.
I do not know if this will help, but I did come across something at the Dragon Age Central that might help...
http://old.dragonage...ngle/1221769380
I do not know if this will help, but I did come across something at the Dragon Age Central that might help...
http://old.dragonage...ngle/1221769380
Modifié par Krusing, 09 novembre 2009 - 03:49 .
#4
Posté 09 novembre 2009 - 03:48
I'm using that tutorial, and basically that script, but it doesn't work. I've checked, the team numbers for the monsters are the same in the area and the script, and the area is using my script as the area script, but for some reason the plot flag isn't being set or something. That's why I'm so confused, since its basically what the wiki says to do, but its not working for me for some reason.
#5
Posté 09 novembre 2009 - 03:51
Do you use the #include line at the very top of the script?
Can you post the script you've been workin' on here? It would be much easier to find out what's wrong if I could see the script.
Can you post the script you've been workin' on here? It would be much easier to find out what's wrong if I could see the script.
#6
Posté 09 novembre 2009 - 04:48
Here's the script:
#include "events_h"
#include "plt_dungeon_quest"
#include "wrappers_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_TEAM_DESTROYED
{
if(GetEventInteger(ev, 0) == 20)
{
WR_SetPlotFlag(PLT_DUNGEON_QUEST, QUEST_COMPLETED, TRUE);
}
break;
}
}
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
I can't see anything wrong with it :/
EDIT: Oh snap, it was a syntax error that I had missed, needed a colon after the case. Hooray for the non-obvious syntax error screen at the bottom!
#include "events_h"
#include "plt_dungeon_quest"
#include "wrappers_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_TEAM_DESTROYED
{
if(GetEventInteger(ev, 0) == 20)
{
WR_SetPlotFlag(PLT_DUNGEON_QUEST, QUEST_COMPLETED, TRUE);
}
break;
}
}
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
I can't see anything wrong with it :/
EDIT: Oh snap, it was a syntax error that I had missed, needed a colon after the case. Hooray for the non-obvious syntax error screen at the bottom!
Modifié par bboyser8, 09 novembre 2009 - 04:58 .





Retour en haut






