Hoky: еще один...
Вы походу о ПТС не знаете вообще нечего,если не знаете не стоит кидаться словами, это может в яве у вас двери открывались и закрывались по команде //open в птс все гораздо сложнее, еще пол года назад я слышал от вас, что за "java будущее", если вы переметнулись на птс, что ж, правильный выбор :)
Но двери по щелчку не открываются :)
iandi: Просто через //open получается открыть дверь?
Уважаемый, разделом ошиблись.
Пример кода AI
Код
myself.i_ai1 = doorclosetime; //i_ai1 was initially assigned with bufftime, but now we need to start match time, hence assigning this with time before coliseum door closes
myself::Castle_GateOpenClose2(DoorName1,0); //opens right coliseum gate
myself::Castle_GateOpenClose2(DoorName2,0); //opens left coliseum gate
myself::AddTimerEx(1002,100); //proceed with match phrase
}
}
else if( timer_id == 1002 ) //now coliseum gates are opened and Team A and Team B rushes to the middle to fight for their freedom to cast skill on coliseum matchmaker
{
if( myself.i_ai1 > 0 ) //this is the doorclosetime we assigned earlier
{
if( myself.i_ai1 == doorclosetime ) //first say this in the beginning of match phrase
{
myself::Shout("Let the fight begin!");
}
else if( myself.i_ai1 == 1 ) //we have to get our grammar right! :) so a separate condition for 1 second left
{
myself::Shout("Coliseum gates will be closing in " + myself::IntToStr(myself.i_ai1) + " second!");
}
else if( myself.i_ai1 < 11 ) //else if more than 1 second is left we use the word "seconds"
{
myself::Shout("Coliseum gates will be closing in " + myself::IntToStr(myself.i_ai1) + " seconds!");
}
myself.i_ai1 = ( myself.i_ai1 - 1 ); //decrease remaining time before coliseum gates closes
myself::AddTimerEx(1002,1000); //loop within this timer as long as doorclosetime isn't depleted
}
else //when doorclosetime has depleted we shall proceed to close the coliseum gates
{
myself.i_ai1 = matchtime; //we have to set a max time before coliseum matchmaker calls a tie, if not players will be fighting all day!
myself::Castle_GateOpenClose2(DoorName1,1); //closes right coliseum gates
myself::Castle_GateOpenClose2(DoorName2,1); //closes left coliseum gates
myself::AddTimerEx(1003,100); //continue the match phrase with max time before coliseum match ends, we here by call this matchtime
Для меня Ai это лес дремучий, тем не менее, я уверен что двери по щелчу сами не открываются.