Jump to content

Prospero

Member
  • Content Count

    478
  • Joined

  • Last visited

  • Medals

Everything posted by Prospero

  1. Prospero

    Vtol script available

    If you want to use ProSphere for this (and no, I still haven't gotten around to doing the updated version with sticky surface support), I would suggest something like the following: 1) Design your aircraft add-on as a PLANE, not a HELICOPTER. 2) Remember that no script can set the pitch or roll of an aircraft (at the moment). 3) Have a "VTOL Mode" action available when in the pilot's seat of the aircraft and the engine is on, and the velocity is within suitable limits. 4) When "VTOL Mode" is selected, use the ProSphere scripts to: Â Â a) Rotate the thrust vector forward and aft (w & s) using setVelocity. Â Â b) Rotate the thrust vector left and right to a limited extent (a & d) using setVelocity. Â Â c) Scale the thrust vector (q & z) using setVelocity. Â Â d) Control yaw (rudder) (x & c) using (timed) setDir. Note that setDir keeps pitch and roll at 0. During use of "VTOL mode" flight, you will always remain level. This is what is possible with OFP at the moment. Prospero
  2. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Harnu @ Dec. 07 2002,19:10)</td></tr><tr><td id="QUOTE">Does anyone know how to make something that was camcreated get a setvelocity also. Â If I want to camcreate an LGB, how can I use the setvelocity to make it go forward? Â Do I need scripts or do I just put more into the activation line of my trigger?<span id='postcolor'> What's wrong with a createVehicle followed by a setVelocity? It isn't that hard to script surely? Although it would be nice to be able to tie the execution of several lines together of course. Prospero
  3. Prospero

    Ofp 2 improvements

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (integra @ Dec. 08 2002,12:59)</td></tr><tr><td id="QUOTE">Sorry for my bad English,I'm Belgian. Â <span id='postcolor'> We all have our crosses to bear. Prospero
  4. Prospero

    Ofp 2 improvements

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (integra @ Dec. 08 2002,12:59)</td></tr><tr><td id="QUOTE">Sorry for my bad English,I'm Belgian. Â <span id='postcolor'> We all have our crosses to bear. Prospero
  5. Yup, but the distance command is rounding your result. Believe me, it's not accurate enough if you're trying to do attitude determination, for example. This is why I recommend my method, even though it uses a trigger. Prospero PS: I seem to have deleted my second post in this thread by accident. Can't be arsed to rewrite it. But for Suma, if he's out there: there seems to be a problem if getPos is used on an object which is above a slanted Roadway LOD on uneven ground. The z value returned does not seem to be accurate. Or at least, it's something like this. I've had enough of trying to figure it out. Doolittle: Try my method. You will find that setPos and getPos work differently with triggers (well, setPos works differently, not getPos). That is why you are not understanding it at the moment.
  6. If myobject is at location [_x, _y, _z], then its absolute height can be determined thusly: mytrigger setpos [_x, _y, 0] _objheight = (getpos myobject select 2) - (getpos mytrigger select 2) Which is like saying: _objheight = height of object above ground + height of ground at that location Prospero
  7. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Spitfire @ Dec. 04 2002,16:31)</td></tr><tr><td id="QUOTE">But what I truly wish for are the commands for setting pitch and bank of objects. That's the one major thing missing.<span id='postcolor'> Seconded. Prospero.
  8. Prospero

    Scripting command request

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Spitfire @ Dec. 04 2002,16:31)</td></tr><tr><td id="QUOTE">But what I truly wish for are the commands for setting pitch and bank of objects. That's the one major thing missing.<span id='postcolor'> Seconded. Prospero.
  9. Let the player's direction be _dir, and let the distance of the object to be placed in front of the player be _dist. _dx = cos(_dir) * _dist + sin(_dir) * _dist _dy = -sin(_dir) * _dist + cos(_dir) * _dist Now, add these onto the X/Y position of the player. Prospero
  10. Prospero

    They're walking

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Tanelorn @ Nov. 30 2002,21:13)</td></tr><tr><td id="QUOTE">HellToupee, what part of this post makes you think my KBOTS are presentable? The whole point is that they are not ready because of the friggin dust! Bratz, the land contact points are still there, I just removed their labels. Wether everything is defined or not tho, there is still dust. If I can only get rid of this confounded dust, it will be problem solved!<span id='postcolor'> Under certain circumstances, Landcontact points function without labels. Dunno if this helps. I'm not saying they work "fully", but I suspect OFP makes a few default assumptions. Prospero
  11. Several options here, but I can see that you want to have the missile flying in on a nice trajectory and hitting the laser spot. I tend to use Dinger's method for capturing the laser spot - create a map-sized trigger, activation anyone and repeatedly, pop all the objects listed into an array - and scan the array for the "lasertarget". Now you can get its position. As for doing the missile part. Well, this is pretty simple. I would personally use a looped setVelocity. You've got the start position (vector), you've got the end position (vector). If you just subtract the vectors, you've got the velocity vector you need. I've been playing around with a similar thing to simulate a mini Hellfire-type missile launched in loft mode. One setVelocity gets the thing flying ballistically towards the general target area. Then, when it "sees" the laser spot, it rockets down onto the spot's location (using a looped setVelocity and a kind of PID control loop). There are many other options of course. Prospero Edit: Speaking of which, one of the things I've been meaning to try is to add a kinda miniature laser designator onto a personal weapon (an M16, for example). Think of it fitting where an M203 grenade launcher goes - under the barrel. It would have limited range (power), and the idea would be that you could use it as a secondary ammo type/mode for the personal weapon. I haven't really had a go at this - and I don't have much experience of making weapon add-ons. Anyone know if it's possible? It's not too far away from what's going on in Real-Lifeâ„¢ weapons development.
  12. Prospero

    Integer

    I edited a previous post of mine: Say I want to round a number (let's say to three decimal places). I could just use: _x = (_x + 0.0005 - ((_x + 0.0005) % 0.001)) This rounds _x up perfectly well if _x is positive. But instead, let's say _x is negative. Now, I may want to round down rather than up (for the sake of symmetry), so I use this: _x = (_x - 0.0005 - ((_x - 0.0005) % 0.001)) The problem is I have to test _x first (with a condition) to see if it is positive or negative, and conditions are very slow in OFP. I'm trying to do it without using a condition - in order to speed things up. There is a way to do this - you simply avoid rounding a variable when it goes negative in the first place. Just add an integer value to it large enough that the variable will always be positive. Now do the rounding. Then subtract the same integer from it to return to the original negative value. Now you have rounded symmetrically without an extra (slow) condition. To round a number to integer value: _x = (_x + 0.5 - ((_x + 0.5) % 1)) Prospero
  13. Prospero

    They're walking

    Oooooooooooooooooooooooh. Please tell me if you managed to do this by "inheriting" animation from limb to limb!!!........................ Prospero
  14. Prospero

    Walking tanks, mechs, etc. read here!

    Yup it's a bummer. I have not been able to get what I will call "animation inheritance" to work either. And believe me, I have tried... I posted some stuff in a thread called "Scripted rotations" with my findings. I'm afraid it just backs up your own findings. Also topic "Animation phase - mils or radians?" Prospero
  15. Prospero

    American aircraft carrier

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (UKSubmariner @ Nov. 24 2002,15:45)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Prospero @ Nov. 24 2002,12:54)</td></tr><tr><td id="QUOTE">Right now, however, I'm concentrating on getting objects to move with objects when in contact with them. A static carrier is, for me, not very much fun.<span id='postcolor'> Could the Flashpoint engine actually support such a project?? This would be really pushing the envelope of it's limitations...<span id='postcolor'> It is possible, but there are limitations. Prospero
  16. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (jostapo @ Nov. 23 2002,16:47)</td></tr><tr><td id="QUOTE">Armed with that bit of knowledge, it would only make sense that some combination of CPP setting and model setting, could make a super sensitive model that will detect a player colliding with it.<span id='postcolor'> As Dinger knows, I have been using invisible spheres to sense collisions (and also as 3D triggers). The spheres are sim-type "motorcycle", side gamelogic, and have a mass of 1 gram. They vary in size from a few centimetres in diameter, to several meters. I typically poll them either for damage sustained, a change in direction, a change of position, or a change in velocity. Often it depends if one wants them to be "reusable" like a trigger which has been set to be activated repeatedly. I have yet to check how "sensitive" they are - i.e. whether I can trigger the Hit eventhandler reliably upon the slightest brush contact (having setPos'ed the sphere once and once only - not in a loop). Prospero
  17. Prospero

    American aircraft carrier

    Someone asked about catapults: There is no problem doing this with v1.85+. It takes all of one line of script to launch the thing (setVelocity), and a couple more lines of logic to ensure it's properly integrated into the game. Same thing for arrestor wires. (hint: use the velocity vector + attitude of the ship in your catapult script) The Kiev carrier model I've been (very slowly) importing into OFP handles both helis and aircraft. Indeed, you can take-off and land a Cessna or a DKM Bronco without any need for scripted trickery. You don't even need scripted wheelbraking - but it works nicely if you want to use such a feature. Right now, however, I'm concentrating on getting objects to move with objects when in contact with them. A static carrier is, for me, not very much fun. Prospero
  18. Hi all, What with a number of RTS mods being developed, I wondered if anyone's come up with an elegant way of taking a 2D screen cursor coordinate and translating this to a 3D world coordinate (whilst pointing at the ground *and* the air). I have come up with a limited, very imperfect way, but anyway... I thought I'd ask. A feature like this would help with overhead (C&C style) ordering of units via scripting. Edit: Ooops I should also have said one would also need to be able to do the reverse - i.e. get the 2D screen coordinate of any specified object. Prospero
  19. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Dinger @ Nov. 18 2002,19:42)</td></tr><tr><td id="QUOTE">Hi prospero. The ideal solution is of course to make the object itself the sensor. Â Barring that, we could "live with" a prosphere-type sensor createvehicled via init and positioned on top of the mine; At that point, we'd either have to use the "Hit" EH (Which would mean that crawling into it would cause at least 5% damage per collision) or if that causes MP problems (and this is really ugly) add it to the list of units to poll on all clients (<10 Hz) for damage. Making the object itself trigger is cool because then we don't double the number of objects, and for MP reasons, we need to be polling those objects anyway. Â Additional objects would be nice for later improvements (like editor- and player-placeable tripwires). Dinger<span id='postcolor'> Yup, it's a tricky one. Most of the stuff I do is for single-player. I don't have broadband out here. So, polling is good for me. Some kind of specific collision detection event handler would be good - sensing intrusion of one object's volume on another - that sort of thing. Prospero
  20. Prospero

    Doors open close (?)

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (brsseb @ Nov. 20 2002,23:05)</td></tr><tr><td id="QUOTE">You need to set up a custom animation. Basically you create a selection for the structure to swing ("back_door") in the viewable LODs and an axis in Memory lod (2 vertices, "axis_back_door"). Then there is some configfile editing. Go see a tutorial about custom animations. Should be one at www.ofpec.com (and even one at this very formun (the windmill-thingy)) brsseb<span id='postcolor'> Also add the door as a component in your Geometry LOD if you want it to push people out the way when moving. Prospero
  21. Prospero

    2s6m "tunguska" final release

    Very nice indeed. Good job. Prospero
  22. Prospero

    Jpg better then pac ?

    Even with the performance hit, this is good stuff. The "speckled" appearance of "standard" OFP textures has always been a bit of bugbear with me. Got a Radeon 9700 Pro coming in couple of days.. oooh I can't wait;) Prospero
  23. Yup. But I am looking for a solution which avoids having to do this from the map screen. Ordering units around via the map screen is.. well, not as good as doing it "live" in 3D. Prospero
  24. Yes, I am working on an aimable piss/poop script/add-on. Prospero
×