Official 1C Company forum

Official 1C Company forum (http://forum.1cpublishing.eu/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.1cpublishing.eu/forumdisplay.php?f=203)
-   -   [Tutorial] Simple Scripting Lessons - Trigger Part 1 (Basics) (http://forum.1cpublishing.eu/showthread.php?t=28454)

Stiboo 12-18-2011 09:48 AM

Yes - very easy to follow and interesting

Can't wait for the next lesson!

Thank you so much for the time and effort put into this...

Cheers


Simon

xpupx 03-01-2012 01:00 AM

Lesson 2 please lol

ajay 03-20-2012 03:12 AM

Kodiak, i reposted the tutorial on my Clod page here http://jimeez.weebly.com/ . I am trying to make sure basic and well done tutorials like this do not get lost and buried in the forums over time :)

Cheers

major_setback 11-21-2012 03:10 PM

For me the image below just shows as a red cross. All others in the tutorial are fine.
I expect it is an essential one too.:-(


Quote:

Originally Posted by FG28_Kodiak (Post 369885)

....Now, place a group of Bf110s on the map, which are supposed to spawn later by means of the trigger. It's very important to select "Script Spawn C", because otherwise the Bf110s spawn at the beginning of the mission and a second time when the trigger is activated.
http://img220.imageshack.us/img220/4846/tutles0102.jpg

After this, we call up the script and trigger menu....


Punch_145 12-12-2012 06:13 PM

Must say Kodiak these tutorials here and on forum.sturmovik.de are a great help :)
Is it possible to have more than 1 parameter effect the mission success hud message?
i.e. a % of an air group destroyed plus complete a landing at home base both influence whether you see a Mission Success message...........

Regards

Punch.

bolox 12-12-2012 06:35 PM

something like that is possible- something very like that is used in the Redux campaign for the 'help in combat' mission

Code:

private void checkLanded(AiAircraft aircraft) {
    if (GamePlay.gpPlayer().Place() != aircraft)
      return;
        if (end != true) {
        Campaign.battleSuccess = false;
        GamePlay.gpHUDLogCenter("YOU FAILED! DISMISSED."); //STD
    Timeout(5.0, () => { ShowResult(true); }); // STD
    return;
        }
        if  ((end = true) && (safe = true))  // check  reached mission objective
   
        {   
        Campaign.battleSuccess = true;

        writeScore(cPlayer + readScore()); // STD : increase campaign kills
               
                   
        GamePlay.gpHUDLogCenter("GOOD SHOW! Less than 4 of 111Sqn shot down." );
        Timeout(5.0, () => { ShowResult(true); });//STD
               

        Timeout(15.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + readScore()); });//STD

    }
       
       
       
       
  }

gives a success message if the bool 'end' is satisfied when the player lands. There is some extraneous stuff in there relating to the campaign scoring system.

A 'TGroup Destroyed ' trigger could make bool end = true to make it run?

Punch_145 12-13-2012 05:56 PM

Cheers m8 ................will try it :)

Punch_145 12-21-2012 08:54 AM

Regarding "triggers" , I tried to create a spawn group of 8 110's triggered when a red air group passed through an area. This worked but every time the pass through was entered another 110 group was created, ended up with about 60 110's
Is this correct and if so is there any script to close the trigger once it has been triggered?

Punch

FG28_Kodiak 12-21-2012 10:33 AM

You can deaktivate the trigger with:
Code:

GamePlay.gpGetTrigger("Triggername").Enable = false;
See also this thread:
http://forum.1cpublishing.eu/showthread.php?t=35685

Punch_145 12-21-2012 01:38 PM

Thanx m8 ;)

So like so yes?

Code:

} AiAction action = GamePlay.gpGetAction(ActorName.Full(missionNumber, shortName));
        if (action != null)
        {
            action.Do();

        }
                GamePlay.gpGetTrigger(shortName).Enable = false;

    }
}



All times are GMT. The time now is 07:09 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2007 1C Company. All rights reserved.