Jump to content

LilRimmy

Member
  • Content Count

    5
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About LilRimmy

  • Rank
    Rookie
  1. Huh. my big thank you post got eaten. Anyway, I just tested your script Mikie, now, it hasn't been fully tested, but it seems to work just fine. I get the message, the money, and in a sec, hopefully, only work for unit 1 + 2. Again. Thank you! ---------- Post added at 08:08 AM ---------- Previous post was at 07:57 AM ---------- Ok, I have hit a problem. For some reason, player 1 can kill enemies and get money ect. ect., but for unit 2, nothing happens... Will try to fix this asap.
  2. Alright, I will test out those now, again, thanks a ton for the help. I hate running into a brick wall when scripting. Now, one thing I have to say. All of the shops have already been made, and then all run of a base script I found then modified, then made a template. if (Mymoney < ) then { Hint "You do not have enough money"; } else { Mymoney = Mymoney -; mygunlocker_1 addWeaponCargo ["", 1]; mygunlocker_1 addMagazineCargo ["", 1]; Hint "You got a "; }; So, that is the base code for all the shops, with the vehicles templates slightly altered. What I am getting at is I can't, I can not, change this script. If I had to, I would just give up on the mission. I have far too many sqf files to rewrite AGAIN. Anyway, it just means that I can't change the variables to a global one like money or change it to score. Also, I am using the undead mod, so I am using those module spawners, so I don't think I can put any scripts in their init. Oh, and a note, the two money scripts (Mymoney and Mymoney2) are actually the teams money. As, at the time of making this mission, I could't get variables to work, I used another way. Every single sqf file has a double, and that is team 2 buying things. Yes, it is crude but it was the best I could do. And last, just some questions for the code: Mikie, the code you posted (which I am about to test), where would I put it, and also, did you mean for the code to be used together or spilt into two? Splitting them in two would be better, but I could easily run with together (so if team 2 kills a zombie, team 1 and 2 get money) (Also, when ever I say "Team 1 or 2" I mean the lead unit, and if I can, unit 3 and unit 4. Alright, I will go test this now. Again, thanks mate!
  3. Now, I would be happy to. One slight problem. The fuck is an event handler? I know a fair bit of scripting, but I am still learning as I go along. Could you post an example code or something like that? I usually learn best from getting a test code then trial and error. So, when you say event handler, is that like it activates a trigger? Or does the event handler active a trigger which then has to been activated by say, someone dying or someone killing something?
  4. Anyone? This is the only thing stopping me from completing my mission. I really need help with this, so, anyway, please help. Even if you only know half of a script, I need to work out a way to fix this.
  5. Ok, so I am making a zombie kind of campaign at them moment and I need some help with the money system. Quick explanation of missions: All of this takes place in Chernarus. The first one is a mission at the very start of the infection, where you and your brother must escape from the town, blah blah blah, it just sets up the other missions. The next one (which I am working on at the moment) you are a mercenary hired to plug a hole in the quarantine line. While the first one was well, not rail roaded, but not a sand box mission, this one is a full map sandbox. Once started, you can do anything. This mission is more fighting and rescuing than my survival mission (Through the fog) so instead of scavenging for guns, there are shops set up around the map. You can do things like rescue people, deal with the zombies, get rid of the raiders looting in the chaos, complete high-priority missions. All for money. The next missions are all mission number 2 but from different perspectives. They will be things like military, civilian, raider, President bodyguard and personal favourite, a hunter. With a dog. Go dogs. Anyway, everything is working fine, except for one thing. Gaining money. Now, that does WORK, just not how I want it. Here is the code for earning money {_x addeventhandler ["killed", {_this exec "addmoneyHuman.sqf"}]} foreach thislist In a trigger with OpFor triggering it and repeating And the add money scripts are all MYmoney = MYmoney + 250 MYmoney2 = MYmoney2 + 250 Now, it all works, but the problem is that if ANYONE kills Opfor (or independent), we get money. And in a giant full map sandbox involving a line holding back a horde of zombies, that is a huge problem. So, my question is, how do I only add money when unit 1 unit 2 unit 3 and unit 4 kill the enemy? Thanks in advance.
×