Jump to content
Sign in to follow this  
mattxr

IED SQS MP Problem Help

Recommended Posts

Oki i have this IEd script it works flawlessly in SP but in MP it creates multilple explsions on the screen like its being activated multinple times can someone stop this so it just goes off the once.

Quote[/b] ]; Improvised Explosive Device Script

; By Jeevz

; v1.2 12/13/06

; This script will create an explosion of a

; selected size on any object when called

; The arguments are [objectName, explosionPower]

; Explosion Power will be 1 of 4 choices

; Small - Good for Anti-Personnel use

; Medium - Will usually disable a Humvee without killing the occupants

; Large - Will usually destroy a passing humvee and kill or severly injure all occupants, will disable the tracks and possibly engine on M1A1

; Huge - Nothing will survive, I mean... it's HUGE :-)

; Example script call --> [theCar, "Small"] exec "mScripts\IED.sqs"

;start script

_theObject = _this select 0

_theExplosion = _this select 1

;locate the Object to be blown up

_bombLoc = GetPos _theObject

_bombLocX = _bombLoc select 0

_bombLocY = _bombLoc select 1

_bombLocZ = _bombLoc select 2

; Deterimine the ordinance used to create the explosion

? (_theExplosion == "Small") : _ammoType = "R_57mm_HE"

? (_theExplosion == "Medium") : _ammoType = "M_Sidewinder_AA"

? (_theExplosion == "Large") : _ammoType = "M_Sidewinder_AA"

? (_theExplosion == "Huge") : _ammoType = "Bo_GBU12_LGB"

civvy1 globalchat _ammoType

; Get the explosion size and blow the object up

? (_theExplosion == "Small") : goto "SMALL"

? (_theExplosion == "Medium") : goto "MEDIUM"

? (_theExplosion == "Large") : goto "LARGE"

? (_theExplosion == "Huge") : goto "HUGE"

#SMALL

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_theObject setdammage 1

civvy1 globalchat "Small"

exit

#MEDIUM

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_theObject setdammage 1

civvy1 globalchat "Medium"

exit

#LARGE

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_theObject setdammage 1

civvy1 globalchat "Large"

exit

#HUGE

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_theObject setdammage 1

civvy1 globalchat "Huge"

exit

Share this post


Link to post
Share on other sites

Just wrap the script round a if(isServer) command, it will only run on the server, but the explosion will be heard and seen on all clients. Also good to use this command if you expect players to JIP if you activate with a trigger.

If you do the latter you could just add '&& isServer' to the end of the trigger condition field, it will have the same effect.

Cheers

GC

Share this post


Link to post
Share on other sites

Thankyou for the reply you truly learn something new everday. smile_o.gif

Share this post


Link to post
Share on other sites

And this will work the same way for an .sqs if you put:

?!(isServer) : exit

At the top of the script.

Right?

Share this post


Link to post
Share on other sites
And this will work the same way for an .sqs if you put:

?!(isServer) : exit

At the top of the script.

Right?

Yea but .SQS is like a disease, we're trying to get rid of it but people keep using it so it won't go away. confused_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]Yea but .SQS is like a disease, we're trying to get rid of it but people keep using it so it won't go away.

Yeh people like BIS using sqs in there missions and campaigns , how dare they wink_o.gif.

on topic but offtopic. what is the effect on memory in the sqs vs sqf obviously we are talking big files here not a few server checks.?

Share this post


Link to post
Share on other sites
Quote[/b] ]Yea but .SQS is like a disease, we're trying to get rid of it but people keep using it so it won't go away.  

Yeh people like BIS using sqs in there missions and campaigns , how dare they wink_o.gif.

 on topic but offtopic. what is the effect on memory in the sqs vs sqf obviously we are talking big files here not a few server checks.?

Yes I know BIS used .sqs, probably because they're just used to it, but that doesn't make it right.

Share this post


Link to post
Share on other sites

I cant agree that its simply beause there used to it because they do use sqf too , but only for very finite requests such as position finding and setting such as dust particles etc.

For the record i agree sqf is a nicer cleaner code than sqs but for me like BIS i prefer to reserve sqf for high end finite code which is particles and ballistic calculations .

For mundane tasks i like good old sqs ,dont ask why but it seems structured better to tell a story for making missions especially when timing cretain events like cutscenes and stuff , it may not be as efficient but its easier to tell/ orchastrate the story .

my two cents

PS sqs is also good for begginers to learn from as its not so much all code as sqf and more common words are used sqf can and has frightened some people off mission making and thats something arma can do without .

Share this post


Link to post
Share on other sites

Quite frankly the amount of time and effort people put in to get a bit familiar with .sqs its not worth throwing away just because something slightly more efficient (even if its 100 fold i still dont care) trots along. If i know how to do something in sqs im not going to go scowering the internet just because some bloke on the forums thinks its backwards. When its a necessity to do certain things i'll of course use it.

Do a tutorial on absolutely everything involved with .sqf files and you might get a few more followers.

Share this post


Link to post
Share on other sites

I agree with misinformed.

Almost every map ive seen so far has both sets in.

Quite simply: Some things can be done easier in SQS than SQF. Why should you have to learn two sets of syntax and languages just for a game?

Who cares if its 10kb smaller than with SQS or uses 0.002% less memory?

I certainly do not agree with using outdated code if it resitrcts progress of creative addons or mission editing, however...if it works it works smile_o.gif

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  

×