Printable Version of Topic

Click here to view this topic in its original format

Armed Assault Info Forums _ Mission Editing & Scripting _ Object Pickup

Posted by: Red Star Elite Oct 10 2011, 12:02

Hey guys

Was wondering if there was a script or something that allows the player to pickup lets say, a map and it be shown in the inventory?

Thanks to anyone who can help thumbsup.gif

Posted by: D@V£ Oct 10 2011, 13:50

The map's a "weapon", you can add and remove it using the (I think) addweapon and removeweapon commands - if the player doesn't have a map, the map screen will show up blank.

Ie:

CODE
This addweapon "ItemMap";
This removeweapon "ItemMap";


There's also a macguffin map class, if you want a map that doesn't serve any real purpose, but can be used as an objective:

CODE
This addweapon "EvMap";
This removeweapon "EvMap";

(Check http://community.bistudio.com/wiki/ArmA_2:_Weapons#Equipment for some more similar classes, bear in mind a lot of the macguffins are ArmA.2 classes, so might not work with just OA, according to SIX they're in configweapons, but they might not have all the resources in place...)

You can check if the player has one of these with the hasweapon command, ie:
CODE
Player hasweapon "EvMap"


Hope this helps! happy.gif

Posted by: Red Star Elite Oct 10 2011, 14:07

So if this map/file etc was placed on a table for example, using one of the scripts you've provided, the player could pick it up and it be shown in the inventory just like any other collectables such as ammo ingame?

Posted by: D@V£ Oct 10 2011, 15:44

Yup, it fits in one of the inventory slots. I'm not too sure how to spawn weapons just lying around though... (or if the evidence objects even have models, IIRC in the campaign they're always in boxes or something)

Posted by: Red Star Elite Oct 24 2011, 23:52

Yeah spot on. Cheers once again thumbsup.gif

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)