![](https://forums.bohemia.net/uploads/set_resources_8/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://secure.gravatar.com/avatar/9e34f133925bbdc133d256729338efbc?d=https://forums.bohemia.net/uploads/set_resources_8/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png)
TheDarkFox
-
Content Count
15 -
Joined
-
Last visited
Never -
Medals
Posts posted by TheDarkFox
-
-
Ok, this is being posted for MadMax, who says he couldn't reply to this thread:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">In all cases, you have to use a program to extract the mission.sqm file from the .pbo mission file  -> then decompile it -> then edit it -> then stuff it back into the original .pbo
The main problem I experienced was... there are two formats for the .sqm file: Bohemia Interactive's (BI) is different from the one created when you use the editor to make a mission.
UTILITIES REQUIRED (uncompiled Perl versions also available):
Extract mission.sqm file from a .PBO:
ftp://flashpoint.xaos.ru:4000/utilities/cmiss-uncomp.exe
Decompile editor (user made) mission.sqm file: unpack.pl
ftp://flashpoint.xaos.ru:4000/utilities/StuffPBO_V1b.zip
* To use cmiss-uncomp.exe correctly, you need to:
1) Put it with a freshly unpacked mission.sqm in the same folder of your choice
2) Open a MS-Dos console
3) Change to your chosen directory
4) type: cmiss-uncomp.exe>mission.txt
5) new file mission.txt created in directory
6) Important: open mission.txt and go to the end of file
7) Delete the last 3or4 lines: "This exe file....."
8) Save your work
9) Put the "mission.txt" into your OFP-User folder
10) Rename it to "mission.sqm", ready to be edited.<span id='postcolor'>
Thanks MadMax!!
-
That only gets the encrypted SQM's out. I've seen a tool called unpack-sqm, but it seems to error out on me...
-
No, I didn't know that. Why did they make a "createUnit" command then?
-
Hey Poncho, small world!
Check this out:
http://www.ofpeditingcenter.com/download_new.shtml#campmissions
and specifically:
-
Hey cactus, I had the same problem... Check out the thread:
http://www.flashpoint1985.com/cgi-bin....;t=4778
I've since tested the createVehicle command, and it works!
-
Hey, MP, I wasn't trying to be sarcastic man! As you pointed out, I really didn't know!
And hey, that's cool that you can create non-vehicle unites with createVehicle!
Thanks for the help all
-
Try without the square brackets:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">Plane_Unit = "F16" createVehicle getMarkerPos "SomeMarker"<span id='postcolor'>
-
Doesn't camCreate just create a camera?
Maybe I don't know where to put it!
-
Give this a shot:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">Plane_Unit = "A10" createVehicle [getMarkerPos "SomeMarker"]<span id='postcolor'>
Just make sure you place a marker named "SomeMarker" where you want the plane to appear. (I put the code for an A10 in, since I've never seen an F16...
Cheers
-
I'm using the following code, which is darn near exactly what is in the manual:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">"SoldierWB" createUnit [getMarkerPos "Nowhere", groupAlpha]<span id='postcolor'>
But no unit ever appears at marker "Nowhere"!!
Any hints?
Thanks
-
I'm working on a beach assault mission where once you kill off the assaulting infantry, boats start showing up.
I've used createVehicle to make the new boats, but they're toally unoccupied (no commander, driver or gunner). So despite setting some waypoints, they just sit there!
Any hints? Thanks!
Script below:
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
_wave = _this select 0
? (_wave == 1) : goto "Wave1"
goto "End"
#Wave1
# Get North Marker Position
northPos=getMarkerPos "NorthMarker"
nx=northPos select 0
ny=northPos select 1
nz=northPos select 2
# Get South Marker Position
southPos=getMarkerPos "SouthMarker"
sx=southPos select 0
sy=southPos select 1
sz=southPos select 2
hint format ["Wave %1 Destroyed!",_wave]
# Place 4 new ships
_boat1 = "BoatE" createVehicle [nx+20,ny+20,nz]
_boat2 = "BoatE" createVehicle [nx-20,ny-20,nz]
_boat3 = "BoatE" createVehicle [sx+20,sy+20,sz]
_boat4 = "BoatE" createVehicle [sx-20,sy-20,sz]
# Populate Boat 1
_b1C = "OfficerE" createUnit [getPos _boat1,wave1Group,"",0.5,"PRIVATE"]
_b1C assignAsCommander _boat1
_b1D = "OfficerE" createUnit [getPos _boat1,wave1Group,"",0.5,"PRIVATE"]
_b1D assignAsDriver _boat1
_b1G = "OfficerE" createUnit [getPos _boat1,wave1Group,"",0.5,"PRIVATE"]
_b1G assignAsGunner _boat1
# Populate Boat 2
_b2C = "OfficerE" createUnit [getPos _boat2,wave1Group,"",0.5,"PRIVATE"]
_b2C assignAsCommander _boat2
_b2D = "OfficerE" createUnit [getPos _boat2,wave1Group,"",0.5,"PRIVATE"]
_b2D assignAsDriver _boat2
_b2G = "OfficerE" createUnit [getPos _boat2,wave1Group,"",0.5,"PRIVATE"]
_b2G assignAsGunner _boat2
# Populate Boat 3
_b3C = "OfficerE" createUnit [getPos _boat3,wave1Group,"",0.5,"PRIVATE"]
_b3C assignAsCommander _boat3
_b3D = "OfficerE" createUnit [getPos _boat3,wave1Group,"",0.5,"PRIVATE"]
_b3D assignAsDriver _boat3
_b3G = "OfficerE" createUnit [getPos _boat3,wave1Group,"",0.5,"PRIVATE"]
_b3G assignAsGunner _boat3
# Populate Boat 4
_b4C = "OfficerE" createUnit [getPos _boat4,wave1Group,"",0.5,"PRIVATE"]
_b4C assignAsCommander _boat4
_b4D = "OfficerE" createUnit [getPos _boat4,wave1Group,"",0.5,"PRIVATE"]
_b4D assignAsDriver _boat4
_b4G = "OfficerE" createUnit [getPos _boat4,wave1Group,"",0.5,"PRIVATE"]
_b4G assignAsGunner _boat4
# Move them in
_boat1 doMove getMarkerPos "Wave1_1"
_boat2 doMove getMarkerPos "Wave1_2"
_boat3 doMove getMarkerPos "Wave1_3"
_boat4 doMove getMarkerPos "Wave1_4"
_wave1=True
#End
<span id='postcolor'>
-
Helps a lot, thanks man! (Got the xml from your link...)
-
I feel so green... I've looked everywhere for the tutorials (found plenty on mission editing and stuff), but can't find the right info.
Anyone care to help a flailing player?
Thanks
-
Ok, so how do you do *that*?
createUnit not working!
in OFP : MISSION EDITING & SCRIPTING
Posted
Aha! My problem was likely that I was trying to create a unit and add it to a group that didn't yet exist. (I assume you need to set a group leader before the group "exists"?)
Makes sense...