Jump to content
Sign in to follow this  
victim913

Questions about making missions run smoother

Recommended Posts

I keep trying to make big battles and i want to make sure i'm getting everything right or better.

I'm thinking it's better to spawn units as i go as opposed to putting all units everywhere i want from the begining. Is that correct?

I don't find alot of info about the actual creation of the sqf that creates groups through triggers etc. I see how to set it up and see the directions to call on the sqf but how to create it to begin with.

And alot of tutorials on script just tell you what to write without telling you what it means. Like "put execVM" I won't learn it until i know what execVM means.

-creating one. Do i place them in the editor then transfer to sqf or do i just open a notepad and code the entire sqf?

-Also do i have to spawn them onto a marker or can i have coordinates for each unit?

example- I use the RTEditor and i can create a group where i want them and it gives me exact coordinates of each unit. So can't i use that instead of a marker. I would rather not use the markers.

I have palyed alot of missions where groups spawn with a marker and they all spawn on top of each other sometimes killing units. And if i spwn a mechanized group the vehicle will definitely kill.

Thanks

Share this post


Link to post
Share on other sites

HI victim913,

You certainly have several goals in mind. Forgive me, but it is not clear (to me) what exactly you want to achieve.

If you are new to scripting (I consider myself a noob) I highly recommend Taurus' Basic SQF-Scripting guide (http://forums.bistudio.com/showthread.php?t=94015). It's well written, good examples and explanations, and a good starting point to get your feet wet.

To create a .sqf file, you can either (1) take one already made and open it in Notepad and write code in it, or (2) create a new with with Notepad just making sure that the file is saves with an sqf extension name and not the default .txt

About spawning... you can use the RTEditor to place a marker on a map to use the marker's coordinates to spawn units. This makes things a bit easier since you can then move the marker and the software will always determine the new marker's coordinates on the map.

There are several ways to get a script to work, some more complicated than others, so I still highly recommend to read Taurus' guide. It's a VERY good starting point.

I hope this helps. Good luck!

Splicer.

Share this post


Link to post
Share on other sites

I already use RTE. My question about making the game run smoother is mostly about having units placed in areas that aren't being used yet. This game runs pretty good no matter what i do. In other games placing 20 units would cause the system to run significantly slower. Here, placing 20 units doesn't make much difference at all.

So my question for that is just SHOULD i choose to spawn units with a script or should i just place them there from the begining?

As for creating the sqf, I have seen the sqf giuide you mention. That cleared some of it up. But my question about sqf is meant specifically for getting thosse units ingame. I am new to scripting and am trying to build my mission using simple things until i know more about it.

Using the RTE, i saw that it had some function to convert what i place into an SQF but it doesn't. It shows me in a window what it should look like but i can't get it into an sqf file. I can only merge with mission which adds it like using the regular editor or saves as xml.

This is what it looks like:

[0, ["USMC_DESERT_SOLDIER_SL", [203.247, 1281.42, 0.0011997], 359.829, "NONE",1, "LIEUTENANT", 1, "", ""]],

[2, ["USMC_DESERT_SOLDIER_Medic", [205.29, 1283.35, 0.0011997], 359.829, "NONE",1, "SERGEANT", 1, "", ""]],

[4, ["USMC_DESERT_SOLDIER_MG", [201.777, 1284.09, 0.0012121], 359.829, "NONE",1, "CORPORAL", 1, "", ""]],

[6, ["USMC_DESERT_SOLDIER_AT", [205.362, 1286.42, 0.0012884], 359.93, "NONE",1, "CORPORAL", 1, "", ""]],

[8, ["USMC_DESERT_SOLDIER_GL", [201.612, 1287.1, 0.0011997], 359.829, "NONE",1, "CORPORAL", 1, "", ""]],

[10, ["USMC_DESERT_SOLDIER_TL", [205.611, 1289.63, 0.0012741], 352.581, "NONE",1, "SERGEANT", 1, "", ""]],

[12, ["USMC_DESERT_SOLDIER_TL", [200.582, 1290.48, 0.0012645], 359.913, "NONE",1, "SERGEANT", 1, "", ""]],

[14, ["USMC_DESERT_SOLDIER_AR", [207.128, 1293.27, 0.0012435], 354.699, "NONE",1, "CORPORAL", 1, "", ""]],

[16, ["USMC_DESERT_SOLDIER_AR", [200.511, 1293.79, 0.0012712], 6.96, "NONE",1, "CORPORAL", 1, "", ""]],

[18, ["USMC_DESERT_SOLDIER_LAT", [207.138, 1296.44, 0.0012321], 352.855, "NONE",1, "CORPORAL", 1, "", ""]],

[20, ["USMC_DESERT_SOLDIER_LAT", [200.16, 1296.85, 0.0012645], 359.913, "NONE",1, "PRIVATE", 1, "", ""]],

[22, ["USMC_DESERT_SOLDIER_Soldier", [207.619, 1300.38, 0.0012273], 353.44, "NONE",1, "PRIVATE", 1, "", ""]],

[24, ["USMC_DESERT_SOLDIER_Soldier", [201.159, 1301.54, 0.0012760], 7.71759, "NONE",1, "PRIVATE", 1, "", ""]]

],

[

[26, ["AAV", [205.541, 1308.84, -0.089012], 358.112, "NONE", 1, "PRIVATE", "UNLOCKED", 1, 1, 1, "", ""]]

],

So could i just copy that to notepad, name it unit1.sqf and use that to spawn the units i want?

I REALLY don't want to insert them using a marker for two reasons, vehicles will always kill someone and sometimes units kill eachother spawning in. The vehicles run over people enough in a group, a marker makes it worse. AND I want them to spawn EXACTLY where i place want them. Alot of the units i need to spawn will spawn onto or into a building and some are spread out. using a marker will not allow that.

Or will it? can i use the marker and still place them using the coordinates? This is a line from an sqf from someone else:

_Unit1= Grp2 createUnit ["Ins_Soldier_Sab",[(getMarkerPos "Airfield1") select 0,(getMarkerPos "Airfield1") select 1,0],[],0,"FORM"];

Could I replace the "",[(getMarkerPos "Airfield1") with

[203.247, 1281.42, 0.0011997], 359.829

Allowing me to have the unit go exactly where i want?

That is the type of sqf i am looking to create for now. If i knew what all that meant in the line i got from someone else, i would probably figure it out. But like i said even with that guide you referenced, I still see alot of "type this" instead of "type this, x , xy, blah" "where x = this xy = this and blah = this"

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  

×