Home   Help Search Login Register  

Author Topic: Hide  (Read 989 times)

0 Members and 1 Guest are viewing this topic.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Hide
« on: 01 Sep 2005, 18:10:09 »
I have a pilot that gets shot down. I have no control over where he comes down.

When he hits the ground I want him to take cover. Unfortunatley he just sits there. I've tried the Stealth command but it doesn't work.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Hide
« Reply #1 on: 01 Sep 2005, 18:12:45 »
Could you fake it by using nearestobject to find the nearest bush?   And then telling him to go here and lie down?   Messy at best I know.
Plenty of reviewed ArmA missions for you to play

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Hide
« Reply #2 on: 01 Sep 2005, 18:36:21 »
I don't understand the command.

I say,
nearestobject [Pilot1, ?]

Pilot move ?

What do I put in there in the place of the question marks? There are hundreds of bushes in the area.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Hide
« Reply #3 on: 01 Sep 2005, 19:27:29 »
what you're looking for is a type of bush. there could be hundreds, but there may only be a handful of types. unless the area you're talking about consists of an entire island, make a scout missionette with the neatestobject command linked to a hint which gives the type of object.

here's a wee script that will help out

Code: [Select]
#loop

_color= [[0.8,0.8,1,0.3],[0.8,0.8,1,0.6],[0.9,0.9,1,1],[1,1,1,0.5]]

drop ["halflight","","Billboard",2,1.5, [0,5,1],[0,0,0],0,1.275,1,0,[0.5,0.75,0.1],_color,[0],0,0,"","",player]


hint format ["%1", nearestobject [(getpos player select 0) + (5*sin(getdir player)), (getpos player select 1) +

(5*cos(getdir player)), getpos player select 2]]

~1

goto "loop"

whatever types are thrown up in the hint, take a note of them. then in your 'hiding' script, use

Code: [Select]
_obj = nearestobject [loon_name, bush_type]
loon_name domove getpos _obj

you could incorporate a loop through an array of all possible bush types and find which is the closest of them too. just remember there's only a 50m radius for nearestobject.
« Last Edit: 01 Sep 2005, 19:34:14 by bedges »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Hide
« Reply #4 on: 01 Sep 2005, 22:13:37 »
Hmmm.......Unfortunately no bushes have classnames.



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

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Hide
« Reply #5 on: 01 Sep 2005, 22:20:37 »
How about creating a bush near where he lands and send him there?  Unless the player might see that is.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Hide
« Reply #6 on: 02 Sep 2005, 12:41:07 »
Could I create trigger boxes and send him to a different location depending on what box he lands in?

I have an idea but I'm not sure about it.

My target is in the middle in a box. There are four boxes around the centre target box. If he lands in any of the outside boxes that's fine, he'll get sent to a pre-defined bit of cover within that box. If he lands in the centre box, I'm not sure what to tell him. I can't do away with the centre box because I don't want him walking through the target area on the way to his hide location.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Hide
« Reply #7 on: 02 Sep 2005, 13:44:19 »
which is a pretty good idea.



if the loon lands in the target box near to the objective, then as with reality, he may well get spotted and torn to bits, or he may well survive. as per the picture, he will always be in one of the four surrounding target boxes, and depending on that, you tell him where to hide...

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Hide
« Reply #8 on: 02 Sep 2005, 14:10:17 »
Rather than triggers and boxes why not just check his distance from a few of the inbuilt objects on the map.  From that you could customise how he reacts down to the finest detail where it is important.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Hide
« Reply #9 on: 02 Sep 2005, 18:32:00 »
Done. It's working well. The guys sccots off towards his hiding place nicely. Thanks fellas.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."