Author: Foxhound
Author Website:

Version: 1.1

Short description:

Date: 2007-03-25 04:23


Comments: (2)
Rating:



 

Building Position Finder
By
Tophe of �stg�ta Ops


By using the command buildingPos you can put a unit at a model-defined position in a building.
All buildings have predefined positions. They are at windows, staircases, on rooftops etc.
Good for putting guards in windows and other nice features. You may also use the Move command
to have AI patrol inside a house, between different building positions.

I made a small example mission where you can try out building positions for any building on the map.
You just move the Game Logic (placed over a factory in my example) to any building you wish to explore.

By using the radio-commands you can teleport the player unit between the different positions.
The current position number is given on the Hint-box at the top left corner.

There is also radio commands for commanding an AI unit to move to next or previous position.
Move the AI unit close to the building you put the Game Logic on, since he will not teleport there.

In the mission folder there is a script called building.sqs
This is also available in the radio menu (Position Count). It will return the amount of positions that is at your disposal
in the given building. Also the script may randomaze the position of the player unit inside the given building.

I don't know how to find out what specific buildings are called so I simply put a Game Logic named "houselogic" at the house I wanted and then added
house = nearestbuilding houselogic[/cdoe] in the INIT.SQS
The I use the varieable 'house' in the buildingPos command.

The index is 0-based. So if a building has 5 positions listed in the editor, 0 is the first and 4 is the last.

Syntax: buildingPos [building, index]

Example 1: p1 setpos (house1 buildingpos 2)    - Will put unit p1 at position 2 in house1
Example 2: ai1 setpos (house1 buildingpos 6)   - Will ordet unit ai1 to move to position 6 in house1


Good luck!
Any questions... well.. check the BIS forums :)

Over and out from �sterg�tland, Sweden


[b]Version:[/b]
--------
1.1 - Added the building.sqs script. It will count the positions in a given building and may also randomize a setpos for a unit inside.





Enable javascript to be able to download from Armaholic please!



Tags: No tags