Stimo Posted November 3, 2008 Share Posted November 3, 2008 Hello, I have a few questions about DestroyTriggerInstance ( TriggerInstanceName , ID ) My own tests shown that this functions doesn't accept local nor global variables as TriggerInstanceName ( but it does handles them as ID ). Do you agree with me or am I wrong ? How many TriggerInstances can run at the same time ? Can a TriggerInstance destroy itself ? I think it can, but I want to be sure... Link to comment Share on other sites More sharing options...
Arzok Posted November 3, 2008 Share Posted November 3, 2008 Can a TriggerInstance destroy itself ? I think it can, but I want to be sure... Why ? "halt" command in a trigger is the same as "destroytriggerinstance itself" in this case ? Link to comment Share on other sites More sharing options...
Stimo Posted November 3, 2008 Author Share Posted November 3, 2008 I use a personnal mission system that launches many trigger instances. Used one by one, units act as I want them to. When my system works at full power and many triggers run at the same time, some units start acting on their own. So I figure every running trigger weight something in the game engine and may slow it or work oddly. A HALT just stops a trigger, it doesn't erase it from the mission script. So it should be the same with a trigger INSTANCE, even after a HALT, it must be hidden somewhere in the memory, isn't it ? So I want to get completely rid of useless trigger instances. Link to comment Share on other sites More sharing options...
Arzok Posted November 5, 2008 Share Posted November 5, 2008 I am surprising that it taks a lot of memory ? It is very simple trigger. The most important thing is probably the "delay" command inside each trigger. If you use 10s of delay, it will not take a lot of CPU. Link to comment Share on other sites More sharing options...
Arzok Posted November 6, 2008 Share Posted November 6, 2008 Used one by one, units act as I want them to. When I order a unit to move from A to B (by move, attack or storm). If this unit sees an enemy, it will move toward this unit to fight. It is a problem when you want to coordinate an attack by several side. Have you solve this ? Link to comment Share on other sites More sharing options...
Stimo Posted November 6, 2008 Author Share Posted November 6, 2008 I already faced that problem. It may be linked to the one I'm talking about, but in my current mission, I have only set one army. Sometimes, an unit just forgets it's order and stops. Sometimes, it happens with members of a group. Some of them go on with the order I issued, some ignore it. I'm trying to solve this by automatically re-issuing the order as long as it's not performed, but arrays make things difficult. Link to comment Share on other sites More sharing options...
Arzok Posted November 6, 2008 Share Posted November 6, 2008 I try this, and it seems to work quite well. But it is still too complicated It is for a truck. Every 15s, I send again the command. And each time the truck reachs a rectangle of the array, I send the new move command for the next rectangle of the array. -------------------------- set @i1 = 0 set @unit = 404 set @array = "Array01" set @rect2 = "Rect_3" set @long = ArrayLen ( @array ) sub ( @long , 1 ) set @compteur = 0 setworkarmy ( army , 3 ) label boucle delay ( 1500 ) add ( @compteur , 1 ) if @compteur > 10 then set @compteur = 0 endif set @rect = ArrayGetElementName ( @array , @i1 ) set @a = GetNUnitsInArea ( unit , @unit , car , @rect ) if @a > 0 then add ( @i1 , 1 ) set @rect2 = ArrayGetElementName ( @array , @i1 ) runcommand ( unit , @unit , move , rect , @rect2 ) endif if ( @@depart_camion > 0 and @compteur = 5 ) then runcommand ( unit , @unit , move , rect , @rect ) endif set @a = GetNUnits ( group , "convoi01" , car ) if a = 0 then halt endif goto boucle Link to comment Share on other sites More sharing options...
Stimo Posted November 6, 2008 Author Share Posted November 6, 2008 Very clever. Can I try to adapt your script to my system ? Link to comment Share on other sites More sharing options...
Arzok Posted November 7, 2008 Share Posted November 7, 2008 Of course ! I tried twice to use array. First time, it was with tanks and with an array of points. No problem, except if a tank is destroyed on a point, it blocks the following tanks. So second time, I tried with rectangle and trucks (to simulate a convoy). And I discover that sometime, the trucks forget the order and switch to "defend" order. Link to comment Share on other sites More sharing options...
kahlaen Posted January 18, 2009 Share Posted January 18, 2009 Hi there, sorry to bother you, but i'm just wondering if this is the Stimo I know from Starwars Galaxies?? Link to comment Share on other sites More sharing options...
Recommended Posts