Jump to content
Sign in to follow this  
-NHS- Snip

Need some help: many script needed

Recommended Posts

But this just replace the respawn not the "base". If you want to move the base you can save all objects with relative positions from the respawn. Replace the respawn and adjust every object. But this is more tricky than just building a big base with multiple respawndistance^^

Share this post


Link to post
Share on other sites
But this just replace the respawn not the "base". If you want to move the base you can save all objects with relative positions from the respawn. Replace the respawn and adjust every object. But this is more tricky than just building a big base with multiple respawndistance^^

Well. He can by camp, I tought he meant a couple of tents for the snipers.

He can spawn them in the init.sqf once the spawn has been decided.

Share this post


Link to post
Share on other sites

i mean all the camp, respawn AND the background , i wish to increase the distance between both side, via the menu like for the time and the weather.

I think i put the mess with my init. Can someone tell me where are the error?

wscore = 0
escore = 0
showscore = false

nul=[] execVM "briefing.sqf";
[] exec "timer.sqs"

// Use the params set in the description.ext
// {"RAINY, DAY", "RAINY, NIGHT", "DAY", "NIGHT"};
combatStatus = Param2;

switch ( combatStatus ) do
{
case 1:
{
	skipTime (12 - daytime + 24 ) % 24;
	1 setOvercast 1;
	1 setRain 1; 
};
case 2:
{
	skipTime (23 - daytime + 24 ) % 24;
	1 setOvercast 1;
	1 setRain 1; 
};
case 3:
{
	skipTime (12 - daytime + 24 ) % 24;
};
case 4:
{
	skipTime (23 - daytime + 24 ) % 24;
};
};



estimatedTimeLeft param1
?(local Host):Goto "Host"
?!(local Host) : goto "Client"

#Host

#test	

goto "end"

#Client
?! local player : exit

#end
exit

Share this post


Link to post
Share on other sites

If you have a init.sqf your fault is to use SQS. You must place a semicolon after each scriptline and anchors (# and goto) dont work in SQS. Also you must replace

?(true):command;

with

if (true) then {command;};

And you must drop the "exit" you dont need this in sqf.

Share this post


Link to post
Share on other sites

That is SQS syntax in a SQF file.

You have to gode that in SQF.

estimatedTimeLeft param1
?(local Host):Goto "Host"
?!(local Host) : goto "Client"

#Host

#test	

goto "end"

#Client
?! local player : exit

#end
exit

Share this post


Link to post
Share on other sites

that is correct?

estimatedTimeLeft param1
if (local Host) then {Goto Host;}
if (local Host) then {goto Client;}

Host

test	

goto end

Client
if local player 

end

Share this post


Link to post
Share on other sites

There are no goto in sqf unless i'm mistaken.

simply do :

if ( !isServer ) then
{
   //Do something host related here
};

if ( isServer ) then
{
   //Do something server related here.
};

No need for exit.

Share this post


Link to post
Share on other sites

Let me know how it goes, i'm also interested in 1, 4 and 5

For the number 1

i have try this in a sqs, and it seem to be ok, they don't start and respawn with grenade and smoke shell:

player removeMagazines "HandGrenade_West" 
player removeMagazines "HandGrenade_East" 
player removeMagazines "HandGrenade" 
player removeMagazines "SmokeShell" 
player removeMagazines "SmokeShellYellow" 
player removeMagazines "SmokeShellGreen" 
player removeMagazines "SmokeShellRed" 
player removeMagazines "SmokeShellOrange" 
player removeMagazines "SmokeShellPurple" 
player removeMagazines "SmokeShellBlue" 

Exit

Edited by [NHS] Snip

Share this post


Link to post
Share on other sites

I have a new problem. the mission don't finish. I've try many thing. I have Open a Mission to check the end of this mission, but nothing is good. I thing i have forget something

Share this post


Link to post
Share on other sites

I have two trigger

1)trueEnd and forceEnd with End no 1

2) with:

(param1<10000 and ((time >= param1) or (TimeEnd >= param1))) or (param2<10000 and ((WScore>=param2) or (EScore>=param2)))

and

TimeEnd=time; publicVariable "TimeEnd"; titletext[format ["Mission over\nFinal score : NATO %1 - Soviet %2", WScore, EScore], "Plain"]; 

this one look like is ok because it show the score

Share this post


Link to post
Share on other sites
Snip;1369694']

(param1<10000 and ((time >= param1) or (TimeEnd >= param1))) or (param2<10000 and ((WScore>=param2) or (EScore>=param2)))

This doesnt seem right. You dont have any "if" statement, but I suppose you just gave the condition.

I rewrote it and I think you had some missing parenthesis in yours.

if( [color="Red"]([/color](param1 < 10000) and  [color="Lime"]([/color](time >= param1) or (TimeEnd >= param1)[color="Lime"])[/color][color="Red"])[/color]  or [color="Red"]([/color](param2 < 10000)  and [color="Lime"]([/color](WScore >= param2) or (EScore >= param2) [color="Lime"])[/color][color="Red"])[/color]) then
{
};

Bah. Nevermind, you parenthesis looks allirght. Must be something with the parameters. Can't figure out whats is wrong.

Edited by The_Angry_Canadian
nervermind.

Share this post


Link to post
Share on other sites

i've take it from some missions already working. I don't know why it's not working with mine

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×