-
Content Count
2658 -
Joined
-
Last visited
-
Medals
Everything posted by demonized
-
Laser target script (How to)
demonized replied to rejenorst's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
cool, great demo video. -
Help with UAV and Lock on Target/Ground
demonized replied to Big_Daddy's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
run this loop to limit speed. while {canMove _uavName} do { _uavName limitspeed 200; sleep 0.1; }; -
Ammo Crate Drop Off Help
demonized replied to bigpickle's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
there are many scripts out there doing this exact thing, but i know myself, i sometimes like to reinvent the wheel just to learn how to do it. can you post the entire script and how you use it? btw, here is how the if line should work correctly, asuming all parameters are correct: if (!alive (driver _c130) OR _c130time > 600 OR !canmove _c130) then {ontarget=2;_Loop=1;}; above is checking for : * if not alive driver of _c130 OR * _c130time is above 600 OR _c130 can not move (damaged/destroyed) ! in front of a condition means the same as not. alive player - is player alive. !alive player - is player dead. canMove _c130 - can _c130 vehicle move (not too damaged/destroyed) !canMove _c130 - can _c130 vehicle not move, its (too damaged/destroyed) -
Single Player - respawn [script]
demonized replied to demonized's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Oh man, that was some impressive flying there. that was just a perfect advert for flying in Arma2, who said they dont have to much focus on air combat. looked great. loved the low flying parts. are you using joystick and track ir? new version almost ready to release, with more options like group respawn, teamswitch for player, etc etc. still have to iron out a few details. it was very fun to get back to SP scripting, doesnt have to think about the locality issues of MP. hopefully ill have it ready sometime tonight. -
Help - Artillery with trigger
demonized replied to SPC.Spets's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yeah i missed the part with waitUntil, simple is often the best solution, but if you dont want the simple one, you cansue spawn to call script with sleeps and waituntils in trigger on act. _null = [] spawn { place your code here. }; you need ofc to name the _battery part aswell. -
Help - Artillery with trigger
demonized replied to SPC.Spets's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
just place the code you have created in a trigger and synch it to the unit, or use this in a anyone present trigger condition. unitname in thisList -
Ammo Crate Drop Off Help
demonized replied to bigpickle's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
why not just use if (!alive (driver planename)) ..... also your sntax is very messy and hard to debug, try setting it up like this for troublesome parts: if ( (!alive (driver planename) || (_c130time > 600) || (!canmove _c130) ) then {ontarget=2;_Loop=1;}; you see you were mising a few paranteces. -
Player looking at map mope ?
demonized replied to 1para{god-father}'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
you can detect the map open by this command visibleMap: and the play a animation, use animation viewer(find on armaholic) to find correct animation. have a loop run on the player: while {true} do { waitUntil {visibleMap}; player playmove "your_animation_here"; waitUntil {!visibleMap}; player playMove ""; }; will make this work for the entire mission. -
Help - Artillery with trigger
demonized replied to SPC.Spets's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
in debt explanation of each option, also with demo missions: http://community.bistudio.com/wiki/Artillery_Module -
Ammo Crate Drop Off Help
demonized replied to bigpickle's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
you knoe you can just use the BIS_fnc_spawnVehicle command? it creates the vehicle and all needed default crew. no need to creategroupsor anything. place a function module on map for usage. edit: kylania beat me to it. -
search and ask in there would be a good start. http://forums.bistudio.com/showthread.php?t=104827
-
xeno Domination / mando question
demonized replied to bignewy's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
http://www.armaholic.com/page.php?id=10993 there is a mando version there in that download. -
Magic Bullet Script
demonized replied to camo1018's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
add a fired eventhandler to the sniper, script running off that will have the bullet fired as _this select 6; while bullet is alive, manipulate the bullet with some form of this below: seVelocity and combine it with somekind of setVectorUpAndDir -
How to work out Map Size
demonized replied to 1para{god-father}'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
i asume he means a automatic aproach for any map. the manul way is to add a marker at each opposite corner. NE and SE and then calculate distance between them and some cosinus type math, for doing that witout preplaced markers i have no idea. -
Track Morta Rounds
demonized replied to 1para{god-father}'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yeah add into the while loop: edit: add this before the while line: _impact = []; _impact = getPos _projectile; after the while loop (last }; after while)(now its dead, asume impact add this: hint format ["impact was at position %1",_impact]; how to get Grid coords youll need to get from that position, im sure there is a way. edit: here is something to read up on for that: http://community.bistudio.com/wiki/Converting_position_to_map_grid -
Probability of presence and not alive
demonized replied to allamawitharifle's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
try: (({(vehicleVarName _x) == "armoura1"} count vehicles) != 0 AND ({alive _x} count crew armoura1) == 0) or: ({(vehicleVarName _x) == "armoura1" AND ({alive _x} count crew _x) == 0} count vehicles) != 0 -
Ammo Crate Drop Off Help
demonized replied to bigpickle's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
also i would use createUnit array and do like this: _pilotGrp = createGroup west; _posspawn = [0,0,1000]; _pilotman = _pilotGrp createUnit ["USMC_Soldier_Pilot", _posspawn, [], 0, "NONE"]; _pilotMan assignAsDriver _c130; _pilotMan moveInDriver _c130; your code is kindof missing parts as it seems its part of something, otherwise the { at start is wrong, delete it. }; }; at end, delete that too. -
domination by Xeno has this function but being a new scripter and looking into that mission will be difficult.
-
Track Morta Rounds
demonized replied to 1para{god-father}'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
add this into the init of the gun you wish to track bullets of. this addEventHandler ["Fired", {_this execVM "trackBullet.sqf";}]; save this as trackBullet.sqf _projectile = _this select 6; // this part is dynamically creating a new marker. _cnt = 0; _markerName = "EH_Fired_Bullet"; while {!isNil (_markerName)} do { _markerName = format ["%1_%2",_markerName,_cnt]; _cnt = _cnt + 1; }; //creating the marker with the name from above. _marker = createMarker[_markerName,(getPos _projectile)]; _marker setMarkerShape "ICON"; _marker setMarkerType "DOT"; // add more details for the marker if you wish. look up createMarker on wiki and you get all the commands available. // track the projectile with the marker while its alive, (bullets die on impact). while {alive _projectile} do { _marker setMarkerPos (getPos _projectile); sleep 0.1; }; // delete the marker when bullet is dead. deleteMarker _marker; edit: untested but something like that, maybe the dynamic markername is not working properly, let me know and ill see if i can fix it. -
Problems with understanding jip and locality
demonized replied to roguetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
thats because in any editor object in the editor you need a handle, using whatever = ["parameter1","parameter2"] execVM "test.sqf"; is the proper way to do it. in scripts you dont need the whatever = handle, but in the editor directly you do need it. edit: ninjaed :D -
Ammo Crate Drop Off Help
demonized replied to bigpickle's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
i alwyas use createVehicle array when doing stuff like this sinc ethat gives a proper handle. http://community.bistudio.com/wiki/createVehicle_array also to createGroup west you need a center of west side, having 1 unit placed in editor with probability of precesne to 0 does that. -
Track Morta Rounds
demonized replied to 1para{god-father}'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
are you trying to calculate the the actual firing arc of the mortar? else just use fired eventhandlers and track the projectile, or if using artillery module, there is options for mortar radar there believe. -
A scripting challenge
demonized replied to vapour's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yeah, second that, it means that the file is not working the same way the sqf file is supposed to. also they use it this way to combine sqs and sqf syntax wich is horrifying :D at the least its VERY confusing and troublesome for a new scripter not knowing the limitations of this way of exec a sqf file, wich just further makes scripting even harder to understand. -
Wierd ending problem
demonized replied to JacobJ's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
the end trigger should work on all clients. what is the condition of the triggers not working for your test player? where is test player when the end triggers activate? -
Probability of presence and not alive
demonized replied to allamawitharifle's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
try this: but i think this condition will cause trouble, untested, try it but dont get your hopes up. much better to do this in a script since triggers beheave like scripts andway there is no real difference exept for the practcal one. added check inside counts if !isNull armoura.... means if existing. count thislist <= 4 and ({!isNull armoura1 AND alive _x} count crew armoura1) == 0 and ({!isNull armoura2 AND alive _x} count crew armoura2) == 0