Jump to content
Sign in to follow this  
Grizzle

Module: Visual House Positions

Recommended Posts

UPDATED

09/06/2010

Cleaned up the hint box a bit by separating some values.

Added two new action menu items:

  • Save Init Code - Copies to clipboard a preformatted line of code meant to be placed in the initialization of a unit/object

  • Save Buffer - Copies to clipboard ALL of the entries you have saved using Save Position and Save Init Code.

Fixed minor bug when module unloaded.

08/30/2010

Added more info to hint box.

Added action menu item so you can save your current position to the clipboard.

Fixed the return index values of the house position (thanks callihn.)

Works with Arma2/OA/CO.

Attn: Mission Makers.

(note: this video is from the first version)

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/watch?v=4SZm-K18cpc&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/watch?v=4SZm-K18cpc&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

Self explanatory :)

To Use:

- Install gzl_vhp.pbo to your mods folder and add it to your launch shortcut.

- While in editor, use the module function to drop a GZL: Visual House Positions module on the map. No need to sync.

- Preview the mission.

- Move near a house and the position markers will be created

- The hint box displays:

  • Closest City/Town

  • Distance to the City/Town

  • Your current position ASL

  • House Object ID

  • House Model Name

  • Total number of positions in the house

  • Number of the position on which you are currently standing.

While standing on the position you want, use the action menu to 'Save Position'. The information you see inthe hint box is then copied to the clipboard. Paste it into something before you save another position.

When your mission is complete and/or ready to be distributed, remove the module from the map before packing it into a PBO.

To use the info for placing units or weapons:

  • Place the unit or object on the map near the building in which you want to place it.

  • Preview the map and find your
    building
    position.

  • Use the action menu and select Save Init Code.

  • Suspend the preview and double click the unit you just placed.

  • Put your cursor in the Initialization box and hit ctrl-v on your keyboard.

(Thanks to Das Attorney for noting that nearestObject takes the ID as an argument! Learn something new everyday. Check out his post on page 4 for some more usage suggestions.) :)

Note: The preformatted code is the bare minimum. You may need to add some additional commands to set the object correctly such as doStop for units so they won't wander away. When using this code make sure your units are near the location you want to place them. Arma will complain about performance impact of searching by object ID over large distances (> 500m).

Note: The buffer accumulates all saves until you suspend the map. You can mix 'Save Position' and 'Save Init Code' if you want. When you dump the buffer it clears itself. Unfortunately I don't know of a way to format data using the arma clipboard command without using an external program so you'll have to parse or cut and paste your selections out of the resulting text string. It's output from an array so it is at least a comma separated list.

Hope someone finds it useful. Feedback and suggestions for improvements are always welcome.

Download @ Armaholic

Edited by W0lle
Download link fixed so people must not read too much

Share this post


Link to post
Share on other sites

This sounds really useful, need to give this a shot someday :)

Share this post


Link to post
Share on other sites

WOw bouncing balls inside buildings cool stuff dude !!!! donwloading

nice , gona give it a shot :)

Share this post


Link to post
Share on other sites

Very nice idea Grizzle... we do need more "simple" but useful addons like this so missionbuilding gets more and more stressless :)

Share this post


Link to post
Share on other sites
I can't find a link to download it anywhere on this page.

Well fox uses his HaXx0R skilLZ :D

Share this post


Link to post
Share on other sites
I can't find a link to download it anywhere on this page.

LOL oops.. it's there now. :yay:

Share this post


Link to post
Share on other sites

Thank you very much. :)

I've given this a quick whirl in the editor and it's really useful. I'm working on a mission at the moment (just for fun) in Zargabad and this will speed up working out which positions to place OPFOR forces in.

A very elegant solution to the problem.

Share this post


Link to post
Share on other sites

Good job mate think my enemy snipers will enjoy this :D

Share this post


Link to post
Share on other sites

Awesome Tool !:bounce3:

Feedback to your Questions if its working in Arma2 : In Arma2 Standalone Hint is created, Number of Positions is shown and House ID. Marker for position and on which position you stand not.

Share this post


Link to post
Share on other sites

Great idea man, and very very useful!

Share this post


Link to post
Share on other sites

Guys can you help me with the code please just give me rough template.

Trying put snipers in building i take it i can just type in the init box of the unit

this setpos ???? ????

Then iam stuck lol

I take it i have to put the house id then the position but not sure how i type the code:o

Share this post


Link to post
Share on other sites
Guys can you help me with the code please just give me rough template.

Trying put snipers in building i take it i can just type in the init box of the unit

this setpos ???? ????

Then iam stuck lol

I take it i have to put the house id then the position but not sure how i type the code:o

this setPos ((nearestBuilding this) buildingPos 6)

Works for the nearest building to the units location. Note though that the buildingpos number you type and the one displayed by this tool don't necessarily correlate (check the Wiki notes for this command for known issues)

Share this post


Link to post
Share on other sites

Thanks gnarly ill check it out i just thought as the tool gives you the actual building I.D ect that we can some how add that to code

Share this post


Link to post
Share on other sites
Thanks gnarly ill check it out i just thought as the tool gives you the actual building I.D ect that we can some how add that to code

Haven't tested, but I think this may work (same code just nearest building command replaced by explicit reference:

this setPos (1237987432 buildingPos 1)

reference

http://community.bistudio.com/wiki/buildingPos

Share this post


Link to post
Share on other sites
Guys can you help me with the code please just give me rough template.

Trying put snipers in building i take it i can just type in the init box of the unit

this setpos ???? ????

Then iam stuck lol

I take it i have to put the house id then the position but not sure how i type the code:o

I have a function that will return the house based upon one of the values in the house ID string. You provide the city name and a substring value of the house info and it passes back the house object. :) I will post it when I put up the next version which will have Arma2 stand alone capability (I got it working - with one small caveat).

Anyhow, check back periodically for the update and I'll explain how to use the info the tool provides to retrieve the house object so you can spawn units in them.

Share this post


Link to post
Share on other sites

Hmm, what would be very useful would be display (and copy to clipboard and rpt file via action) such an object located in front of you, but coordinates shown (and copied) would be in world coordinates and object coordinates. If the object happens to be near a "selection name" (not only houses, but also vehicles) this should be put in as well.

Ex:

1) Stand in a unique building and find the perfect world coordinate to place a furtiture item.

2) Stand in a non unique building and find the location of the door wrt the object/house itself (i.e. to create door triggers for all barracks).

3) Stand in fron of a BM21 and "point" the object on the end of the BM21s "barrel" and the selection name shows.

Is this possible at all? Yeah I know, dreaming a bit here :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×