Jump to content
Sign in to follow this  
Flightster

Saving gear at ammo box?

Recommended Posts

Hi guys,

I'm currently in the process of making my very first PvP C&H map, and I am very interested in adding the AAS way (or something like it) of being able to save your loadout at the ammo box and having it saved for the entire duration of the game. I used the search option, and did find something.. The only problem is that it was a little too complicated for my "noob mind" to understand :p

So if anyone is willing and able to help me out, and explain how I would go about doing this (the scripting, where to place it, how to get it to work in game, etc..), I would greatly appreciate it:)

Share this post


Link to post
Share on other sites

Alright, got it to work.. The only problem is that it seems to not save rockets, any clue on how I could fix that? Also, I would like to have a player be notified once it saves by having a message pop up in the chat window.. How would I go about doing that? I tried putting the following inside my "savelayout.sqf":

_magazines = magazines player;
_weapons = weapons player;

"Weapons and magazines layout saved." call XfGlobalChat;

but my game keeps crashing because it doesn't match my "null0 = ammo1 addaction ["Save loadout", "savelayout.sqf"];" which I put in the ammo box's init space (in the editor), something along the lines of:

File C:\users\myname\Documents\Arma 2 Other Profiles\]TG[Flightster\missions\missionname\saveLayout.sqf, line3: '.': "" encountered instead of '='

Sorry for all the questions, but I really want to learn :)

Edited by Flightster

Share this post


Link to post
Share on other sites

This editor bloody hates me.. No matter what I try, it keeps crashing every time I attempt to put a simple line of text inside of my savelayout.sqf file.

Here's what I have tried:

_magazines = magazines player;
_weapons = weapons player;

Hint = "Loadout Saved"

It's the hint that gives me trouble.. Even if my game doesn't crash, a hint doesn't show when I save the loadout

Edited by Flightster

Share this post


Link to post
Share on other sites
This editor bloody hates me.. No matter what I try, it keeps crashing every time I attempt to put a simple line of text inside of my savelayout.sqf file.

Here's what I have tried:

_magazines = magazines player;
_weapons = weapons player;

Hint = "Loadout Saved"

It's the hint that gives me trouble.. Even if my game doesn't crash, a hint doesn't show when I save the loadout

Your hint syntax is wrong, try this:

hint "Loadout saved";

It's probably the missing ; or the hint line that's crashing the client.

Share this post


Link to post
Share on other sites

I always used the semicolon (forgot to add it in my post) but it crashed me again, saying:

File C:\users\myname\Documents\Arma 2 Other Profiles\]TG[Flightster\missions\missionname\saveLayout.sqf, line3: 'hint': "" encountered instead of '=

---------- Post added at 08:53 PM ---------- Previous post was at 07:39 PM ----------

OMG, I found the problem! :yay:

I had #include "savelayout.sqf" inside of my description.ext file.. I deleted that line to see if it would do anything, and tested it.

To my surprise, it fixed all of the problems I was having :D

Edited by Flightster

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  

×