Forum Jump :

Author Message


Posts: 78
Rank:


Country: us
Location: California
Occupation:
Age:
In-game name: TAW_Lucky

 
#1 Posted at 2009-08-17 23:38        
     
OK, so I'm trying to make some explosions go off 10 seconds after a trigger is tripped, firing the "bombardment" script. And I'm trying to make them happen slightly apart from each other. It's all fine, except it seems to ignore my "sleep" commands.

Any idea what's wrong?

; My first attempt at an ambient bombardment script
;

; -------Send message to confirm that script is firing------------------
titleText ["Hold on to your hat!", "PLAIN"];

; ----------------Pause for 10 seconds ---------------------------------
~10;

; ----------------Fire off the explosions at faux random intervals------
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb1";
~1;
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb2";
~1.4;
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb3";
~0.5;
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb3";
~0.7;
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb4";
~1;
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb5";
~0.5;
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb6";
~0.7;
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb7";
~0.2;
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb8";
~0.5;
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb9";

PS: I've replaced what were "sleep " commands with "~", but that didn't change anything.

This post was edited by Lucky44 (2009-08-18 01:01, ago)


Author Message


Posts: 1522
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2009-08-18 00:10        
     
what file system are you using as it looks like a bit of both sqf and sqs.


If it's sqf don't start the lines with ; use //

if it's sqs then replace sleep 0.5 with ~0.5

This post was edited by F2kSel (2009-08-18 00:42, ago)


Advertisement


Author Message


Posts: 78
Rank:


Country: us
Location: California
Occupation:
Age:
In-game name: TAW_Lucky

 
#3 Posted at 2009-08-18 00:31        
     
I was using sqs. I tried the tilda (~) but it didn't change anything. is there something else wrong?


Author Message


Posts: 1522
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2009-08-18 00:38        
     
Works fine with ~ and without the ; after

call it with
[] exec "nameofscript.sqs"

and don't for get to name your markers correctly.




; ****************************************************************
; Script file for Armed Assault
; Created by: TODO: Author Name
; ****************************************************************

; My first attempt at an ambient bombardment script
;

; -------Send message to confirm that script is firing------------------
titleText ["Hold on to your hat!", "PLAIN"];

; ----------------Pause for 10 seconds ---------------------------------
~10

; ----------------Fire off the explosions at faux random intervals------
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb1";
~1
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb2";
~ 1.4
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb3";
~ 0.5
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb3";
~ 1
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb5";
~ 0.5
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb6";
~ 0.7
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb7";
~ 0.2
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb8";
~ 0.5
bomb = "Bo_GBU12_LGB" createVehicle getmarkerPos "bomb9";


Author Message


Posts: 78
Rank:


Country: us
Location: California
Occupation:
Age:
In-game name: TAW_Lucky

 
#5 Posted at 2009-08-18 00:45        
     
Aha! I was putting the semi-colons after each line, including the ~10, ~1, etc. lines!

Thanks so much for taking the time to look at that!

Works great now.


Author Message


Posts: 1522
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2009-08-18 00:47        
     
Me too, I'm a little rusty on sqs. :)