Jump to content

Arma 2 Scripting


=VG= Jaki

Recommended Posts

Hello there, I'm making this new tread because for some reason I couldn't open "Arma Editing Thread". I am pretty much new into scripting with a bit more than 5 hours. I've done a lot of research and still can't figure out how to fix my problem. Basically, I have in plan to make a SP and MP missions. I am still in a test missions phase, or I should say I am trying out all the options I think I will include in the mission. I have a 4 car convoy which has a VIP in it and its heading to its destination but it gots ambushed with IED and insurgents.

Anyway, I got a problem with UnitPlay/UnitRecord scripts. Everything is alright with the first car, and thats the car that got hit with a IED. I got a recording of it, copied it and pasted in a path file. After that when I try to record the next one I just can't, there isn't an option "Radio" available anymore which was used to start to record or to playback. If there is anyone who is better with scripting I could really use your help.

Download link: http://www.mediafire.com/download/dht1e51trratx8f/TestMission.Takistan.zip

PS: If you want to start over just delete the first path and it will be available for recording again.
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I never used the UnitPlay/UnitRecord functions for any kind of troop movements in Arma 2 and I've got over a thousand hours scripting.

Here is a topic where a scripter had issues trying to copy/reuse UnitPlay scripts and had issues he resolved: https://forums.bistudio.com/topic/152864-reusing-bis-fnc-unitplay-problem/

What you are trying to do can be done in the 2D editor with routes and paths, or you could script routes using waypoints or triggers for the events (IED/Ambush).

One of the most helpful ways I learned how to do a thing I wanted to do was to look at a few examples of work doing similar things (don't copy people's code, but review it for training/teaching). Find some convoy like mission and break it open, peer into it's guts and look for the interesting bits that make it work. Then, you can write something worth testing without getting frustrated at dead end results.

Also, if you don't use it, download and install this little program "Arma Edit" - then right click on an Arma script file (.sqf) and select "open with" and find Arma Edit.exe - tell it to always open files like this with Arma Edit.

The key benefit (aside from syntax highlighting) is the ability to look at the entire list of commands, and right click on them for command help which opens the OFPEC website showing operand types, description, examples, etc. Very helpful.
Shown in this image: http://imgur.com/NRTOGrp

For mission.sqm, do NOT open with Arma Edit, but use Notepad++ as it will not alter the save file extension. Notepad++ has line enumerations and can have syntax highlighting for most any language, available from the drop down menu box along the top, and will save files that are not saved (program could be closed with an edited unsaved file and will re-open the file as is with the edits even if PC restarted)

Arma Edit: http://www.armedassault.info/index.php?cat=utilities&id=10

Notepad++: https://notepad-plus-plus.org/download/v6.9.1.html

!cheers
Link to comment
Share on other sites

I haven't messed with unitPlay myself either... especially in A2. It's supposed to be easier/better/etc in A3 but I have never tried it.

Youtube has some tutorials on this not sure how accurate they are but might be worth checking out:

https://www.youtube.com/watch?v=ryB20wQhSr0

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Terms of Use and Privacy Policy