Home   Help Search Login Register  

Author Topic: knowsabout and reveal: A question or two.  (Read 633 times)

0 Members and 1 Guest are viewing this topic.

Baphomet

  • Guest
knowsabout and reveal: A question or two.
« on: 27 Feb 2003, 01:24:44 »
I was considering the use of the knowsabout as well as the reveal command. However I've got questions about the two of them.

How does the knowsabout command work? Can it be placed in a statement starting with a question mark? Such as: ? helo1 knowsabout leader : goto "reveal". At this point it's all conjecture since I don't really know what either of these things are capable of, I want to be able to test a whether a unit is aware of another unit and then essentially broadcast the position to other units using the reveal command. Like a lookout or a spy...  or something.

I've yet another question however. What does the reveal command really do? Does it simply make the groups/units aware of that or if the revealed object is hostile, will it move to attack? This is important in determining whether or not I'm not the right track.


As always, helpful opinions and information are greatly appreciated.
« Last Edit: 27 Feb 2003, 01:30:00 by Baphomet »

wi77ard

  • Guest
Re:knowsabout and reveal: A question or two.
« Reply #1 on: 27 Feb 2003, 03:37:10 »
hiya,

I've just started playing with the knowsabout command

i have used it in a statement like this:

unit_one knowsabout unit_two >2 : goto "knows"

the >2 means more than 2, as the command returns a number between 0 and 4.
0 = unit doesnt know about other unit at all
1 = ?
2 = ?
3 = ?
4 = knows alot about the unit (not quite sure like what tho, perhaps his address or something)

I've used 2 for midrange and its worked really well.


as far as i know the reveal command just lets units knowabout other units, i dont think they take action, but i'm not sure.

Hope this helps somehow

wi77ard

Baphomet

  • Guest
Re:knowsabout and reveal: A question or two.
« Reply #2 on: 27 Feb 2003, 19:53:06 »
Thanks for clearing that up. I should have looked better in the comref, it makes sense now. It returns a number. Stupid me.  ::)

I'm still confident I can still do something with this despite the fact that reveal might not impel them to whup some arse. Wish me luck. =P

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:knowsabout and reveal: A question or two.
« Reply #3 on: 27 Feb 2003, 20:51:33 »
A clarification on these command for you...

Reveal will reveal a unit's type and position, and I believe the command also reveals some other data such as the unit's direction and how fast they are moving.

If unita reveals unitb, then the "unita knowsabout unitb" will jump to 4 immediately.

If unita can't see unitb, "unita knowsabout unitb" will steadily drop back to 0.

A real life comparison...

Imagine if you saw a man 50m away from you, running North . Your "knowsabout" for him would be 4. Now, if the man ran behind a house and out of your sight, your "knowsabout" wouldn't immediately move to 0 - you would still have an idea of where he is (after all you saw which way he was running and how fast), but as more time went by without any sight of the man, you would be less sure of his position.

From my experience, this is how knowsabout and reveal work in the game.
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

Baphomet

  • Guest
Re:knowsabout and reveal: A question or two.
« Reply #4 on: 27 Feb 2003, 22:47:44 »
Well hm. Here's what I've got so far. It's a bit sloppy since I'm still getting used to all this.

#start
? helo1 knowsabout leader >1 : goto "detect"
~3
goto "start"



#detect
~3
TitleText [format["Detected"], "PLAIN DOWN"]
~3
alpha reveal leader
~3
? alpha knowsabout leader >1 : goto "order"

goto "start"

#order
~5
alpha Move (getPos leader)
goto "start"

Thanks for the info Toadlife. It seems that the group will move to the last known position. Which is ok. I don't really need them to be psychic. Only I tried using the unit domove command and only the leader would move. I would assume the squad would follow, but it didn't.

Now, the group move command is ok, however will they know to attack if they see their quarry. Or will they just trundle up to it as they get cut down with bullets? A command to move and attack for the group would be better. Only I haven't seen something like that in the comref.
« Last Edit: 27 Feb 2003, 22:56:29 by Baphomet »

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:knowsabout and reveal: A question or two.
« Reply #5 on: 27 Feb 2003, 23:06:36 »
dommove and commandmove are commands designed for single units only. In the game, if you commanded "unit1" to move to "position1", it would be EXACTLY like doing this in a script....

unit1 commandmove position1

The domove does the same thing as commandmove, only without the radio being used.

The "move" command is designed for groups, and actually creates a move waypoint for the group it is used on.

As for your question about weather or not they will know to attack...unless they are set yo "hold fire", ai units should attack any enemies they see.

Maybe you should have a look at my grouplink script in the ed depot.
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.