Jump to content
Sign in to follow this  
Spitfire

Vtol script available

Recommended Posts

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (GAMEER_77 @ Oct. 15 2002,21:18)</td></tr><tr><td id="QUOTE">So Prospero, is the "ProSphere" an application? Or is it using code from OFP itself? Please tell us more because im racking my brains as to how your doing this.  sad.gif<span id='postcolor'>

It's embarrassingly simple. When you see it, you'll kick yourself. I don't mean to be a tease, but I just want to get it as good as possible before releasing it.

It's simply a script, well, set of scripts. It is not a hack.

Prospero

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Prospero @ Oct. 15 2002,22:33)</td></tr><tr><td id="QUOTE">It's embarrassingly simple. When you see it, you'll kick yourself. I don't mean to be a tease, but I just want to get it as good as possible before releasing it.

It's simply a script, well, set of scripts. It is not a hack.<span id='postcolor'>

You sure have a way to make it sound like an exe-hack wink.gif

I should be studying for an exam right now and currently all I can do is to think how you have done it. wink.gif

So it's your fault if I don't pass the exam. tounge.gif

Share this post


Link to post
Share on other sites

If it's 1.85 only, then its utilising the new commands, yes? But with the old version, i can't imagine how this would be possible with the severe lack of mobility with them.

Some of the new commands sound like they'd be of use here. wow.gif

tounge.gif PEACE

Share this post


Link to post
Share on other sites

I would like to know how you are doing this also, I doubt it is that simple.

RED

Share this post


Link to post
Share on other sites

COuld you make a version with out the addons.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (edc @ Oct. 16 2002,01:13)</td></tr><tr><td id="QUOTE">COuld you make a version with out the addons.<span id='postcolor'>

Actually it doesn't need any addons. I just scrolled through the mission.sqm and realized that it had some "left-overs" in the addons-department so the game thought it needs the addons. Now there is an addon-free mission-file.

@Doolittle:

Sure, it's possible to simulate faster fuel consumption in the script. It can be added to future versions.

Share this post


Link to post
Share on other sites

so when is the osprey with the script included in it gonna be released? tounge.gif

Share this post


Link to post
Share on other sites

Yes, i want it too, but, gentlemen, you should talk to ColKlink, because he had benn looking for a way to implement the harrier to the game for a while, and this is a promising way!!!

Share this post


Link to post
Share on other sites

My Osprey will be relased if the patch 1.85 for polish OFP:R version and vtol sqs will be relased.

There is some new pics from V-22 Osprey at the LSD chip and in air with new camouflage textures and some new features like engine rotating.

http://www.ofp.klubwww.pl/V-227.JPG

http://www.ofp.klubwww.pl/V-228.JPG

http://www.ofp.klubwww.pl/V-229.JPG

http://www.ofp.klubwww.pl/V-2210.JPG

http://www.ofp.klubwww.pl/V-2211.JPG

http://www.ofp.klubwww.pl/V-2213.JPG

http://www.ofp.klubwww.pl/V-2214.JPG

http://www.ofp.klubwww.pl/V-2215.JPG

Sorry for bad English.

Share this post


Link to post
Share on other sites

The Osprey looks very nice. Well done. I look forward to flying it:)

My controller script is being tweaked to take advantage of the new features in v1.85. But I'm not going to promise anything before the weekend. I want it to be absolutely bullet-proof and as efficient as possible.

Prospero

Share this post


Link to post
Share on other sites

The controller script uses slight rounding of numbers to smooth things along. At the moment, I use this sort of thing:

_x = (_x + 0.0005 - ((_x + 0.0005) % 0.001))

But it isn't perfect.

Anyone got something better? Really would help speed things along...

Prospero

Share this post


Link to post
Share on other sites

That modulus is probably the only way to round numbers.

The only way to get random integer numbers would be:

number = Random (1000);

roundednumber = number - (number % 1);

This is not perfect, as you said. Cropping decimals is not rounding. So you'll have to a third line:

?(number & 1) >= 0.5 : roundednumber = roundednumber + 1;

If I'm not mistaken, this kind of rounding works as it should. I'm using this in a script of mine but actually I haven't truly tested if it gives the correct output wink.gif

