Hi,
iv got an trigger who should make a unit at one point and then go to annother point and repeat it.
But when i make this script to change the Point id the galaxie editor gives me an error.
//--------------------------------------------------------------------------------------------------// Trigger: Test spawn//--------------------------------------------------------------------------------------------------boolgt_Testspawn_Func(booltestConds,boolrunActions){intauto83B53C99_n;intauto83B53C99_i;// Variable Declarationsintlv_count;intlv_pointcount;// Variable Initializationlv_count=0;lv_pointcount=178;// Actionsif(!runActions){returntrue;}auto83B53C99_n=128;auto83B53C99_i=1;while(auto83B53C99_i<=auto83B53C99_n){UnitCreate(1,gv_units[EventPlayer()][lv_count],0,1,PointFromId([lv_pointcount]),270.0);lv_count+=1;lv_pointcount+=1;auto83B53C99_i=auto83B53C99_i+1;}returntrue;}//--------------------------------------------------------------------------------------------------voidgt_Testspawn_Init(){gt_Testspawn=TriggerCreate("gt_Testspawn_Func");TriggerAddEventChatMessage(gt_Testspawn,c_playerAny,"-Spawn",true);}
my only changes are:
UnitCreate(1, gv_units[EventPlayer()][lv_count], 0, 1, PointFromId([178]), 270.0);
->
UnitCreate(1, gv_units[EventPlayer()][lv_count], 0, 1, PointFromId([lv_pointcount]), 270.0);
Hi, iv got an trigger who should make a unit at one point and then go to annother point and repeat it. But when i make this script to change the Point id the galaxie editor gives me an error.
my only changes are: UnitCreate(1, gv_units[EventPlayer()][lv_count], 0, 1, PointFromId([178]), 270.0); -> UnitCreate(1, gv_units[EventPlayer()][lv_count], 0, 1, PointFromId([lv_pointcount]), 270.0);
cause i want to use an counter for this
fixed