Jump to content

Photo

What´s wrong with my Script?


  • Please log in to reply
No replies to this topic

#1
klusi93

klusi93

    Stranger

  • Members
  • Pip
  • 9 posts
Hi!
I am new at Scripting and need some help now. I did the tutorial from toolset wiki and wrote this Script:

#include "events_h"
#include "plt_hut_monster"
#include "wrappers_h"

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

switch(nEventType)
{
case EVENT_TYPE_TEAM_DESTROYED:
{

if (GetEventInteger(ev,0) == 5){
WR_SetPlotFlag(PLT_HUT_MONSTER, MONSTER_SLAIN, TRUE);

}
break;
}

}
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}

It seems to compile right, but it has no effect ingame. Any ideas? :wallbash:




Page loaded in: 1.078 seconds