Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2011, 02:21 PM
David198502's Avatar
David198502 David198502 is offline
Approved Member
 
Join Date: Dec 2009
Location: Austria
Posts: 1,536
Default

Quote:
Originally Posted by FG28_Kodiak View Post
@David198502
You are from vienna, so i think you can speak german.
I've made step by step tutorials in german:
http://forum.sturmovik.de/index.php/board,17.0.html
ja ich sprech Deutsch.hey danke! werd mir mal das genauer anschauen!!
Edit: sehr gute Artikel hast du da zusammengestellt!und das schöne daran, sie sind wirklich stepbystep Instruktionen die jeder verstehen kann!danke nochmals!!!
__________________

Last edited by David198502; 09-26-2011 at 02:25 PM.
Reply With Quote
  #2  
Old 09-26-2011, 05:41 PM
Mington Mington is offline
Approved Member
 
Join Date: Apr 2008
Posts: 29
Default

red_bomb1 TPassThrough 3 1 270836 152088 300

Very good thanks Ataros!

To Ming-parse then:-

If a Red bomber crosses a radius of 300m from a point X = 270836, Y = 152088
Then a trigger is generated

So str[0] and str[1] are XY coordinates?

Ahah yes they are, I tested this by dropping numbers in from known object positions and that looks good

TPassThrough 3 - is type of trigger, 3 is for ground units pass through.

1 or 2 is army (red/blue)


Ground unit red = 3 1
Ground unit blue = 3 2

Is that ok?

I will need to find out the first TPassThrough parameter, I can't see TPassThrough in the dlls

Ataros please is it possible for you to build a small test script with a simple "Plane crossed radius" message when triggered?

This now is where we (learners) all run into problems, we can see what needs to be done but it is at the end of a long lonely corridor

The usual links to the needed dlls then and the script begins, I will already be in flight some miles from the trigger zone at Biggin Hill for this test, I will be in a Single mission with an airstart, I will be in an RAF SPitfire

I will not be using a Trigger built in the FMB, not to complicate things with simpler ways (for bolting-on universal use later) - I will get Biggin's coordinates for the needed str[0] and str[1]

First call could be 'Are there any planes in the mission?' and the first message could be the type of plane I am flying

(That will be useful for people to play with, by modifying for 'Are there any trains...' '...ships in the mission' and so on, for a toe-in-the-water)

If there are planes in the mission, set up the test-trigger radius and get the message ready

This is the tricky bit Mayday Mayday

If you are busy, no worries and thanks again for the great info

Ming
Reply With Quote
  #3  
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
  #4  
Old 09-27-2011, 12:37 PM
Mington Mington is offline
Approved Member
 
Join Date: Apr 2008
Posts: 29
Default

Thank you very much Ataros, much appreciated mate

I only know Basic and assembly language but we only need to know enough of C# to build scripts, we're using a very small subset of C# because we are running code in some sort of C# emulator. Maddox takes care of all the really difficult stuff thank goodness or there would be error-crashes galore

Doing the practical work you have set me - I realise that I have done no work on FMB triggers (as opposed to scripting triggers) and I must get your example to work... thanks again, the FMB panel of triggers/actions etc looks very interesting

Ming
Reply With Quote
  #5  
Old 09-27-2011, 01:02 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

I think Basic is not object-oriented. If this is the case make sure to read a couple of very short articles about classes
here http://www.aspfree.com/c/a/C-Sharp/C...ses-Explained/
or here http://www.csharp-station.com/Tutorials/Lesson07.aspx#
or http://csharp.net-tutorials.com/classes/introduction/

It helped me to understand C# scripts a lot.

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:59 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.