Jump to content

CptBBQ

Member
  • Content Count

    93
  • Joined

  • Last visited

  • Medals

Everything posted by CptBBQ

  1. As I understand, addAction only executes the script on the client the action is used on. If you´re using CBA you could do it with CBA_fnc_globalExecute Works great for me :)
  2. Oh, I see =) I haven´t tried DAC yet, and I didn´t get the info from your screen shot. I wasn´t so much trying to help but more interested in the point of your request ^^ That "typewriter" effect is indeed a neat idea...
  3. I don´t see what the first 'hintSilent' is good for... Why not use something like this? hintSilent parseText format["<t size='1.15' font='Zeppelin33' color='#81B1E1'>test<br/>%1<br/>%1</t>",_text];
  4. I don´t think this is exactly what you´re looking for but it might help: addWeaponPool Cheers!
  5. Hi folks! Sorry for the topic, but I don´t think either of these questions deserves it´s own thread^^ .. so here we go.. 1.) What´s the performance impact of actions added with 'addAction'? I usually do not remove actions that are used more than once. Instead I use a variable in the condition and change it to 'true' whenever the action should show up. Now I´m facing a situation where I´d have to create a whole lot of actions (30+, within sub-menus and sub-sub-menus) in a few-players mp environment. It would be quite a pain to delete and re-add the actions, but I fear this could tear down our already wavering server performance. Probably only a dev can know this for sure, but I´d be happy with some educated guesses from someone more experienced with the game engine. Of course, just stating 'how you would do it' would already be of great help :) ... and now for something completely different... 2.) Is there some kind of limit to the number of markers the game can handle? In another context, I created a bunch of markers (within the editor) as a basis for an AI-waypoint/spawnpoint grid. I got a little carried away there, and ended up with quite a lot of markers. Later, while testing several scripts within this mission, I received a number of errors all related to a few markers which seemed to be inexplicably missing. I couldn´t find them in the editor either so I replaced them. But the same errors occurred later with other markers, and other scripts using markers also behaved strangely. My solution was to delete a bunch of markers from my grid and now everything is back to normal. But that whole thing got me curious. Is there a known fixed limit for markers? If so, is there a way to get around this limit? Thanks for reading all this. Any ideas are appreciated. Cheers, CptBBQ
  6. Thanks neoKika! I guess I will remove the actions after all. Regarding the marker limit: it probably takes an unusual amount of markers to hit the limit. I´ll see if I can create some kind of reproducible test for this.
  7. You´re 18 days early, twirly ;) Regarding the topic: never had that happen to me. Maybe attach an invisible H to the vehicle and attach the units to it. Don´t know if this will change something, but maybe weird script behavior can be countered with weird scripting^^
  8. yeah I know... That would make sense. So, I guess you would remove and re-add the actions instead of hiding them?
  9. Thanks for the reply! I should clarify some things: about 1.: I was referring to the actions themselves, not the scripts they´re calling. Those actions regularly have to check whether their condition statements are true or false. As I can tell from their ingame-behavior, this happens very often, because actions hide and show very quickly when the condition changes. The cpu usage should be depending on the complexity and number of condition statements. In my case there will be some booleans for each action that have to return 'true' for the action to show up. I was wondering what the impact on client performance (ignore my gibberish about server performance above^^) would be, if you had 30-something actions checking for their condition to become true (or false) at any time during the game. about 2.: sadly, my observations aren´t very scientific, so I´m not even sure I´ve got the problem pinpointed here. I figured I wouldn´t be the first one to experience this if such a limit really exists...
  10. Hi all! I guess this should be already a known issue but I couldn´t find anything about it in the forum. So just to be sure... After experiencing some strange behavior in one of my scripts I did some debugging. Amongst a lot of other things I ran this line on a number of different objects: _target setPos getPos _target; As I understand it this line should not produce any observable results, but actually all of the tested objects changed their positions. The particular offset seems to depend on on the object type. E.g. an AA Pod moves backwards a few meters with each iteration while 'Fort_Barracks_USMC' sink into the ground and others are lifted into the air. Then, I wanted to know if the position is read incorrectly or set incorrectly. _target = cursorTarget; _pos = getPos _target; _target setPos _pos; hintSilent format ["%1 ### %2", _pos, getPos _target]; The two positions returned differ from each other. That means 'getPos' determines the precise position and then the object is 'setPos'ed to a proximate position with a constant offset to the actual position. This raises a few questions for me.. First of all: are my conclusions correct? ^^ But also: am I the only one who´s bugged by this? Has anyone found a workaround? Is this regarded a bug? And if so, is it already reported? Yes, there are probably very few situations in which this issue should become problematic - but I´m currently in one of those situations so any feedback is appreciated. Thanks for reading, even more for answering ;) Cheers, bbq
  11. Heh, at least I´m not the only one concerned with this^^ Maybe it´ll get fixed sometime, until then I´ll use Faguss´ workaround. Thanks for all the info guys!
  12. Using setPosASL actually reduces the offset for most objects. That´s already a great help. Thank you, shk. Well, what I´m trying to do (or already did) is not actually ruined by this 'bug' but it was a medium annoyance (now degraded to minor annoyance^^) I made a script that allows players to build a small outpost with sandbags and static weapons (like in warfare but much simpler). I recently expanded the script to be able to 'copyToClipboard' the type, position and direction for each fortification, static weapon and so on. The information is stored as executable code which can be pasted and called again in a later mission. It actually works pretty fine but I noticed that some objects (especially static weapons) aren´t placed correctly. I think I can live with it as it is now. But still, if anyone knows how to place objects really really precisely, I´d be more than interested.
  13. Hey fellas, I´m looking for a script that determines which type of magazine a given static weapon uses. I know it´s somewhere in Xeno´s vehicle repair script but I´ve got no idea how to rework it for my needs. Maybe someone here knows a quick way to do so. Thanks in advance! Cheers, CptBBQ
  14. You´re wellcome =) Though I´d expext some troubles with statics and vehicles with a differing class structure.
  15. Thanks, Clayman! Will give it a try as soon as I´m home from work.
  16. Hi all, cool thread. I read up on the issue recently and found this very informative wiki page: http://community.bistudio.com/wiki/showCommandingMenu But there are still some questions left. For example this argument.. ...sets the menu item to inactive from the beginning. I´d guess then there should be some way to activate it later on, but that´s not mentioned anywhere... Is there any way at all to change/delete/manipulate menu items during the game? Any ideas? Thanks in advance, bbq ------------------------------ edit @ Clayman and SNKMAN: I did this with something like if (player == player1) then {add player specific menu options}; of course I´ve named all playable units accordingly. Tested on dedicated server without problems so far.
  17. I took a look at the cfgVehicles.. according to the class structure given and the syntax you guys are using the right code should be: _mags = getArray (configFile >> "CfgVehicles" >> typeOf _veh >> "Turrets" >> "MainTurret" >> "magazines"); And guess what, it works! At least with a tow launcher, I haven´t tested any other statics or vehicles.
  18. I´m pretty shure I´ve tested that syntax. But on e.g. a tow launcher it only returned 'FakeWeapon' ...
  19. Uh sorry, I probably should´ve explained a bit more... I want to rearm any static weapon within a certain radius, so I need do determine what magazine the given weapon uses, even if the weapon is currently empty. I guess I´ll have to get the classname from the vehicle config but I dunno how... --------------------------- edit: got it working now. thank you W0lle.
  20. OMG! I didn´t know attachTo would work that way, too... that makes everything so much easier. Thank you, Sel! PS: to be fair to myself, the biki doesn´t state that the offset is optional =)
  21. Hi there! I need to be able to attach any two objects to each other, without changing their actual positions. For example, vehicle A is standing in front of static weapon B. B is attached to A, but doesn´t change position. Only if A moves, B moves along. First thing I tried was this: _obj attachTo [_target, _target worldToModel (getPos _obj)]; ... seemed obvious to me, but didn´t work as expected. The attached objects z-axis-position changes. Most of the time the object disappears underground, but some objects hover above the ground. I guessed there´s some arbitrary offset build into the worldToModel command. So I tried using the objects original z-position as the vertical offset, but still, most objects are attached above or below their actual z-position. Has anyone experienced similar problems? Any chance there´s a workaround? Any help is appreciated! Cheers, CptBBQ PS: I know my example can be solved with different techniques, but for the actual purpose it´s very important that the object remains at it´s exact position when attached. I never had such problems with attachTo before
  22. Since it´s part of the topic: has anyone ever tried to create colored radio triggers?
  23. Hi all, with =L2D=Curry´s permission I made a few changes to the script, so it can handle additional arguments passed to the code. Like this.. this addAction ["Say Hello World!","gen_action.sqf",["player sideChat format ['Hello %1', _this select 3];", "World"]]; It´s still compatible to actions made for the original version of the script and, of course, you can use the extended syntax, too. For some reason I cannot attach a file to this post... :confused: so here´s the code. Have fun! Cheers, bbq.
  24. Hi all! I´ve got a (hopefully) small problem with a mission I´m planing. Basically I want to make a scud missile detonate prematurely on launch. So the explosion would have to occur about 10m above the ground where the warhead would be located. Problem is, all noteworthy explosives I found are bombs which fall down before detonating. Too bad the missile itself doesn´t collide with other objects... I currently use the ammo class 'ace_fuelexpbig' as a substitute which is too small for my needs. The only other way I can think of would be a nukeAirBurst, which again is a little to big ^^ Any input appreciated :) Cheers, bbq
  25. Awesome! Thanks a lot, AZCoder. I just did a little tweak and changed _warhead = createVehicle [_explosive, [_bombLocX,_bombLocY,_bombLocZ], [], 0, "CAN_COLLIDE"]; to _warhead = createVehicle [_explosive, [0,0,1000], [], 0, "CAN_COLLIDE"]; that way the bomb itself isn´t visible to the player at any time. Cheers, Bbq
×