Home   Help Search Login Register  

Author Topic: Orienteering  (Read 757 times)

0 Members and 1 Guest are viewing this topic.

Barak

  • Guest
Orienteering
« on: 31 Oct 2003, 04:06:57 »
I'd like to create a mission, mostly for my own use, consisting of orienteering practice.  I want to scatter a small number of objects in random places around an island, mark them on the map, and then require the player to find them without any GPS help.

So I want to position the objects using the random function; I've got that much.  But I don't want them positioned in the water.  How do I tell if a position is over water or not?  I looked for a function to tell me the elevation of a position (if it's zero, I assume it's water), but I couldn't immediately find one.  Can I just place the object and then somehow query its elevation?  Or am I overlooking something obvious?

Thanks,
Barak

McFly

  • Guest
Re:Orienteering
« Reply #1 on: 31 Oct 2003, 04:58:40 »
There's an OverWater.sqf in the Editor's Depot...  I don't understand how it works, but you may want to try it.

http://www.ofpec.com/editors/funcref.php?filter_func=19

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Orienteering
« Reply #2 on: 31 Oct 2003, 13:44:18 »
When you insert an object using the Mission Editor you get a field called placement radius.     It appears as a circle on the map so you can make sure the object won't land in the sea.

You could also play with the probability of presence field, so you never know whether an object has appeared at all.

Plenty of reviewed ArmA missions for you to play

Barak

  • Guest
Re:Orienteering
« Reply #3 on: 02 Nov 2003, 22:54:35 »
There's an OverWater.sqf in the Editor's Depot...  I don't understand how it works, but you may want to try it.
Thanks.  I think I figured out how it works, and I used part of it.  Mostly it works; very occasionally I get objectives out in the water.

Now I have a couple of other questions.

I'd like to score the orienteering exercise based on speed of navigation.  Figuring the score is no problem; but how do I set it?  addScore is apparently only for multiplayer games; since I don't kill or destroy anyone or anything, I always end up with a score of 0.

Also, I've got things fixed so that objectives never appear inside buildings; I can do that with the nearestBuilding call.  Sometimes, though, they appear inside big rocks--you know, the ones roughly the size of houses?  There's the nearestObject call, but it requires an object type string; I believe the example given is "SwitchedOnLight."  Is there a list somewhere of the valid strings you can feed to this call?

I don't really need that briefing binder during the mission; I'd like to see more of the map instead.  Is there a way I can make it go away, other than just dragging it mostly off the screen with the mouse?  I tried showPad false; it doesn't work

Finally, in the Mission Editor, the briefing title (below the row of tabs and above the white graph-paper page) is "Orienteering."  But when I save it as a single mission, and go into it, the briefing title is "__cur_sp".  What am I doing wrong?

Thanks again...

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Orienteering
« Reply #4 on: 02 Nov 2003, 23:26:43 »
Commands time and adRating.    You'll need a simple little script that figures out how long the player has taken and adds rating points accoridingly.   I think that should work.

If you double click on the binder in the just the right place, at just the right time, with the right wind behind you and assuming the moon is in the correct phase, then it will shrink.    Actually you can disappear the binder with a line in your description.ext:-

showNotepad =  0

(If you're not sure how to do any of this stuff just ask :))    

To name the mission correctly go to the Intel Screen:  click on the funny cloud bit at the top right of the Mission Editor.


Plenty of reviewed ArmA missions for you to play

Barak

  • Guest
Re:Orienteering
« Reply #5 on: 03 Nov 2003, 21:10:38 »
Cool.  I'll try those next time I get a chance.  Thanks a lot.

One question I forgot.

When I arrive at an objective, I get a hint that says something like, "Objective 2: 5123.45m in 448.164s, averaging 11.4321m/s.  12.5269 percent under par: 3131.73 points."  When I depart for the next objective, I get something like "Your next objective is 2385.19m away, bearing 97.3982 degrees."

I would much rather have messages like "Objective 2: 5123m in 448s, averaging 11.4m/s.  13 percent under par: 3132 points." and "Your next objective is 2400m away, bearing 100 degrees."  Is there any easy way, either in the numeric or the string domain, to do something like that?

If nothing else, I suppose I can use multiplication and addition to exceed the available precision.  For example, if there are six digits of precision available, and I want to convert 2385.19 to 2400, I'd do this: first add half of what we're rounding to the nearest of...rounding to nearest 100, so add 50: 2435.19.  Then add 10,000,000, which ought to result in 10,002,435.19, except that that's ten digits of precision where only six are available; so it gets truncated to 10,002400.  So then I subtract my ten million back out, and I have my 2400.

The problem with this is that it's messy and hard to understand, for one: I'm sure OFP has many, many more than six digits of precision.  For another, I'll bet the arithmetic is done in binary, and onlly represented in decimal, so the number of decimal digits of precision won't be a whole number.  I could drag out Knuth's Seminumerical Algorithms and figure out how to do the rounding in binary, but I want round decimal numbers, not round binary numbers.  2432 may be much better-looking in binary than 2435.19, but it's not appreciably better-looking in decimal!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Orienteering
« Reply #6 on: 03 Nov 2003, 22:11:21 »
lol relax, it's really easy.    You need the command mod - I've put an example in the online command ref in the Ed Depot.
Plenty of reviewed ArmA missions for you to play

micropilot

  • Guest
Re:Orienteering
« Reply #7 on: 10 Nov 2003, 21:10:23 »
This missions sounds very interesting to me.  How about posting it here so I can try it out!!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Orienteering
« Reply #8 on: 11 Nov 2003, 01:39:01 »
Posting a mission here is the right and proper thing to do if it will help solve a particular problem.   In practice, it is usually more helpful if the mission designer isolates the problem and posts a partial mission with just the relevant bits.

Once a mission is basically functional the right place to post it is the beta testing board.  (Make sure you read the sticky topic by yours truly at the top of that board telling you how to post.)   Barak, it sounds to me like you already have your first beta tester lining up...
Plenty of reviewed ArmA missions for you to play