I need some help writing a script. I'm trying to write a script that I can put on an area that will update different plots depending on teams that are killed. I've been trying to figure it out but am stuck. Can someone look this over and tell me where I'm going wrong? And yes, I don't really know what I'm doing... sadly...
#include "plot_h"
#include "events_h"
#include "wrappers_h"
#include "plt_tr"
#include "plt_kill_sg"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_TEAM_DESTROYED:
{
if(GetEventInteger(ev,0) == 13)
{
WR_SetPlotFlag(PLT_TR, TR_COMPLETED, TRUE);
bEventHandled = TRUE;
{
if(GetEventInteger(ev,0) == 4)
}
WR_SetPlotFlag(PLT_KILL_SG, DHUNT_COMPLETED, TRUE);
bEventHandled = TRUE;
{
if(GetEventInteger(ev,0) == 11)
}
WR_SetPlotFlag(PLT_KILL_SG, DHUNT_KILLED, TRUE);
{
bEventHandled = TRUE;
break;
}
}
if(!bEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
}
EVENT TYPE TEAM DESTROYED with more than one team - need help
Débuté par
Sonmeister
, mai 22 2010 10:07
#1
Posté 22 mai 2010 - 10:07
#2
Posté 22 mai 2010 - 11:46
If you've copy-pasted that, I think the problem is you've got your curly braces messed up. Make sure they're opening and closing your if statements properly.
#3
Posté 23 mai 2010 - 12:20
EDIT: I played with the brackets and looked at some other similar scripts until I got it to work. I tested it in game and all quests updated on the death of the team. All good - for a rookie.
Modifié par Sonmeister, 23 mai 2010 - 01:22 .





Retour en haut






