Prospero
Member-
Content Count
478 -
Joined
-
Last visited
-
Medals
Everything posted by Prospero
-
Method to move with objects that are moving
Prospero replied to Prospero's topic in OFP : MISSION EDITING & SCRIPTING
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Doolittle @ Nov. 04 2002,16:45)</td></tr><tr><td id="QUOTE">But this would mean say, standing in a boat and shooting around? Â Or standing inside a helicopter and shooting & throwing stuff?! Â That would be awesome! Doolittle<span id='postcolor'> Both. Prospero -
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
This is a sample from something I'm playing about with. It isn't supposed to be a working script, but you can extract from it what you want to do, Lt_Damage. ---------- PSg = "logic" camcreate [0, 0, 0] #lp _ps = PS PSg setpos [(getpos player select 0), (getpos player select 1), 0] PSd = PSg distance player _dx = (cos(getdir player) * (_ps select 0) + sin(getdir player) * (_ps select 1)) _dy = (-sin(getdir player) * (_ps select 0) + cos(getdir player) * (_ps select 1)) ?(PSd >= 0.05): player setvelocity [_dx * 5, _dy * 5, (velocity player select 2) - abs(_ps select 2) * (velocity player select 2) + 5 * (_ps select 2)]; player setdir getdir player + (_ps select 5) * 5 ~0.0001 goto "lp" ---------- -
Making throwing grenades easier
Prospero replied to Prospero's topic in OFP : MISSION EDITING & SCRIPTING
Yup the prob with the Action Menu is it's ruddy slow, and the order of the actions presented changes so you can't use automated macros (which is otherwise what I'd suggest). There are some inelegant work-arounds - like addActioning a custom eject action so it'll always be first in your Action Menu list, but.... that's about it as far as I know. Prospero -
Help with satchels
Prospero replied to 160th(SOAR)LoNeWoLF's topic in OFP : MISSION EDITING & SCRIPTING
Warning: totally speculative post. You might try using addWeapon (or whatever - I've never played with this) to give a gamelogic a satchel charge, then use the logic to lay the charge and touch it off. This is totally speculative - hasn't more than a 0.1% chance of working, but hey, there you go. Prospero -
Setvelocity - think of it as "addvelocity"
Prospero posted a topic in OFP : MISSION EDITING & SCRIPTING
It's worth bearing this in mind: The setVelocity command is pretty awesome. It helps to think of it though as *adding* velocity on to the velocity which the OFP game engine would otherwise assign to an object. Edit: Oops this came out a bit wrong - what I meant was that it can be very useful when you use it to add on velocity (relative) compared to setting a velocity (absolute). Prospero -
It works. I've just been working on other things for a bit. There are only so many hours in a day. Plus I need to do some work on proxy objects - see thread in O2B. Prospero
-
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
Here's a rather nice consequence of my jump script - and completely unexpected. I was experimenting with big jumps and using ProSphere to do "aftertouch", and found I can make it so you can walk round on roofs (without Roadway LODs) now without jerking about like one used to. I spose it's obvious in hindsight, but still... Now I just need to be able to shoot webs. Prospero -
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Kegetys @ Nov. 03 2002,06:33)</td></tr><tr><td id="QUOTE">but if you are just trying to be able to use setvelocity on a regular soldier, it works fine after you setpos him a bit to the air first.<span id='postcolor'> My own shit parrot fashion. Cheeky. Prospero Edit: I think the (temporary) solution here is to do two versions of jump: 1) With this version, you can basically jump off anything with a Roadway LOD. This is simple and easy, and therefore 100% reliable and fast. 2) With this version, you can jump off objects whose surfaces are not Roadway LODs. The roof of a jeep would be an example. This is hard (at least, it is for me), and I can't do it 100% reliably. Yet. "Aftertouch" is down to ProSphere in both cases, at least for now. I'll post version 1 of the jump thing shortly. It will just be jump - no "aftertouch". Unless peeps want to do "aftertouch" themselves it'll be a matter of waiting for the non-BETA version of ProSphere. Prospero Edit: Hehehe I've got one version of jump where you can jump up and stick to walls. Very spiderman. -
Counterstrike is still (quite:)) popular and how old is Half Life? Additionally, I suppose one could say that experience learned by modding OFP1 might put one in good stead for OFP2. Mind you, I could be talking utter bollocks. It has happened. Prospero
-
Counterstrike is still (quite:)) popular and how old is Half Life? Additionally, I suppose one could say that experience learned by modding OFP1 might put one in good stead for OFP2. Mind you, I could be talking utter bollocks. It has happened. Prospero
-
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
Yes, but it's a matter of getting a "jump" thing going. I.e. One must only allow a jump when one is actually in contact with a surface (Roadway LOD or no Roadway LOD). That's what's frying my brain at the mo;) Otherwise you can keep jumping until you're up to the stars! My way of doing this (which is working, but not fully tested) is by using an add-on. I'm trying to find a better way. Prospero -
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
OK, it's possible, but it seems you'll have to use a tiny little add-on object. I'm trying to find a way of not using an add-on, but I suspect there is no other way. Prospero -
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
On the jumping: I'm just going through a bit of a inner colloquy;) The jump script needs to be able to sense if you're standing on an object to work properly, and how high the surface of the object on which you're standing is. It's not a big deal as I've got a couple of ways to do this, but it's taking a little longer than I expected, though I still hope to have it out tonight, and bullet-proof. Funny (but yet totally logical) things happen with objects with Roadway LODs. Edit: God, this is taking time. I think I've solved it - the problem has been allowing jumping off objects that DON'T have a Roadway LOD. This is going to take a little while longer, but as I say, I believe it's still on. Prospero -
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
Damn it. I may just have sussed a way to do the "aftertouch" with considerably less overhead than is currently used by my ProSphere thingy. Not sure, need to test. Funny what one dreams about in bed. Prospero -
OK, I'm not sure if this is right, but I've been meaning to try it out and just haven't got round to it: If you're using a "custom" helicopter anyway, you could try changing the "precision" setting in the config.cpp. I haven't a clue about this, as I say, but I've suspected for a while now that "precision" determines how "precisely" a vehicle will move to a defined waypoint. No guarantees. It probably won't work. And it may screw up how the helicopter flies during other waypointed movements. Prospero
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (vader_21vb @ Oct. 31 2002,23:41)</td></tr><tr><td id="QUOTE">I'm very new in codeing cpp files for object and have a simple (maybe stupide Q): I have a Working Door on a building, and like to add a sound for Open/Closeing the door. Have anyone seen this done? I allso plan for a DoorAlarm sound triggering on OpenDoor Only! My first try: class OpenDoors1 { displayName="Open Big MF Door"; position="osa_dvere1"; radius=5.5; sound[]={"\myaddon\sound\DoorOpen.wav",0.000500,1}; condition="this animationPhase ""Dvere1"" < 0.5"; statement="this animate [""Dvere1"", 1]"; };<span id='postcolor'> You can do it in a script, but not (I believe) in a config. Well, maybe there's a way with event handlers, but... ah it's too late, and it's Friday night;) You could "sense" the animation phase and get the door/building/a gamelogic placed at the door's position to "say" the creaking noise. Prospero
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (vader_21vb @ Oct. 31 2002,23:41)</td></tr><tr><td id="QUOTE">I'm very new in codeing cpp files for object and have a simple (maybe stupide Q): I have a Working Door on a building, and like to add a sound for Open/Closeing the door. Have anyone seen this done? I allso plan for a DoorAlarm sound triggering on OpenDoor Only! My first try: class OpenDoors1 { displayName="Open Big MF Door"; position="osa_dvere1"; radius=5.5; sound[]={"\myaddon\sound\DoorOpen.wav",0.000500,1}; condition="this animationPhase ""Dvere1"" < 0.5"; statement="this animate [""Dvere1"", 1]"; };<span id='postcolor'> You can do it in a script, but not (I believe) in a config. Well, maybe there's a way with event handlers, but... ah it's too late, and it's Friday night;) You could "sense" the animation phase and get the door/building/a gamelogic placed at the door's position to "say" the creaking noise. Prospero
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (vader_21vb @ Oct. 31 2002,23:41)</td></tr><tr><td id="QUOTE">I'm very new in codeing cpp files for object and have a simple (maybe stupide Q): I have a Working Door on a building, and like to add a sound for Open/Closeing the door. Have anyone seen this done? I allso plan for a DoorAlarm sound triggering on OpenDoor Only! My first try: class OpenDoors1 { displayName="Open Big MF Door"; position="osa_dvere1"; radius=5.5; sound[]={"\myaddon\sound\DoorOpen.wav",0.000500,1}; condition="this animationPhase ""Dvere1"" < 0.5"; statement="this animate [""Dvere1"", 1]"; };<span id='postcolor'> You can do it in a script, but not (I believe) in a config. Well, maybe there's a way with event handlers, but... ah it's too late, and it's Friday night;) You could "sense" the animation phase and get the door/building/a gamelogic placed at the door's position to "say" the creaking noise. Prospero
-
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
OK, I'm not going to post the simple jump script tonight because I want at least a day to test it fully. It's working very well, but there's just a couple of tiny things which I want to get perfect. Plus I've had way too much Chardonnay;) So, it'll be tomorrow night. Btw, I'm trying to make it as Quake-ish as possible, but as I've said, you'll need ProSphere to get "aftertouch" working. Edit: I also want to decide on an appropriate height for the jump. I'm thinking one meter might be appropriate - if you time it right. I'd appreciate some feedback, because this might need an agreed "standardizing". Prospero -
Hi all, Is it possible to get OFP to read in (at something like perhaps 50 Hz, or approximate frame-rate) a small amount of data (say, at least 512 bytes) generated from an external application? Either an external application running on the same PC, or a separate PC over a network? Prospero
-
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Doolittle @ Nov. 01 2002,17:57)</td></tr><tr><td id="QUOTE">Cool thinking Prospero! Â But what does AGL mean? Â Angle?? Doolittle<span id='postcolor'> AGL = Above Ground Level. Prospero -
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
If no-one else bothers, I'll post a (player soldier) jump script later this evening (jump using setVelocity). I want it to be bullet-proof before releasing it even if it is extremely simple. Edit: (much later, whilst reading back on the thread) Why the hell did I say it was "extremely simple"? I'm such a fool! Shut your mouth Prospero and never darken my doors again. Edit: In view of this, I'll also be adding an implementation of jump to ProSphere Lite in the upcoming (one week) non-BETA version. There are a couple of other useful features too. You can direct ProSphere to get the yaw, pitch and roll of any object and also the location (xyz) of an object in a specified vehicle's body frame coordinate system. Further edit: Using ProSphere to jump allows you to use "aftertouch" - i.e. you have control whilst you're in the air. You can also twist whilst in the air, but I'm afraid you'll have to use keys X and C rather than the mouse. But actually.. this is better because you can't twist in real life - what's the view - do you want twist in the air or not? Prospero -
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
It's your lucky day;) I've got it to work. And this also means you can make soldiers jump now. Edit: And do HALO-type stuff. Yep you can fire your gun as you fly through the air;) The trick is to just raise the player into the air (by a tiny amount) using a setPos. Then use setVelocity on him BEFORE his height AGL falls back to 0. It'll now work. I, quite frankly, rock. Prospero Edit: Ooooooh and jetpacks;) Me like. -
Setvelocity to a specific point... physics? (argh!
Prospero replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
I could be wrong (hey it's happened), but my experiments lead me to believe that setVelocity is going to be a bit unreliable here because it doesn't work on the player as a soldier. So I don't think it'll work, but let's say it did. All you'd do is take the position of the player and take the position of the centre of the map and subtract one from t'other. Then use the resulting 3D vector multiplied by some scalar as the argument for a setVelocity command. The scalar would effectively set your "speed". Note that (to be absolutely proper about it) you'd need to find the absolute Z (height) coordinate of both the positions, rather than the height AGL. For the most accurate way of doing this, see my ProSphere scripts (shameless self-promotion, I know - but I don't care). Prospero -
Is it possible to make ofp access...
Prospero replied to Prospero's topic in OFP : MISSION EDITING & SCRIPTING
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (BOPMatt @ Oct. 30 2002,19:18)</td></tr><tr><td id="QUOTE">So if your application is writing some sort of script or a set of values (by assigning variables) I don't see a problem: Let's say you want to make your missions always use weather and daytime-settings corresponding to your region and you have a script (or application) running that is able to extract that data from somewhere. So you could periodically (say every minute) generate an ascii-file, e.g. "set_conditions.sqs", looking like this: 60 setOvercast 0.3 60 setRain 0.7 60 setFog 0.2 skipTime (19.2 - daytime) Where 0.3,0.7 and 0.2 are the "real-world" values inserted by the application and 19.2 is the current time in hours (though that skipTime-call would make more sense if executed only once in "init.sqs"). Of course your application needs access to the same machine that is running OFP (well, network-drives/shares may work too ... haven't yet tested that) and you'll have to store that script "outside" the mission file itself so you could have a trigger with a timeout of 60 seconds and this in the init-field: [] exec "../dynamic_scripts/set_conditions.sqs" (as I mentioned before I use this method to store my custom .ogg-files in a dir called "SoundBank" so I can change them on the fly, reuse them and keep mission-pbos small and flexible) exec, loadFile and preprocessFile will all work (regarding their special requirements) and always get the current (updated) file though imho preprocessFile was implemented to avoid permanent and recurring file access <span id='postcolor'> BOPMatt, I've set up a RAMdisk as s: What would one specify in terms of the root pathname to get a file (let's call it input.sqs) to run from this drive? I've tried the following, but OFP says it can't find the file: [] exec "s:\input.sqs" Help much appreciated;) Prospero