Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by Prospero

  1. Prospero

    Invisible unit

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (GranQ @ Nov. 22 2002,16:03)</td></tr><tr><td id="QUOTE">i also want a invisible one.. and the idea is great.. so stop posting "hey we don't need that" course some of us do. better let the space be open for those with ideas on how to make it..<span id='postcolor'> And I never said anything of the sort. Prospero
  2. Prospero

    Invisible unit

    I spose you could just apply transparent textures to a standard soldier / weapons. Long way round, though. You might try creating a modified and very simple transparently textured target object (if you need res LODs) with sufficient cost/type attributes such that AI soldiers will target/shoot it (this is more or less how the laser designator spot works). You could then move this around at will with setVelocity. A far more flexible solution. That's how I'd try it, anyway. Prospero
  3. Hi chaps, Well, I suspect that I'll have to figure this one out myself, but anyway... Proxy objects - how much interaction do they have with the game - geo collison detection / fire geo collison detection? Are they destroyable separately from the object to which they are a proxy? Post all you know. That includes those of you jealous of the very little knowledge you have managed to acquire. Prospero
  4. Prospero

    Maya OFP character animation kit

    Fantastic work, Teacup. Finally I can make a soldier squat and take a shit. Prospero
  5. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Prospero @ Nov. 04 2002,16:14)</td></tr><tr><td id="QUOTE">I've just sussed a method to get a man to move with objects that are moving - ships and stuff. Works very nicely indeed. Two limitations though: 1) Only works for men (well, women too...). 2) The model (ship / aircraft or whatever) has to be specifically designed to take it into account (LOD set up etc). Will post more soon. Prospero<span id='postcolor'> Update: Things have been moving along nicely, but the former (above) two limitations still apply. Regarding the LOD set up I mentioned: This still needs finalizing, but it'll go something like this: to create a sticky surface on your add-on, you define the walkable surfaces in the usual way in the Roadway LOD. Then, to define any walkable surface as sticky, you add a second surface (face) 0.05 metres underneath it, also in the Roadway LOD. I've been testing with a simple mountain cable car on Nogova (all very Where Eagles Dare). You can either enter it and ride it up and down the mountain whilst being able to move about inside / shoot out of it etc. Or you can jump onto its roof as it passes beneath you - and then move about on / shoot from the roof as it moves along. The cable car uses simulation-type "helicopter". Prospero Edit: Oh, and there's one further little trick. You add some "tags" to the vehicle's .p3d so that the script can determine the vehicle's attitude much faster than by my previous method (in another thread).
  6. My bad. I've just sussed a method to get a man to move with objects that are moving - ships and stuff. Works very nicely indeed. Two limitations though: 1) Only works for men (well, women too...). 2) The model (ship / aircraft or whatever) has to be specifically designed to take it into account (LOD set up etc). Will post more soon. Prospero
  7. Hi all, Here's a little demo floor enumerator script. Essentially, it accepts a coordinate specified in terms of X and Y, and will tell you how many (walkable) floors are at that precise location (the first number in the list), and at what height AGL each floor is (the following numbers in the list, from lowest floor to highest). I've set the demo to use the X/Y position of the player as input, and to loop at about 2 Hz. Prospero ---------- _h = 29.5 _d = 0.001 _g = 0.001 _n = 0 l = "logic" camcreate [0, 0, 0] #lp1 _f = [] _f = _f + [_h] _o = [] _x = getpos vehicle player select 0 _y = getpos vehicle player select 1 #lp2 l setpos [_x, _y, (_f select _n) - _d] _i = (_f select _n) - ((getpos l select 2) + _d) ?(_i > _g): _f = _f + [_i]; _n = _n + 1; goto "lp2" _n = 0 _f = _f - [_f select 0] _fs = count _f ?(_fs == 0): hint "No walkable surfaces."; goto "sp" #lp3 _o = [_f select _n] + _o _n = _n + 1 ?(_n < _fs): goto "lp3" _n = 0 _o = [_fs] + _o hint format ["%1\n", _o] #sp ~0.5 goto "lp1" ---------- Edit: I should mention that it only works for surfaces less than 29.5 metres above ground level (~100 feet). This is a curious limitation which I don't fully understand. Further edit: To be more precise, you can find out the height AGL of surfaces higher than 29.5 metres (by changing the value stored in variable _h), but you start losing lower surfaces. Very odd. Another edit: It should be noted that the only official BIS object with a walkable surface higher than 29.5 metres is the road on the Resistance bridge object (which is about 33.7587m. The pavements on either side of the road are slightly higher - 33.8252m).
  8. Prospero

    Invisible unit

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (kkkonge @ Nov. 19 2002,15:40)</td></tr><tr><td id="QUOTE">Working with FP for some time now, I've often found that I needed some sort of a dummy guy. Especially when working with vehicles I've come across several problems: 1) You can't pre-determine what seat a given character will occupy, 3) lights cannot be left on in empty vehicles, 3) and the bug where you exit a vehicle, but then find that you cannot re-enter (only if you are not the squad leader). The latter can be solved, but I just thought that having a totally invisible unit (physically invisible, non-intelligent, can't get shot, does not show up on squad listings etc.) would be quite usefull. This way one can, say 'fill up' a chopper/car with invisible guys in order to ensure that the player is seated across another vital character/on the backseat - or cars could be left with their engines running - or the exit-enter bug could be worked around - or you could use it as a pinpoint dummy (inv. helipads are a bad idea with choppers in the air) - or... Maybe this is just a lame idea. Maybe not. But I think it would be interesting to see someone do it. Oh, what the heck, let's be honest: I need the sh*t... Â <span id='postcolor'> Use a gamelogic. Prospero
  9. Prospero


    I like the idea a lot. Prospero
  10. All right, I've sorted it. Prob solved. Prospero
  11. Hi all, First, here's one way to determine the height of the ground at any given location: 1) Make a trigger - let's call it mytrigger. 2) Then, to find the height of the ground at a given location (in terms of _x and _y): Â mytrigger setpos [_x, _y, 0] Â _heightofground = -(getpos mytrigger select 2) It isn't that obvious, but it works. However, the reason I bring this up is that I am trying to find a method which doesn't just find the height of the ground at a given X/Y location, but will also determine the level (or levels) of a Roadway LOD at that location. For example, say you have a building - and its roof has been defined as a surface in the Roadway LOD. I'm trying to find a DIRECT method by which, if you were to specify an X/Y location which coincides with the position of this building (and its roof, of course), the method would return the absolute height of the roof (which would equal the height of the ground + the height AGL of the roof). If this can be done, I can make really nice sticky moving surfaces (which you'll move with when you're walking on them). As it is now, the method I have isn't quite "there". Edit: One of the nice things about my current (albeit imperfect) method is that if you jump onto the roof of a vehicle, and the vehicle then accelerates off too fast, you'll get left behind - which is quite realistic;) The driver has to drive smoothly if you're to stay on... Prospero
  12. It is possible... well... I'm working on it, but it takes forever to get things right. The question is, for your application, do you want the object itself (the claymore) to be the "sensing" object, or can you use another object setPos'ed over/around it as the sensor? Prospero
  13. Prospero


    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (supah @ Nov. 08 2001,20:50)</td></tr><tr><td id="QUOTE">And without the ability to jump how would u get out?<span id='postcolor'> Obviously no-one reads my posts. Yes, it's very easy to make a simple jump script with v1.85. Takes all of about 3 lines of scripting. I posted a totally reliable and very simple demo jump script on the Mission Editing board about a week ago (approx). Prospero
  14. Prospero

    Animating hit points lod

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Tanelorn @ Nov. 17 2002,18:59)</td></tr><tr><td id="QUOTE">SImilar to my other post, custom animations don't seem to work on the Hit-Points LOD.<span id='postcolor'> My experience too. Prospero
  15. Prospero

    Animating the firing points

    Yup, I had exactly the same problem when I tried this a while ago. Didn't find a solution, I'm afraid. I suspect there may not be one. Instead, I will be next solving death itself. Prospero
  16. Prospero

    Proxy objects - and interaction

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (BratZ @ Nov. 18 2002,02:36)</td></tr><tr><td id="QUOTE">Hi Col Klink...what have you came up with? I see your radar building released. Do we have to do this with all seperate models?<span id='postcolor'> Speaking for myself, I'm afraid I still haven't got it working, but I've had a few ideas in the last few days so... we'll see. I've been hoping Col Klink solves it;) Of course, if Suma could provide us with an editable (MLOD) version of just one of those proxy object .p3ds referenced in O.pbo - all problems might be solved! Damn shame about proxy objects and Roadway LODs though. I'm still hoping (against the odds) that it turns out they work. Prospero
  17. Prospero

    Ms gamevoice compatible to resistance?

    I use a GameVoice just about all the time to select options from the Action Menu whilst in plane or helicopter. It's a great gadget and works most of the time providing you are careful about selecting words which work with your particular voice. I say "navigation" rather than "map" to bring up the map screen reliably. Prospero
  18. Destructions for use: ------------------------ 1) Create three triggers. Name them PS1, PS2 and PS3. 2) Specify the object to track by loading it into global variable PSn. In the demo script, I have designated an object called "myobject" to be tracked. 3) Execute PSat.sqs in any way you see fit. 4) The attitude information of the tracked object can now be accessed via the global array PSat. It is a three element array (from 0 to 2). The order is yaw (+180 to -180 degrees), then pitch (+90 to -90 degrees), then roll (+180 to -180 degrees). 5) Note that since the OFP world is based on a right-handed cartesian coordinate system (identical to ENU), a positive yaw is nose left, NOT nose right. Direction (from getDir, for example) is effectively -yaw. 6) Global variable names used: PSn PSat PSaop PSafp PSarp 7) Script filenames used: PSat.sqs PSata.sqs PSatb.sqs PSatc.sqs 8) Enjoy. And remember to give me specific credit if you use this method (or rip bits out). Prospero PSat.sqs ---------- PSn = myobject PSat = [0, 0, 0] PSaop = [0, 0, 0, 0] PSafp = [0, 0, 0, 0] PSarp = [0, 0, 0, 0] _vo = [0, 0, 0] _vf = [0, 10, 0] _vr = [10, 0, 0] #lp _v = PSn drop ["empty", "", "Billboard", 1, 0, _vo, [0, 0, 0], 0, 1, 0.78431375, 0, [0, 0], [[0,0,0,1], [0,0,0,1]], [0], 0, 0, "", "PSata.sqs", _v] drop ["empty", "", "Billboard", 1, 0, _vf, [0, 0, 0], 0, 1, 0.78431375, 0, [0, 0], [[0,0,0,1], [0,0,0,1]], [0], 0, 0, "", "PSatb.sqs", _v] drop ["empty", "", "Billboard", 1, 0, _vr, [0, 0, 0], 0, 1, 0.78431375, 0, [0, 0], [[0,0,0,1], [0,0,0,1]], [0], 0, 0, "", "PSatc.sqs", _v] _aop = PSaop _afp = PSafp _arp = PSarp _ox = _aop select 0 _oy = _aop select 1 _oz = _aop select 3 _x = (_afp select 0) - _ox _y = (_afp select 1) - _oy _z = (_afp select 3) - _oz ?(_y == 0): goto "sb1" _yw = _x atan2 _y _sy = sin(_yw) _cy = cos(_yw) #rn1 _op = _z _ad = sqrt(_x^2 + _y^2) ?(_ad == 0): goto "sb2" _ph = atan (_op / _ad) #rn2 _tx = (_vr select 0) * _cy + (_vr select 1) * _sy _ty = Â -(_vr select 0) * _sy + (_vr select 1) * _cy _mg1 = sqrt(_tx^2 + _ty^2 + (_vr select 2)^2) _dx = (_arp select 0) - _ox _dy = (_arp select 1) - _oy _dz = (_arp select 3) - _oz _mg2 = sqrt(_dx^2 + _dy^2 + _dz^2) ; Normalize possibly "stretched" vector. _tp = ((_dx * _tx) + (_dy * _ty) + (_dz * (_vr select 2))) / (_mg1 * _mg2) ?(abs(_tp) > 1): goto "sb3" #rn3 _rl = -acos(_tp) ?(_dz < (_vr select 2)): _rl = -_rl PSat = [-_yw, _ph, _rl] ~0.001 goto "lp" #sb1 ?(_x > 0) : _yw = 90; goto "rn1" ?(_x < 0) : _yw = -90; goto "rn1" _yw = 0 goto "rn1" #sb2 ?(_op > 0): _ph = 90; goto "rn2" ?(_op < 0): _ph = -90; goto "rn2" _ph = 0 goto "rn2" #sb3 ?(_tp > 1): _tp = 1; goto "rn3" _tp = -1 goto "rn3" ---------- PSata.sqs ---------- _x = _this select 0 _y = _this select 1 _z = _this select 2 PS1 setpos [_x, _y, 0] _zz = _z - (getpos PS1 select 2) PSaop = [_x, _y, _z, _zz] exit ---------- PSatb.sqs ---------- _x = _this select 0 _y = _this select 1 _z = _this select 2 PS2 setpos [_x, _y, 0] _zz = _z - (getpos PS2 select 2) PSafp = [_x, _y, _z, _zz] exit ---------- PSatc.sqs ---------- _x = _this select 0 _y = _this select 1 _z = _this select 2 PS3 setpos [_x, _y, 0] _zz = _z - (getpos PS3 select 2) PSarp = [_x, _y, _z, _zz] exit ----------
  19. The problem is that you can't use this script to monitor the yaw and pitch of a personal weapon. For example, if you use it on a man, pitch and roll will be zero (or thereabouts) unless he lies down (prone) on non-flat ground. The script is primarily intended for tracking the attitude of (rigid body) objects and vehicles rather than men. As for constructing a sight - I'm not sure what you mean. Let's say that you have an arty piece which consists of a chassis and a gun barrel, and let's say the gun barrel can move independently of the chassis (yaw and pitch). This script will not allow you to track the attitude of the gun barrel - only the chassis. One thing you might try if you want to track the arty gun barrel is to attach either two or three cargo proxies to the barrel component, load them with gamelogics and then track the positions of the gamelogics. I do not know if this will work, however. If it does, you could plug the gamelogic positions into the script as PSaop, PSafp and PSarp. These are four element arrays consisting of x, y, z, and absolute z. PSaop expects the centre of rotation position. PSafp, a position 10 meters to the front. PSarp, a position 10 meters to the right. Prospero PS: Hopefully the very wonderful Suma ( ) will provide us with a way of accurately determining absolute height without the need for triggers at some stage (using the distance function is not accurate when you plug large numbers into it). One possible nice way to do it would be to add a fourth (optional) element to the setPos and getPos functions. And then of course, I'm praying for setAttitude and getAttitude to make all of this redundant.
  20. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (ID7 @ Nov. 12 2002,15:39)</td></tr><tr><td id="QUOTE">Provided the file is written 50 times per second, Windows write cache (delayed write) will prevent flushing of the file to the disk. Write cache also functions as read cache for subsequent reads of the file. Â There should be no disk activity if you have enabled write caching (default on). The performance should be the same or better compared to ramdisk.<span id='postcolor'> Cool. Many thanks chaps! Prospero
  21. Hi all (and hopefully Suma!, I've been trying to load some scripts onto a RAMdisk (s:) and run them from it. But how do I use the exec command with absolute pathnames? Nothing I've tried so far works. Can it be done, Suma? <Praying for an answer!> Prospero
  22. The reason I asked, Suma, is that I am trying to get OFP to read a small (changing) file at a high rate (in virtual realtime) - say, 50 Hz. An external program (called HeliSim) generates this rapidly changing (.sqs) file. The file might look like this: ---------- PSpndot = 10.3456 PSpedot = -3.3745 PSpddot = 0.8350 PSphi = 63.1298 PStheta = -2.9443 PSpsi = -0.2892 exit ---------- I.e. I am just loading 6 global variables - with the 3 velocity components and the 3 Euler angles. Hence I thought a RAMdisk might be solution. Is there another way I might accomplish this? Prospero
  23. So far, the following seem to work well (i.e. camCreate immediately followed by setVelocity): cannon30AP cannon30HE cannon25HE No bullets yet though, only cannon rounds. Post your findings, chaps! Note - there seems to be no reason to have to use setDir. Prospero
  24. Good show Doolittle. If you know any other bullet names please do post them! Prospero Edit: Ooooooh this is good. The number of things one can do with this... The strange way (straight line) that the tracer is drawn from point of origin to bullet makes sense once you start firing bullets at high speeds over long distances.
  25. Yeah, although I think there may be other ways to give it that little bump (which I'm working on). But that said, I've been wanting to know how to camCreate live bullets for a long time. I recall Dinger fairly recently mentioning that he thought it was possible, but I still haven't seen the actual command. Prospero