Home   Help Search Login Register  

Author Topic: [ACCEPTED] Detect Position  (Read 3898 times)

0 Members and 1 Guest are viewing this topic.

Offline Cheetah

  • Former Staff
  • ****
[ACCEPTED] Detect Position
« on: 17 Aug 2006, 23:48:43 »
After reading through several topics about a command that checks if a unit is prone and seeing no good answer, only some work in process I decided to give it a try myself. I think that I did it and created a method to detect if a unit is going prone, crawling or running.

That's why I introduce to you: DetectPosition by Cheetah.
The zip file contains a demo mission, that is a good thing to start with after reading the readme. It shows you a bit of the process I went through to get to this method. As well as some other things that I examined in order to make my script / function for several problems about getting a unit's position.

Now, as always with operation flashpoint, you can never be sure if something really works, that is in every case. I hope that I have achieved to create a bugfree way to detect a unit's position. But, I need you guys to help me test and improve my method.
There's still several things that need work. The functions do not check if a unit is in a vehicle or not, thus resulting in a false output for the isRunning function. You can script a check for this yourself, but in a next release you can expect an automated check for this.

The readme tells all you have to know, I think :).
Please contact me if you find a bug, especially if it's in the goesProne check.
« Last Edit: 04 Sep 2007, 09:24:44 by bedges »
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Detect Position
« Reply #1 on: 18 Aug 2006, 12:36:47 »
After reading through several topics about a command that checks if a unit is prone and seeing no good answer...
As a reference BETA testers will find these threads here and here.
« Last Edit: 18 Aug 2006, 12:40:32 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Detect Position
« Reply #2 on: 18 Aug 2006, 14:16:22 »
 :thumbsup:

I played the mission, and when it started I was thinking. "Hmmm, has he done it?  :scratch:".

This works for stand > prone all the time. I tried loads of things to try and make it not see that ive gone prone, and... its impossible to what I have tried  :D . I've been trying for a while now

To what I can see, its impossible to detect if unit crouches ? At least progress is made ;)

Good job ;)

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Detect Position
« Reply #3 on: 18 Aug 2006, 14:31:05 »
Judging from JasonO's comment you're heading for the hall of fame. This is a groundbreaker if it works. I wish i had some testing opportunities.
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Detect Position
« Reply #4 on: 18 Aug 2006, 14:36:39 »
I haven't tried it....I just don't seem to have the time lately for things like this.

But, if it can detect with certainty whether a unit is standing or prone, surely if it is neither standing or prone then it must be crouched.........or a vehicle.


Planck
I know a little about a lot, and a lot about a little.

Offline Cheetah

  • Former Staff
  • ****
Re: Detect Position
« Reply #5 on: 18 Aug 2006, 15:42:17 »
I'm going to make a script/function method to detect the crouching. Probably the going into crouch, because it's pretty failsafe in my opinion. And if you know when a unit crouches, you know enough. Will start to make solutions to detect if a unit goes from prone to stand and crouch to stand later on. But of course, all of these have to be tested thoroughly. That's why I'll put it here every time I have completed a (for me) working function (/ +script).

EDIT: Have started with making the goesCrouch function and it works when the player is on flat terrain, but as most of you probably know, this is pretty easy to reach. The hardest part is still to come, making it work if you're on a hill and then crouching. Don't know if it works if you run and crouch, will have to test this and probably include this later. But, I think that the goesProne one is more important, if that one works it should be possible to make something for crouching too.

EDIT1: Okay, I've finished the first version of the goesCrouch function. The first post does now include the DetectPosition1.01 file, which is the newest version. It includes the goesCrouch function with script for use in a mission as well as a test mission that will allow you to help me with debugging the goesCrouch function. But I would prefer it if you guys could test goesProne first, as that might be the key to victory over the OFP engine in the detection of a unit's position.

I've updated the readme, be sure to read the last part, 12. NOTES. It tells you something about this new version, especially about the goesCrouch function. If you want to help me with improving these scripts/functions the best way to start is to start testing the goesProne function with the help of the demo mission: goesProne.Intro. I'd like to know what you want to have included included in a next release. If you know what functionality you want to have included in future versions, send me a message, either a mail or IM/PM on this forum. Or you can put it together with other feedback in a post in this topic.

Hope that I updated you guys enough, if not, you might want to read the readme to find what you're looking for, or else you can always contact me. You know how.

EDIT2: Found an interesting reply by h- (hater_kint):
Quote
I mean, if someone has gone prone like 56 minutes ago and you want to check whether he is still prone?
No can do with this method, not with the optimal way..
And still the crouched stance would be missing...

You will now be able to do this, well there's a function to check crawling included in my pack, but that still isn't a very good way of solving the problem. Well at least we can try to make it work as good as possible.
« Last Edit: 18 Aug 2006, 23:54:15 by Cheetah »
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Detect Position
« Reply #6 on: 19 Aug 2006, 17:20:19 »
Great stuff, I must get into checking this as soon as possible..  :good:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline rhysduk

  • Former Staff
  • ****
Re: Detect Position
« Reply #7 on: 01 Sep 2006, 04:00:40 »
This is great work Cheetah!

Only one thing though, the text that appears after the Civ is given the M16 is way too fast for people to read!

Keep it up :good:

Rhys
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Offline Cheetah

  • Former Staff
  • ****
Re: Detect Position
« Reply #8 on: 02 Sep 2006, 00:06:58 »
Hoping for some test results of people, as I still couldn't find a bug in the prone script/function. Will fix the little error then in the next version :). Thanks to all for testing / responding to this topic.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Detect Position
« Reply #9 on: 02 Sep 2006, 18:34:54 »
Ah yes, never had the time (or just did not remember) to post here..

Umm, no problems for me although my tests were quite quick..
I myself just don't like the implementation at all, I would like this to be done with one single function, not with looped sqs etc. stuff but I guess that is just not doable..

One thing is that does this work in MP?
Use of global array (TRG_units) may cause some additional annoyance concerning MP side..
Currently only the client that the unit is local to would return the correct stance while other clients would not (right ???)..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re: Detect Position
« Reply #10 on: 07 Sep 2006, 21:33:22 »
Is this a development of my way? I have a bit of time pressure here so I haven't gone through the scripts. If so, I told ya someone would develop it further! Take that for being pessimistic, OFPEC! :D

I will try this out tomorrow and give you some comments. :)