Jump to content

CptBBQ

Member
  • Content Count

    93
  • Joined

  • Last visited

  • Medals

Everything posted by CptBBQ

  1. Hey there! I´ve got a confession to make... ^^ I came along with actually trying this just now :o And it totally doesn´t work like I hoped it would... Somehow the bombs always appear with enough of a delay to prevent them from colliding. I already tried creating the bombs in the sky and setPos-ing them to an 'invisible H' at the desired position. I even setPos´ed the second bomb to the position of the first one. But nothing worked... Maybe my computer is too slow for this approach... :( Could someone of a somewhat 'cleaner' way to do this? Thanks in advance! Cheers, CptBbq
  2. Hi all! I know this isn´t the right forum, but I don´t want to open a new thread. I´ve got a bloody noob question regarding cba_functions. I can´t get cb_fnc_globalExecute to work. Here´s what I tried: if (isServer) then { waituntil {!isnil "bis_fnc_init"}; [-1, {sleep 5; hint _this}, "TEST"] call CBA_fnc_globalExecute; }; When I host the mission locally the hint appears. But hosted on our dedi, nothing happens. I´m pretty clueless about all this, don´t even know if the bis_fnc module is necessary. I guess there´s some basic info I´m lacking, but the forum search is useless in this regard. Thanks & Sorry =) bbq
  3. Heh, fun and simple! I´ll try that. Thank you.
  4. Haha! Maybe it´s not elegant, but I think it´s a really smart approach :D Exactly what I was looking for. Thanks to both of you! Cheers, CptBBQ ----------------- edit: aaaaand, it works! great stuff, thanks again.
  5. Hi there, first of all, thanks for looking at this. I´m running against a wall with one of my scripts, and (again) I´m desperate for help... I´ll try to keep it as short as possible... So, lets say I have the groups alpha and bravo and I want to store their kills in arrays named alphaKills and bravoKills. When a killedEventHandler goes of, I need to know in which array to store the kill. The script will eventually have to handle a lot more group names so I don´t want to use 'if' or 'switch' statements. I came up with this, because I already used a similar syntax using player names. _groupKills = str(group (_killer)) + "Kills"; //_killer is the unit passed by the EH call compile format ["%1 set [count %1, _victim]", _groupKills]; But it cannot work, because hint format ["%1", group (_killer)]; returns e.g. "B Alpha" if _killer is in team alpha. So the array would be called 'B AlphaKills' which is bad in many ways. I´ve got no idea where those "B"s come from, neither how to get rid of them. I´ve looked for methods to trim or edit characters in stings but haven´t found anything. I think an answer to one of the following questions would solve my problem: 1. Can I somehow obtain the name of a group as given via 'createUnit' and 'groupName = group _unit' in form of a string? (I need the exact name without any added characters) 2. Is there a feasible method to change individual characters in strings? 3. This would be more of a last resort but could I somehow rename the initial arrays to e.g. 'B alphaKills' despite the whitespace? 4. How would you approach this problem if you wouldn´t want to 'switch' through several groupnames to access their respective arrays? If you have any insights on this issue, please share. Thanks in advance! Cheers, CptBBQ
  6. *bumb* pleeease... there´s got to be a way to achieve this.
  7. I´d love to know if this works and how the exact syntax would look like...
  8. Ok, sure. But then only one player has a team to command. Sorry, I should have stated that this is not an option. Isn´t there a 'good' way to do this? Or at least better than what I did?
  9. Hi guys, sorry that I couldn´t think of a more fitting thread title.. :D I´m currently working on a 2 player coop mission and I want the players the 'share' their information on enemy positions. Basically, when one player spots an enemy, the other player should have him revealed on his map as well. The only approach I could think of was using 'knowsAbout' and 'reveal' although I know these commands are very limited in their potential. So I had to compromise, but it actually somehow works, kind of.. There are definitely more enemies revealed on the map and the overall situational awareness is indeed enhanced. BUT.. the enemy positions don´t seem to be updated correctly, only the initial 'reveal' is spot on, after that the markers often differ for both players, or some markers don´t appear at all. I already like this script, but I´m sure some of you would know a way to improve it. Or is there even an other completely different approach to this? Anyway, here´s the script, any comments appreciated. Cheers, CptBBQ
  10. I´ve corrected some other issues. Not use if it works now, but it should get you much further now.
  11. guys, I think this line here can´t work... I´d try something like this @Bashkire: exactly, helo1 isn´t defined, because it wasn´t created. You´ll need a whole other syntax. Try my example, but first get the classname of an adequate helicopter you want to use. I´d try armaholic.com for example.
  12. yes, provided that your helo1.sqf is in the main mission folder..
  13. Hi! No "all knowing eye" here but I´m pretty sure you´ll have to use 'getMarkerPos' instead of 'position'. The latter only works with objects. EDIT: Andy455 beat me to it. And put much more effort in it :D
  14. Well, you don´t. That´s what this helper script is about ;) Btw, while pimping my debug mode with the new syntax I made this little script.. It copies map positions to clipboard, nothing spectacular but it saved me some time already so I thought I´ll put it out there. Cheers, CptBBQ
  15. You´re welcome =)
  16. isServer returns true on a dedi and for the host on lan isDedicated returns true for the dedi isPlayer returns true for every human player (including a lan host) And I think your assumptions are fully correct. Although some commands, like 'setPos', are broadcasted in multiplayer even though executed locally. At least I think so...
  17. Heh, finally =L2D=Curry gets some credit for his work^^ And as I see it, Big Dawg already used it in combination with compiled functions. So, is there any reason, to use 'addAction' the way it was intended? ;)
  18. Sorry for gravedigging but I just stumbled upon this little script and I´m really loving it :) I got a quick question though. As you mentioned, it is not recommended to execute complex code and apparently one cannot use code that contains single quotation marks ('). I was thinking coulnd´t one just compile any kind of code and call it within the added Action? Would this method still be limited to 'simple' and short code? Cheers, bbq
  19. Hey everyone! Sorry to bother you again but I don´t think I´ll solve this one without help. Lately I was playing around with display EHs and I decided I had to make my own 'turbo' button for some vehicles.. :D Atm the whole thing is called from init.sqf. It worked just fine until I added the check for the vehicle type (see the red parts in the above code). (_veh in _atv) returns 'false' because (vehicle player) always returns "B 1-1-A:1 (CptBBQ)" (where CptBBQ is my profile name, obviously), no matter whether I´m on foot on in any kind of vehicle. I´ve used the exact type of syntax to check for vehicle types in other scripts without a problem. I also tried slight variations of the same syntax but to no avail. Any suggestions are much appreciated. Thanks in advance! Cheers, CptBBQ
  20. Ok, but how will this behave when the randomized location is occupied by another unit, vehicle, building, etc...?
  21. Hehe! Actually, you gave me the idea, nuxil :D Last time the vehicle was AI controlled, so the part about the action key wasn´t really needed - but also not overlooked ;) But while we´re at it, let me hijack my own thread... I just tried to teleport the player near the position of another unit. The player shouldn´t be placed on that units toes so just using setPos wouldn´t do it. I guess adding some offset would help, but could be problematic in crowded urban environment (at least I think so). Scanning the biki I found the setVehiclePosition command which looked perfect for that purpose. So I tried which placed the player within a 20m radius of the target unit. But then it gets weird: The player model becomes invisible depending on the direction I look. Yes, you read that right^^. I don´t see my own player model neither in 1st nor in 3rd person view when I look in one or more certain directions. In tactical view the model remains invisible the whole time. I can tell it´s still there, because I´m able to interact, collide and leave footprints on the ground. Frankly I suspect my Arma installation to be somehow bugged because this is by far the strangest behaviour I´ve observed in the game so far. But maybe someone has made similar experiences or there´s even some known issue with setVehiclePosition...?
  22. *facepalms* I guess I wasn´t using the exact same syntax in another script then :o It now works just as it should, Celery. Thank you for your advice.
  23. Thanks nuxil! The "sleep 0.01" did the trick. I´ll just have to adjust _speed depending on the vehicle. But that´ll be just a little trial and error. :bounce3: Cheers, Bbq
  24. Hi everyone, I´ve ran into a problem I just can´t explain to myself. I´ve taken this code from the biki: It should accelerate a vehicle in the direction it´s already heading towards. I just changed it a little so _speed isn´t added to the velocity but velocity is set to _speed. I need to use this script on two different vehicles: Old_moto_TK_Civ_EP1 and S1203_TK_CIV_EP1 With the motorcycle everything works as intended but the car just makes a small leap, and then it stops abruptly. I´m completely baffled about this because the only difference in the code is the vehicle classname. Any ideas? Thanks in advance, CptBBQ
×