View Single Post
  #44  
Old 09-26-2011, 07:09 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

red_bomb1 - is just a name I gave to my trigger in FMB. It is not related to bombers, it can be any name.

Quote:
Ground unit red = 3 1
Ground unit blue = 3 2
Is that ok?
Sorry, I do not remember, maybe it is army pass through. Try setting a desired trigger in FMB and then open mis file in notepad to see how to name the trigger correctly.

I do not know C# syntax and grammar good enough to write scripts myself. I can only read and copy-paste them and advise where you can find appropriate examples.

If you paste the below code into a script and make an "army passthrough" trigger in FMB called "incoming" (no quotes) at desired location, the script would print a message for you.

Code:
    public override void OnTrigger(int missionNumber, string shortName, bool active) 
    {
       base.OnTrigger(missionNumber, shortName, active); 

          if ("incoming".Equals(shortName) && active) 
          { 
               
                // include other operations here, e.g. loading submissions with ambulance, etc.
                GamePlay.gpHUDLogCenter("Airgroup incoming");      
                GamePlay.gpGetTrigger(shortName).Enable = false;            
          }
    }
If you want to generate triggers via script you should study all naryv's examples more carefully as this way needs some advanced knowledge of C# which I do not have to the degree allowing to reproduce the script for a different mission. You as a C# programmer should better understand this deep-level programming (e.g. dynamic segment file generation, string operations, etc). For me it is really advanced stuff that I can only understand 70% at best but not to reproduce.

Try studying this improved version of naryv's mission http://forum.1cpublishing.eu/showpos...00&postcount=9 My description explains what the script does.

hc_wolf's missions based on these examples has comments in English. I think he learned how they work very well and can provide some help as well. His recent mission was posted in the main section yesterday http://forum.1cpublishing.eu/showthread.php?t=26464

upd. Looks like
Ships "TPassThrough 4"
Ground "TPassThrough 3"
Army "TPassThrough 2"

Last edited by Ataros; 09-26-2011 at 07:42 PM.
Reply With Quote