Printable Version of Topic

Click here to view this topic in its original format

Armed Assault Info Forums _ Mission Editing & Scripting _ How to open Gates on Nogova 2 by trigger (Mapfact)

Posted by: Solid Snake Nov 25 2013, 04:24

hey there guys.

i have a question.

how do i open a gate (placed by map builder, not added by me)??

in the editor there are IDs for each objects, can anybody help me?

i know it must be: ID???? animate ["xxx", 1]; (but don't know how the animations name is)

thanks in advance

Posted by: D@V£ Nov 25 2013, 17:50

Isn't Nogova 2 for OFP? If it is, you can do it with http://community.bistudio.com/wiki/object command like this:

CODE
(object [object ID]) animate ["animation", number]

The animation name should be in the readme, IIRC the gates on mapfact Nogova were part of their barracks pack, so check the readme for that.

Otherwise, if you're working with ArmA, you need to do it with the http://community.bistudio.com/wiki/nearestObject command, which is a PITA, since you have to use triggers and such. Basically stick a trigger by the gate and use this:
CODE
(nearestobject getpos this) animate ["animation", number]

In the on activation field. This also works for OFP if you're having trouble getting the object command working (It says on BIKI that it works in OFP, but I seem to recall it didn't work too well)

(you might be able to use nearestobject with a gamelogic instead of a trigger. I don't think nearestobject can call the object it's using as a reference, but this might not be the case. Also, you can apparently use the nearestobject command in the same way as the object command, but I don't know what version this was introduced.)

Posted by: Solid Snake Nov 26 2013, 01:04

thanks dove!

i will test it and give an response

Posted by: Solid Snake Nov 26 2013, 01:25

Yes it's for OFP / Arma CWA.

I tested but nothin works.

With : (object [167362]) animate ["animation",0] = Error message when entering -> object: Type Array, expected Number

With : (nearestobject getpos this) animate ["animation", 1 or 0 tested] = no action

Or am i stupid how to use?

pleas help me

Posted by: D@V£ Nov 26 2013, 02:13

Dove? That's... a new one ohnoo.gif Obviously "animation" isn't actually the name of the animation - like I said, you'll need to look it up addon's documentation.

As for the array expected number, you've put square brackets around the object ID. Admittedly, I did accidentally tell you to that (sorry), just get rid of them and the command should work.

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