-
Content Count
556 -
Joined
-
Last visited
-
Medals
Everything posted by Bon
-
Who started action? (addaction)
Bon replied to der.hannes's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Have you ever read the wiki page of addAction? -
I am sorry but I think you didn't understand me correctly. It is not only that you can't switch back to your old uniform. Everything scripted, really everything, starting with the code in the Init.sqf to every other script loaded at missionstart, will be gone (or, better said, remain to the old entity) by switching into another unit. Your script is a nice thing for everyone who creates missions exclusively in the editor, with no scripts involved. Once there are scripts involved, at least some code initialized in the Init.sqf script, your uniform changing script gets incompatible to usage. I failed this task to change player model during game already in Armed Assault. Perhaps it is possible to workaround it (but I don't know any way). However, it requires more than just creating a switchable unit. And if you find a way, you will be my hero of the day :)
-
The main problem remains: All that you scripted is assigned to the initial unit. Once the player switches to the new entity, this is gone, i.e. stays with the old unit, which gets deleted then. Try it out: Add the action to call this script to your player unit in the init.sqf. Then this action is available only for one time. The new unit won't be able to change the uniform again.
-
Dialog Control question
Bon replied to zonekiller's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Actually I dont know. But there is the command closeOverlay, perhaps you should give it a try. -
Dialog Control question
Bon replied to zonekiller's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Then you have to create an overlay instead of a dialog. The command for this is cutRsc, e.g. cutRsc ["TextDialog","PLAIN",4]; -
Obstacle course timer
Bon replied to icebreakr's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I assumed its for SP purposes only. To avoid the trigger to be executed on every machine when a certain player enters it, you can simply replace the condition of the triggers from "this" to "player in thislist". Then the trigger is only executed on the machine of the player who actually entered it. To get the name/nick of a player the command is (what a surprise) name. Hf. -
Obstacle course timer
Bon replied to icebreakr's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Should be simple. Activation Code in first trigger: _nul = "start" execVM "timer.sqf" Activation Code in second trigger: _nul = "end" execVM "timer.sqf" timer.sqf: if(_this == "start") then{stopwatchtimer = time; hint "time is running..."}; if(_this == "end" && not (isNil "stopwatchtimer")) then{ hint format["Total time: %1", time - stopwatchtimer]; stopwatchtimer = nil; }; EDIT: Damn, someone else was faster ^^. However, too similar approaches, might help you. -
Advanced Artillery Request System
Bon replied to Bon's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
It is totally MP compatible (as all my work is), on a hosted environment as well as on dedicated servers. Just make sure you have a game logic called "Server" placed onto the map. -
The Artillery System I published now in the "Mission Editing and Scripting" area. http://forums.bistudio.com/showthread.php?t=93200 Hf.
-
interactive dialog control
Bon replied to Bon's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Can't remember, to be fair I think I have it from an evolution mission. But there is a very general way to get those information, is to look at how the Bohemia codemonkeys does it themselves: Unpack the "Addons\ui.pbo" located in your ArmA2 installation directory. It contains all the files related to ingame menu, menu buttons, -backgrounds, aso. Inside you will find a config.bin. That is, among other things, the binarization of the .hpp files. Use a tool (e.g. unRAP) to re-convert it. The rest is only a thing of searching and copy-pasting. -
interactive dialog control
Bon replied to Bon's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Take a look at ctrlMapAnimClear ctrlMapAnimAdd ctrlMapAnimCommit EDIT: In case you need an example you can take a look into my "Hunt Waldo 2" mission. There is a spawn dialog using all these features. The collaborating files are - dialog\Common.hpp - dialog\Spawn.hpp - funcs\func_spawndlgUpdate.sqf -
interactive dialog control
Bon replied to Bon's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ok nevermind, found out that I was looking for control type "CT_EDIT", that does the trick. Sorry for that, am not very experienced in UI scripting yet. -
Image dimensions not 2^n?
Bon replied to *NOB* Džou's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
2^n means the image size must be of power of 2, i.e. either 128 x 128 px, 256 x 256 px, 512 x 512 px, aso...... 1,2,4,8,16,32,...,512,1024,2048,... -
Custom Loudouts messing up
Bon replied to SigintArmA's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No, what he wants is just to delete everything in the inventory, weapons as well as magazines. This is already done by "removeAllWeapons". You use "removeMagazine" or "removeMagazines" if you want to remove only particular magazines out of the inventory. In this case, just drop the command. Try to write your very first command of your post into the unit's init line, but without the "removeAllMagazines this" part. -
Custom Loudouts messing up
Bon replied to SigintArmA's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
There is no "removeAllMagazines" command in ArmA2. -
If statement combined with or statement
Bon replied to ADuke's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Your code should work, you just have a syntax error in it. Take a look at the braces: if ((count (crew _unit) == 0) or (!alive (driver _unit))) then {...}; What you can also do is combining conditions with the count statement: if({alive _x} count (crew _unit) == 0) then{...}; returns true if there is no more crew unit alive. -
How does CIV AMBIENT WORKS
Bon replied to desusa's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The Ambient Civilians module is called ALICE, and you can enable it just by placing the particular module onto the map. On default settings civilians will be created in a location when a player comes closer than 1000m, but can be customized in many aspects. Here the description: http://community.bistudio.com/wiki/Ambient_Civilians Be advised: I tested this module recently and it seems that created civilian units do not get deleted automatically (placing a garbage collector module doesn't work also). After a flight over Chernogorsk and Elektrozavodsk I had about 500 civilian units created, leaving any location did not get them deleted. Furthermore consider this happens for each client machine connecting, so I assume this module is nothing but server machine overkill when you are going to use it in MP context. (BTW same for Animals) -
Simple injury system. Working with JIP and respawn.
Bon replied to Bon's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I've improved and finished this little script in a way that: you can drag and drop bodies the healing person is now always in the correct position beneath the wounded person fixed: the marker of the injured person will disappear now when the person disconnects while in agony Note: you can simply modify this small injury system to provide a revive functionality by increasing the "rambovalue" (the threshold of a hit considered to be deadly, I think this name is appropriate :D ) in the Init.sqf to a very high number. Further details in the included readme. An updated demonstration video will follow due to the next days. -
Would be interesting to know HOW you actually disable the mine. In case you just delete it, the condition to ask for would be: isNull Mine1 I assume the game engine does nothing else: It deletes the mine (and adds one to your inventory?).
-
how to get weapon names and icons
Bon replied to Bon's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Nop that returns an empty string only. As I found out there is a config entry in CfgWeapons called "UIPicture", which, querried, returns a path to a .paa file. _pic = getText (configFile >> "CfgWeapons" >> "G36a" >> "uipicture"); Unfortunately, using this picture in a dialog, or simply putting it into a parseText string no icon or picture appears at all, e.g. _pic = getText (configFile >> "CfgWeapons" >> "G36a" >> "uipicture"); hint parseText "Test: <img image=_pic/> Test2"; returns Test: -
how to get weapon names and icons
Bon posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi all, I have the classnames of a bunch of weapons and magazines, .e.g. "30Rnd_556x45_G36", now I want to add the names and icons of these into a dialog control as it is done in the gear menu, e.g. "G36 Mag", and the small icon right-hand side of it. Does anybody know how to do it? Should be actually possible since ACE2 or Benny.'s Warfare are using a custom gear menu with these names and icons as well, but I have a hard time finding it out on my own with still no success. Cheers, Bon. EDIT: I managed to find out how to get the name: _name = getText (configFile >> "CfgMagazines" >> "30Rnd_556x45_G36" >> "displayName")), for weapons I have to use the CfgWeapons config file of course. Icons left. I assume it is stored in the config entry "icon" instead of "displayName", unfortunately I do not know how to extract this entry (getText and getArray return an empty string/array), also I don't know how this entry could look like, i.e. how to hanlde it. Is it perhaps the path to a .paa? -
One last update: Added the function so that you can set a limitation to each of your equipment presets. At this state, for everyone who do not exactly understand what this script does, you can say it is very familiar to the Project Reality kit system. Hope someone will find it useful. Hf.
-
Hi kju, you can open this menu by a simple script execution. In this menu choose between predefined weapon/magazine loadouts and press "Equip" to equip with this loadout. It just works for your own player entitiy and does not safe the loadout for respawn, however, since it is only a script call you can integrate it in such functions very easily on your own. My intention was just to prevent that, at the beginning of a mission, all players run from box to box to gather his/her desired equipment, which often takes a long time. With this menu popping at missionstart every player can choose between loadouts by one mouseclick so it won't be even necessary to place any weapon/magazine boxes onto the map. I added another functionality to the script, to make it as easy as possible to define such loadout presets. Its all now just to equip ingame at ammunition boxes and click on a radio button to copy the preset in the correct form to the clipboard. The included usage instructions are detailed and easy to follow.
-
Simple injury system. Working with JIP and respawn.
Bon replied to Bon's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yep, done. Thanks for the recommendations. -
To exit the script from within the script itself the simplest way is if(true) exitWith{}; The true you then can replace by any condition you want. This command is supposed to exit the current scope, but works a charm in script scope itself. Here the detailed description: http://community.bistudio.com/wiki/exitWith