Home   Help Search Login Register  

Author Topic: Sniper positioning  (Read 2130 times)

0 Members and 1 Guest are viewing this topic.

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Sniper positioning
« on: 03 Jan 2006, 22:04:42 »
It's been ages since my last post!  :)  I'm getting back to mission making and I can't remember the way you elevate snipers either in towers or say on a building....lil help please

bored_onion

  • Guest
Re:Sniper positioning
« Reply #1 on: 03 Jan 2006, 22:15:37 »
set the sniper to flying and position him on the tower/building icon until he stands up there. failing that just setpos his z vector 10 metres higher than it was.

Offline Pilot

  • Contributing Member
  • **
Re:Sniper positioning
« Reply #2 on: 03 Jan 2006, 22:17:57 »
It depends.  If the buildings are built into the map, then simply placing the unit over the building will put them on the highest roadway lod

If the buildings are placed in the editor, then you will need a script command to raise their height:
this setpos [(getpos this select 0), (getpos this select 1), n]
where n is the height you want them at.

-Pilot

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re:Sniper positioning
« Reply #3 on: 03 Jan 2006, 22:27:16 »
Thank pilot, that was the line I was looking for. Appreciate the help. :)

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Sniper positioning
« Reply #4 on: 03 Jan 2006, 23:19:59 »
You should also check out buildingPos for placing units is buildings.

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re:Sniper positioning
« Reply #5 on: 03 Jan 2006, 23:33:20 »
You should also check out buildingPos for placing units is buildings.

THobson! long time no see! where do I find out how to do this?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Sniper positioning
« Reply #6 on: 03 Jan 2006, 23:46:11 »
The command reference would be a good place to start.   ;)

buildingPos


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

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re:Sniper positioning
« Reply #7 on: 03 Jan 2006, 23:59:12 »
this setpos  ( (nearestbuilding this) buildingPos 1)

this works well, but how do I get him say on the second floor or any other floor for that matter?

marcus3

  • Guest
Re:Sniper positioning
« Reply #8 on: 04 Jan 2006, 02:59:11 »
maybe
Sniper disableAI "Move"
 ;)

Offline XCess

  • Former Staff
  • ****
Re:Sniper positioning
« Reply #9 on: 04 Jan 2006, 03:11:59 »
Macca said something before when he was in his researchness time of making UnImpossible mission about usin unit disableAI "target" aswell to stop movement. Strangely, the AI will still engage targets so I'm not sure what it actually does.

But Macca said use it, so I bow before his infinite wisdom (as well as THobson's) and I will always use it when placing a sniper or anyone I want to stay in a fixed position.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Sniper positioning
« Reply #10 on: 04 Jan 2006, 13:17:49 »
Quote
THobson! long time no see! where do I find out how to do this?
Indeed, for a while you weren't around, and now I have a new job that is taking a huge amount of time.  I see you have answers to your final point.  Having suggested using buildingPos I should also warn you that you sould only use them at the start of the mission.  You cannot believe the result they return after the mission has been saved and re-loaded.
« Last Edit: 04 Jan 2006, 13:18:37 by THobson »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Plenty of reviewed ArmA missions for you to play

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Sniper positioning
« Reply #12 on: 04 Jan 2006, 15:08:52 »
Quote
but how do I get him say on the second floor or any other floor for that matter?

Just use a different number for the buildingPos:

this setpos  ( (nearestbuilding this) buildingPos 2)

Experiment till you 'find' the building position you want.
Most enterable buildings have more than one position.


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

Offline Pilot

  • Contributing Member
  • **
Re:Sniper positioning
« Reply #13 on: 04 Jan 2006, 15:12:53 »
Or you can adjust the height of the setpos command, but Planck's method will most probably be more accurate.

Notice the disableAI command is no longer effective after a mission load.  If you want the sniper to stay where he is at the whole mission, you will need to set up a trigger to keep him there.  Make the trigger activate repeatedly, in the condition field type:
time<=1
On Activation
SniperName disableAI "MOVE"; SniperName disableAI "TARGET";

Snytax not guarenteed.

-Pilot
« Last Edit: 04 Jan 2006, 15:13:22 by Pilot »

Offline XCess

  • Former Staff
  • ****
Re:Sniper positioning
« Reply #14 on: 04 Jan 2006, 16:36:51 »
Saved me from a bit of a trawl there Sniper, thanks. Was wondering how to sort out the load bug with disableAI, completely forgot about the 'time' command.

Offline Trash Can Man

  • Members
  • *
  • We are no longer the knights who say "Ni!"
Re:Sniper positioning
« Reply #15 on: 04 Jan 2006, 16:48:26 »
Just use a different number for the buildingPos:

this setpos  ( (nearestbuilding this) buildingPos 2)

Experiment till you 'find' the building position you want.
Most enterable buildings have more than one position.


Planck


I was wondering about that number at the end!!!  Thanks Planck