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 05-21-2011, 10:34 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

I think you should add Divebomber type to this script as stated here
http://forum.1cpublishing.eu/showpos...1&postcount=63

Can not answer other questions.
Reply With Quote
  #2  
Old 05-21-2011, 03:06 PM
klem's Avatar
klem klem is offline
Approved Member
 
Join Date: Nov 2007
Posts: 1,653
Default

Quote:
Originally Posted by Ataros View Post
I think you should add Divebomber type to this script as stated here
http://forum.1cpublishing.eu/showpos...1&postcount=63

Can not answer other questions.
Thanks, I have done that
__________________
klem
56 Squadron RAF "Firebirds"
http://firebirds.2ndtaf.org.uk/



ASUS Sabertooth X58 /i7 950 @ 4GHz / 6Gb DDR3 1600 CAS8 / EVGA GTX570 GPU 1.28Gb superclocked / Crucial 128Gb SSD SATA III 6Gb/s, 355Mb-215Mb Read-Write / 850W PSU
Windows 7 64 bit Home Premium / Samsung 22" 226BW @ 1680 x 1050 / TrackIR4 with TrackIR5 software / Saitek X52 Pro & Rudders
Reply With Quote
  #3  
Old 05-23-2011, 06:12 PM
Flashman Flashman is offline
Approved Member
 
Join Date: May 2010
Posts: 109
Default

Im trying different things with these scripts by picking through other peoples. I have been trying various methods to ensure missions repeat, though so far they only repeat once for some reason.

Anyway instead of using the tick counter i have been looking at the init time settings people have been using. If i understand it correctly this allows a certaqin number of seconds to pass before carrying out whatever command you set.

This is a test script I am having problems with:

PHP Code:
 using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;

public class 
Mission AMission
{
     public 
override void OnTickGame() 
    {
     
double initTime 0.0;

      
Timeout(initTime += 60, () =>
    
            {    
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/Channelv1/BM2/sb1d.mis");    
                
GamePlay.gpHUDLogCenter("Intel: Stuka raid 1XXX inbound at Angels 13, heading W"); 
            });

        }

The purpose of the script is to run this mission (sb1d) 60 seconds after the script starts. It also has to only run the mission once. In this case the mission consists of a single AI stuka spawning, flying and then landing. Like I say, a simple test mission.

However when I test the mission, endless stukas spawn and blow each other up, in other words far more than 1!!!!

I have no idea about scripts, I have been picking bits out of other peoples, inserting them, hitting 'compile' and then testing the effects in game. I would be grateful if anyone can have a look and see where I am going wrong.
Reply With Quote
  #4  
Old 05-23-2011, 07:09 PM
ZaltysZ's Avatar
ZaltysZ ZaltysZ is offline
Approved Member
 
Join Date: Sep 2008
Location: Lithuania
Posts: 426
Default

Flashman,

OnTickGame() is called 30 times in second and every second, so your script 30 times in second schedules a mission loading, and repeats that endlessly. You are abusing your computer

Put this into Init(), not in OnTickGame().

Last edited by ZaltysZ; 05-23-2011 at 07:12 PM.
Reply With Quote
  #5  
Old 05-23-2011, 08:03 PM
Flashman Flashman is offline
Approved Member
 
Join Date: May 2010
Posts: 109
Default

Quote:
Originally Posted by ZaltysZ View Post
Flashman,

OnTickGame() is called 30 times in second and every second, so your script 30 times in second schedules a mission loading, and repeats that endlessly. You are abusing your computer

Put this into Init(), not in OnTickGame().

Hi Zaltys,

Thanks for your help, however please excuse my ignorance. I have tried putting Init() in carious places but I can't work it out. ANy chance you can edit my previous file and put it in the correct place so I can see how it should work? I really have no idea what im doing......

Thanks
Reply With Quote
  #6  
Old 05-23-2011, 08:14 PM
ZaltysZ's Avatar
ZaltysZ ZaltysZ is offline
Approved Member
 
Join Date: Sep 2008
Location: Lithuania
Posts: 426
Default

PHP Code:
using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;

public class 
Mission AMission
{
    public 
override void Init(maddox.game.ABattle battleint missionNumber)
    {
        
base.Init(battle,missionNumber);
           
Timeout(60, () =>
    
            {    
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/Channelv1/BM2/sb1d.mis");    
                
GamePlay.gpHUDLogCenter("Intel: Stuka raid 1XXX inbound at Angels 13, heading W"); 
            });

        }

If you forget base.Init(battle,missionNumber); in Init(), script won't work.
Reply With Quote
  #7  
Old 05-23-2011, 08:22 PM
Flashman Flashman is offline
Approved Member
 
Join Date: May 2010
Posts: 109
Default

Quote:
Originally Posted by ZaltysZ View Post
PHP Code:
using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;

public class 
Mission AMission
{
    public 
override void Init(maddox.game.ABattle battleint missionNumber)
    {
        
base.Init(battle,missionNumber);
           
Timeout(60, () =>
    
            {    
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/Channelv1/BM2/sb1d.mis");    
                
GamePlay.gpHUDLogCenter("Intel: Stuka raid 1XXX inbound at Angels 13, heading W"); 
            });

        }

If you forget base.Init(battle,missionNumber); in Init(), script won't work.
Thanks, that now works as I had hoped!

I had worked out I was missing the (battle, mission....) part but it still didn't work. it was the base.init part that made it function correctly, and I wouldn't have a clue about that.

Cheers!
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:12 PM.


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