mycroftsoft
Member-
Content Count
13 -
Joined
-
Last visited
Never -
Medals
Community Reputation
0 NeutralAbout mycroftsoft
-
Rank
Private First Class
-
How to return the flag when it\'s lost?
mycroftsoft replied to Capitaine Haddock's topic in OFP : MISSION EDITING & SCRIPTING
yeah this kind of jump is called a LOOP in x86 assembly language. in x86 asm you have to put in CX the number of times ot will loop. here it s the same thing but you don t have a loop :[ you have to make it yourself... LOOP is the very basic thing when you learn programming. most of the time if you like scripting then you ll love programming... even if programming is a bit more harder. remember that i m just making a counter with this fist line : _nb=_nb+1 and that you can do LOT of things with scripting, there is LOT of mathematical things to use. he greetings from [sOD] HLQ2ACTION -
How to return the flag when it\'s lost?
mycroftsoft replied to Capitaine Haddock's topic in OFP : MISSION EDITING & SCRIPTING
thx man now i did it :] it works all good. do it as follow : usflag is the name of the westflag and rusflag the name of the eastflag make a trigger for west, put in condition field : !alive flagowner usflag and in the activation field : [] exec "returnwestflag.sqs" make it triggered reapeatedly and for east, put in condition field : !alive flagowner rusflag and in the activation field : [] exec "returneastflag.sqs" make it triggered reapeatedly then in the scripts, ************* Â returnwestflag.sqs *************** #loop _nb=0 ~0.001 #nextloop ?(alive flagOwner usflag) : goto "end" ~1 _nb=_nb+1 ? ( _nb < 60 ) : goto "nextloop" usflag setflagowner objnull CutText ["THE WEST FLAG HAS BEEN RETURNED...","PLAIN",2] ~6 CutText ["","PLAIN",0] #end exit ********************************************* ************* Â returneastflag.sqs *************** #loop _nb=0 ~0.001 #nextloop ?(alive flagOwner rusflag) : goto "end" ~1 _nb=_nb+1 ? ( _nb < 60 ) : goto "nextloop" rusflag setflagowner objnull CutText ["THE EAST FLAG HAS BEEN RETURNED...","PLAIN",2] ~6 CutText ["","PLAIN",0] #end exit ********************************************* PS : ? ( _nb < 60 ) : goto "nextloop" 60 will be aproximatively the time in seconds before returning the flag if nobody get it. thx InqWiper to have put me in the good way :] greetings from [sOD] HLQ2ACTION -
How do i make my soldiers spawn in boat
mycroftsoft replied to Flashpoint Mappa's topic in OFP : MISSION EDITING & SCRIPTING
hmm after beeing dead... well the idea would be to do a trigger and in the activation field: condition : !alive player activation : [] exec "spawntoboat.sqs". and then in do a test till the player is alive like : spawntoboat.sqs : #stillnotalive ~0.001 ? (!alive player ) : goto "stillnotalive" player moveincargo boat exit did not test... -
How to return the flag when it\'s lost?
mycroftsoft replied to Capitaine Haddock's topic in OFP : MISSION EDITING & SCRIPTING
got a better way to do it create 2 triggers : one to begin west flagowner check and one another for east put in one of the 2 trigger (west one): condition : !alive flagowner westflag on activation : [] exec "returnwestflag.sqs" and for the another one (east one) : condition : !alive flagowner eastflag on activation : [] exec "returneastflag.sqs" returnwestflag.sqs : #loop _nb=0 ~0.001 #nextloop ?(alive flagOwner FlagWest) : goto "loop" ~1 _nb=_nb+1 ? ( _nb < 10 ) : goto "nextloop" FlagWest setflagowner objnull goto "loop" returneastflag.sqs : #loop _nb=0 ~0.001 #nextloop ?(alive flagOwner Flageast) : goto "loop" ~1 _nb=_nb+1 ? ( _nb < 10 ) : goto "nextloop" Flageast setflagowner objnull goto "loop" but there will have another problem.... what will happen if the flag has returned??? (what will the flagowner command do return??) please tell me... (i m gonna also try the code i wrote to return the flags.... -
How can i get an object up in the sky ?
mycroftsoft replied to Casto's topic in OFP : MISSION EDITING & SCRIPTING
yep and it also don t follow the law of gravity till someone shoot on it. (if you shoot on a jeep set with setpos in the air, it will make it fall on the ground!! how strange). -
How can i get an object up in the sky ?
mycroftsoft replied to Casto's topic in OFP : MISSION EDITING & SCRIPTING
setpos works also for armored vehicles just tested it the only difference between objects and vehicles like armored one (for example M1A1) is that vehicles do follow the law of GRAVITY so to put a M1A1 in the air you ll need to do a setpos loop as i wrote before. -
I can't get my groups to stand in a line!
mycroftsoft replied to superhero141's topic in OFP : MISSION EDITING & SCRIPTING
and if you use a script or trigger put this groupName SetFormation "LINE" groupname is the name of the group of soldier you want to be in line -
How to return the flag when it\'s lost?
mycroftsoft replied to Capitaine Haddock's topic in OFP : MISSION EDITING & SCRIPTING
i would like to know how too..... it does the same thing in BIS CTF missions..... but can t get the code from the BIS missions..... if someone could put the condition to return the flag if east or west flagowner die and so returning it of nobody take it back after 10 seconds.... thx -
would like to know the computer power of the ofp community ( RESISTANCE went out and need ever more computer power... but do we all have that powerfull computer??? )
-
it s pretty easy man. just add a addaction command to the chopper with as name displayed ("drop toxic smoke") or something, then it executes the script that will drop every 0.5 or 1 seconds a smoke grenade do it for 5 nades but to setdammage you ll need to place a trigger in the map (place it in a corner of a map). give it a name, then displace at the place of the third smoke grenade. then the trigger will kill everybody in the radius of the trigger. ( from what i know you can t create triggers with scripts... ) after the execution of the script don t forget to make a removeaction command so you can drop only one time the deadly smoke grenades... you could also remove the deadly effect after a time ( the deadly smoke effect always have a end... ). you could also make it more complicated by using lot of triggers to the radius of the deadly smoke decrease every time. greetings by [sOD]HLQ2ACTION
-
Moveincargo, binoculars
mycroftsoft replied to anders@dac.se's topic in OFP : MISSION EDITING & SCRIPTING
why just you don t deletevehicle the soldiers you don t want to be in chopper? just use "deleteVehicle object" deletevehicle works for any object you don t want any longer in your map. so the soldiers you putted in the chopper just to place the 2 soldiers you need are useless for the cutscene... so just delete them :] PS: i tried something really fun with the delete vehicle command... make a empty plane, name it plane, make a soldier with "this moveindriver plane", for the plane put his state in flying, now make a script where after 3 seconds it does that: "deletevehicle plane" HAHAHhhhahAA think you got the clue.... little sadic but nice clown jump cutscene i really love it :] greetings from [sOD]HLQ2ACTION www.s-o-d.net :] -
How can i get an object up in the sky ?
mycroftsoft replied to Casto's topic in OFP : MISSION EDITING & SCRIPTING
the setpos command works for ANY vehicle... and it works also for vehicles. ( a vehicle is a object like any other ). send to the script the object to put at 10 meters above the ground. the time before the next loop of ~0.01 seconds is necessary ( if less the vehicle will go up and down... ). _object = _this select 0 _objpos = getpos _object #loop _object setpos [_objpos select 0,_objpos select 1,10] ~0.01 goto "loop" exit -
hi i got these two problems when i finished my map... first : when the intro finished the players have their crosshair at top left the screen but their gun still aiming center of it.... and so you have to move back to your player control (disabling head move mode). to play. second: when i put in description.ext lines to be able to select the MAP duration.... it makes the server crash everytime so i must put a fixed map duration in my scripts.... why?? and how to fix these problems. thx