Share this post


Link to post
Share on other sites

Well, what I was getting at is this (I should have explained it better):

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 really 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.

Any ideas, chaps?

Prospero

Share this post


Link to post
Share on other sites

I use this for a timer script...dunno if it will help:

TimeRemain=(Timeremain+.05)-((TimeRemain+.05) mod 1)

Actually I think it's the same modulus, just written differently.

Share this post


Link to post
Share on other sites

You guys are geniuses. This has been a problem that has boggled me for a while. Thanks. I'll test it out on the harrier.

Cheers

Klink

Share this post


Link to post
Share on other sites

Hey, well seen now this topic and ask myself......

well I have Addons with Harriers. VTOL and normal Planes in diffrent camoflage.

Downloaded them ages ago. But nice work guys.

I am working an the script if planes get damaged they start to drag flames and smoke behind it.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Prospero @ Oct. 16 2002,23:29)</td></tr><tr><td id="QUOTE">Well, what I was getting at is this (I should have explained it better):

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 really 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.

Any ideas, chaps?

Prospero<span id='postcolor'>

To answer my own question:

Yes 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.

Nice eh?

Now you can round symmetrically without an extra (slow) condition.

The controller script should be ready Sunday. I have one further question:

Here's a typical cameraEffect command:

mycamera cameraEffect ["internal", "back"]

Can the cameraEffect command be used with options like "gunner" and "driver" though? I've tried, but the game seems to like crashing;)

If I do something like this (where aP is the name of a soldier)...

aP cameraEffect ["internal", "back"]

... the camera is placed at the soldier's feet. That's no good!smile.gif

Prospero

Share this post


Link to post
Share on other sites

Spitfire:

What will be the final mode of control the VS/TOL phase of the plane with your script? It will be via keyboard or via actions menu as now?

Klink, żAre you going to release the Harrier to let us play with it? (If not, mail me with your direction and i will spam your mail till you do biggrin.gif (just joking... maybe)) wink.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Viriato @ Oct. 17 2002,19:41)</td></tr><tr><td id="QUOTE">Spitfire:

What will be the final mode of control the VS/TOL phase of the plane with your script? It will be via keyboard or via actions menu as now?<span id='postcolor'>

If Prospero's ProSphere can do even half of what he is promising, I'll definitely make it use keyboard as the controller  biggrin.gif

Share this post


Link to post
Share on other sites

Hey guys I have question is it possible to include the script in the addon the pbo file I mean?

If yes coooooool if not maybe BIS can make a patch so you can make script and include it in your pbo file that would be nice and easy to use wink.gif

So can someone of BIS reply to this and tell us if it is possible to include your script in pbo file or make in the upcoming patch this option avaible?confused.gif???

Share this post


Link to post
Share on other sites

YES, it's possible.

Keg made a AGS19 grenade launcher with an "attach" script included on the addon, inside the .PBO, so, whenever you want to activate the scritp you dont have to copy the script to your folder.

Is possible to implement the script directly on the addon so, its working without "calling" the script on the unit init line?

Share this post


Link to post
Share on other sites

Spitfire said: "If Prospero's ProSphere can do even half of what he is promising, I'll definitely make it use keyboard as the controller."

Believe me, this isn't vapourware:)

I think I may have to give myself an extra week though to polish it. Right now the axes all work perfectly (and identically, regardless of your PC's performance), but it needs a 3D graphical setup mode, so that you can have visual feedback on exactly how the axes are responding - looking at a set of rapidly changing numbers and the incessant beeping of the Hint command run at a high rate aren't.. well.. cricket.

The other thing I need to do is to get the Player MoveLock toggle (the E key - when ProSphere is enabled) working on the press of the key, rather than the release. It's little things which make a big difference.

So, I'm going to be generous to myself and say NEXT Sunday, not this coming Sunday.

Prospero

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Prospero @ Oct. 19 2002,01:09)</td></tr><tr><td id="QUOTE">I think I may have to give myself an extra week though to polish it.<span id='postcolor'>

You're teasing us on purpose! mad.giftounge.gif

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×