Aller au contenu

Photo

EVENT TYPE TEAM DESTROYED with more than one team - need help


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

#1
Sonmeister

Sonmeister
  • Members
  • 167 messages
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);
}
    }

#2
Mengtzu

Mengtzu
  • Members
  • 258 messages
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
Sonmeister

Sonmeister
  • Members
  • 167 messages
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 .