a666
Member-
Content Count
6 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout a666
-
Rank
Rookie
-
spawn not being executed
a666 replied to a666's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Alright, it's done. And I simplified a lot the whole enchilada. Twirly, your code gave me plenty of ideas, thank you. Had to create a sidelogic at the screenToWorld location. Obtain its posASL. Get the posASL for the cam, a little math, and voila, a death bringin' f'ing cam. screenpos = screenToWorld[0.5,0.5]; if (isNil("target")) then { target = (createGroup (createCenter sideLogic)) createUnit ["LOGIC", screenpos, [], 0, ""]; }else{ target setPos screenpos; }; tpos = getPosASL target; _pos = getPosASL DEATHCAM; _muzvel = 20; //uses some functions from LurchiderLurch AC130 _angles = [_pos,tpos]call LDL_getObjectAngles; _dirh = [_angles select 0]call LDL_normalizeAngle; _dirv = [_angles select 1]call LDL_normalizeAngle; _spread = (random (DEATHCAM_spread select DEATHCAM_currentspread))/10; _dirh = _dirh + sin(random 360)*_spread; _dirv = _dirv + cos(random 360)*_spread; _r_sphere = 100; _z = _r_sphere* cos(_dirv - 90); _r = sqrt(_r_sphere^2 - _z^2); _x = sin(_dirh)*_r; _y = cos(_dirh)*_r; _vel = [_x * _muzvel,_y * _muzvel,_z * _muzvel]; _bullet = (DEATHCAM_ammo select DEATHCAM_currentammo) createVehicle _pos; _bullet setPosASL _pos; _bullet setVelocity _vel; -
spawn not being executed
a666 replied to a666's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I am basing the code on the massively awesome work of LurchiDerLurch ac130 script (as said in the init function), so the math is mostly resolved, the setVelocity works (even through it is kinda slow). The functions I got work. The problem is that once the camera.sqf (in my case called deathcam.sqf) is running, this code: [] spawn somefunctionname; never executes, even when I called deathcam.sqf with an execVM. The problem is that inside the code which gets the keyboard events via displayAddEventHandler ["keydown"], "code or call functionname"]; seems to take the syntax of a sqs script (example, sleep 1; returns error). Essentialy some guy I play multiplayer with asked me if it was possible to make such a thing (he likes to see things blow up, probably :)), and has I was learning scripting I told him that I would try doing it... And almost everything is resolved, except this. -
spawn not being executed
a666 replied to a666's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I am not trying to make a camera which will follow a bullet (a bulletcam). What I am trying to do is to make a camera which you can move manualy, and on keydown of, let's say, spacebar will create a bullet (createVehicle) at the position of the camera and send it downrange to a position defined by screenToWorld. Essentially a camera that shoots bullets... -
I am trying to expand the camera.sqf which comes with ARMA2 in order to be able to create a bullet/shell/whatever and send it to a target location (center of the screen). Unfortunately I haven't been able to do so. For some reason displayaddeventhandler ["keydown"," ... [_pos, _dirh, _dirv] spawn DEATHCAM_gun; <- this goddamn line103 in deathcam.sqf ... "]; does nothing. So I am wondering why this is happening. You can check the whole code here. Or the demo mission I am using. And, if someone a a better idea about how to do what I am trying to do, any contribution is welcome.
-
Secondary Ops Manager Module Discussion
a666 replied to trini scourge's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry for the lag, life called... Yes, I can use SOM virtual artillery with Ambient Civilians and the normal artillery module, but the problem comes when I am incorporating the warfare module, because I believe Warfare and the SecOps Module are conflicting with the use of radio codes. I think that's because Warfare reserves radio codes alfa - juliet for it's own functions. The question is: What can I do to implement at the same time Warfare and SecOps if I want to have several functions incorporated inside the radio codes? -
Secondary Ops Manager Module Discussion
a666 replied to trini scourge's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I was wondering if it was possible to use the SecOp Manager along the Warfare module so the player can have arti strikes? The problem is that I have attached a Radio Juliet trigger 0-0-0 to bring the artillery support online which normaly gets in 0-8(Communication)-1(Request support)-1(Artillery Barrage). But obviously since warfare is running it must generate a conflict because I don't even get the normal [hint: ping Support available]. Communication-Request support never appears, instead I have the menus of the Warfare Module: Communication-Disband selected[], Send units[], Send money. What alternatives do I have? Is it possible to call using a radio trigger the Artillery Barrage of SOM (in this way: 0-0-0(Artillery Barrage), Radio: "Click on the map, soldier.", Click on map, Radio: "Rounds fired", "Splash", BOOM, BOOM, BOOM, AAARGHH!, My leg, oh god, my leg!, etc...). Or is there any other way?