🛈 Announcement
Greetings! Far Cry forums are now archived and accessible in read-only mode, please go to the new platform to discuss the game.
  1. #1
    Hey, I'm trying to make a map with classes like the assault mode Engineer, or atleast similar.

    However i cannot for the life of me get the MedicTool to drop MediKits.
    Anyone able to help?
    Share this post

  2. #2
    Hey, I'm trying to make a map with classes like the assault mode Engineer, or atleast similar.

    However i cannot for the life of me get the MedicTool to drop MediKits.
    Anyone able to help?
    Share this post

  3. #3
    Yeah I had what sounds like your problem a while ago. I have managed to add classes to FFA with the med tool etc.

    Not sure how you are trying to do this so don't know if this will be useful to ya, I'm assuming you are scripting and making a mod:

    Its a long story so this will be short on details, sorry. I added stuff from the ASSAULT scripts to the FFA scripts.

    I'm guessing you have not added 'ammo' for the medic tool. If you look in MultiplayerClassDefinition.lua under Support class you find:

    InitialAmmo=
    {
    ...
    HealthPack=3,
    ...
    },

    Thats the easy part...

    The class tables are used in the callback for

    GameRules.ClientCommandTable["CPC"]=function(String,server_slot,toktable)

    which basically sets initial player stats and equipment on a server slot used at respawning and is called with a client command from the ASSAULT select class screen (InGameTeam.lua if I remember correctly)

    The 'tricky' part is adding the right code from assault and loading the scripts (make sure you dont get circular loading).

    I'm also guessing you could set this ammo in a Pack in the mission of the map, but this won't get you classes.

    Hope this gives you something to start with...
    Share this post

  4. #4
    No i am not making a mod, im making a Map

    And sorry if i put it wrong, basically i am making a map where everyone starts as "the engineer" class like in assault.

    I am only interested in getting the medictool working in a FFA game, not in adding any classes, or sorting through difficult scripts.

    I understand its not going to be easy, if it was i would have worked it out :P
    But is there a way to get them working without using scripts? i really have no idea about them.
    And cant really learn as whenever im in the editor and goto "missions", click to open scripts or make a new script it screws up and says it cant poad some ****.. i forget what sorry, think its like main.lua....
    long story short, i cant use scripts.
    Share this post

  5. #5
    I see, well the problem is I cannot see a way to set the ammo for the MedicTool in the editor.

    I tried putting in a HealthPack ammo entry in a .eqp file I imported and even in the mission_ffa.xml in level.pak. No luck, the latter screwed up my test level pretty bad, so I can't recommend trying that really...

    I see two ways of doing this, both with scripting I'm afraid.

    1. Make a new entity that adds HealthPack ammo, based on an existing ammo pickup. This means a (tiny) mod which is a drawback.

    2. A dirty hack solution might be to add a new event to the mission script and use a trigger to call that event at startup.

    The event would contain some code like:

    local player = _localplayer;
    local nPacks = 5;
    player.Ammo["HealthPack"] = nPacks;

    I tried this and it works, but not perfectly. Depending on what weapon you are holding there are a few other ammo parameters that need to be set I think. Plus I only tried it locally, not tested if it works as a client over the network.
    Not sure how the mission script handles this...

    Anyway, thats all I got I'm afraid.
    Share this post