Jump to content
Sign in to follow this  
Akatora

Need help with scripting problem

Recommended Posts

Heya!

After 2 days of searching in Arma2 editing & scripting forums, googling and asking people, i still don't know what i'm doing wrong.

But after i've entered the scripts in the init lines on many different objects, vehicles, aircrafts, ammocrates and lots more.

I did manage to waypoint animals, but that is not my problem.

An example:

To make vehicles respawn you need to enter this to the init line in the map editor.

veh = [this] execVM "vehicle.sqf"

Or

veh = [this, 15] execVM "vehicle.sqf"

&

veh = [this, 15, 50] execVM "vehicle.sqf"

Even the dynamic respawn script.

veh = [this, 15, 10, 1] execVM "vehicle.sqf"

Depending on if you want to change the default timers before it respawns, 30 seconds after being destroyed, 120 seconds if abandoned in the bush etc.

(Are the default values).

BUT, when i'm about to start the scenario, i always get the message:

(Cannot find Vehicle.sqf)

Now i have read 2 things about this, some peopel says you simply just need to add either of those texts to the init in map editor, and just go.

The second thing (wich i think is correct), is that you have to add a sqf file in the mission folder.

I have tried doing it, but obviously i keep doing it wrong, since i keep getting the message: "Cannot find Vehicle.sqf".

I got the same problem with adding all weapons & ammo to ammocrates

null0 = this execVM \"ammo.sqf\"

Aswell as all other random scripts, and i think it's the same problem for everyone, that i need to add this file, or the script in the scenario.

And that is where my problem is, i don't know what or where to add it.

If i simply just need to create a new sqf document with the name, "Ammo.sqf", and/or if i have to add some weird programming scripting code in it aswell.

Last time i were working with scripts like this was a couple of years ago when i played Flashpoint, i did manage to make people respawn, but that's ages ago.

And i know i had these weird documents involved then.

If anyone got the answear to my problem, or want me to explain it more, then please post a reply, or if you think you got an idea to solve this.

I got lots of scripts i'd like to try, even the helicopter animations you see in the movie in the background at the menu, where the helicopters got their propellers folded backwards to take less space on ships.

You'd earn a star in the sky!

If anyone knows the script to make infantry respawn, then please add it here.

And feel free to correct the scripts i've mentioned above if there's any wrong with them.

---------- Post added at 05:49 PM ---------- Previous post was at 05:46 PM ----------

Special animations:

(MV-22 Osprey) _xtype = [this,1] execvm ""\ca\air2\mv22\scripts

(AH1 Cobra) _xtype = [this,1] execvm "\ca\air\Scripts\AH1Z_fold.sqf"

(UH1 Huey) _xtype = [this,1] execvm "\ca\air2\UH1Y\Scripts\fold.sqf"

Share this post


Link to post
Share on other sites

you need to add the associated script to the mission's folder. The line you put into the INIT field just tells the game to execute the script; it is not the script itself. Wherever you found out about the ammo script and the respawn script should have a link to the script itself. If you can't find it, add me on xfire, I have and use both and I can send them to you through there.

See you on the battlefield

Share this post


Link to post
Share on other sites

Make sure you don't have Windows in dummy mode and hiding file extensions. You might actually be saving files as vehicle.sqf.txt or something. Are you on Windows XP or Vista?

Share this post


Link to post
Share on other sites

Ok thanks, and no, all the scripts I've copied had no link or extra window for the actual script/program code, it's odd.

I got XP, and I did have that problem before, recently got my new computer, and I had to change that in the map options, to show hidden files.

I couldn't find Arma2 maps before so i figured it out later on.

Share this post


Link to post
Share on other sites

Akatora, they likely expect you'll write the script yourself. Tajin has a vehicle respawn script here, but be sure to credit him for it. Same goes for all you've mentioned - those last three are links to BIS-made scripts in your game folder. For a more simple respawn, use notepad to create a folder called "description.ext" and follow the info on this page (as far as I know you'll have to export it to MP missions and host it, as respawns don't work in editor preview). And bookmark the biki. And go to armaholic.com and search for Mr Murray's Editing Guide.

Share this post


Link to post
Share on other sites
Ok thanks, and no, all the scripts I've copied had no link or extra window for the actual script/program code, it's odd.

I got XP, and I did have that problem before, recently got my new computer, and I had to change that in the map options, to show hidden files.

I couldn't find Arma2 maps before so i figured it out later on.

Your map folders are in mydocuments Arma 2 folder, in folder options you need to untick Hide Extensions for Known file types.

For unpacking files if zipped use 7-zip it's free and very good.

Share this post


Link to post
Share on other sites

I've got help from several people now, well atleast having several people telling me to do either this or that, but i don't get any progress because i'm the one making something wrong.

I do think i've read through exactly what has been said to me.

I got the script right in the map editor in Arma2, the one that is suppose to run the sqf file in the map folder.

I'm not a programmer, probably never will be, so writing my own programming code for the sqf file is not an option for me, i really do appreciate that there are people willing to share their knowledge by uploading scripts etc, i really am happy for that.

All i want is just to be able to make a balanced map for me and my friends, a map where we will be able to respawn on, aswell as have the vehicles to respawn.

I have tried several script/programming codes for the SQF file, but none seem to work for me.

The only message i get when i try to run a multiplayer map is: "SCRIPT [name] NOT FOUND"

:<

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  

×