Jump to content

Rommel

Member
  • Content Count

    1225
  • Joined

  • Last visited

  • Medals

Posts posted by Rommel


  1. Nevermind

    ---------- Post added at 02:25 PM ---------- Previous post was at 02:19 PM ----------

    _pistol = {if (tolower(getText(configFile/"CfgWeapons"/_x/"nameSound")) == "Pistol") exitwith {_x};nil} foreach (weapons player);
    if (isnil "_pistol") then {hint "no pistol";} else {hint ("you have an " + _pistol);};

    Since they all inherit from the pistol class. :rolleyes:

    Thanks to http://browser.dev-heaven.net/cfg_weapons/config/glock17_EP1?version=27 for allowing me to find a value that was inherited from the pistol class, and pretty much is consistent with ALMOST ALL pistols. Tested with all OA pistols.


  2. Hehe, I don't question what people who have specific situations or requirements want.

    But I'd say 99% of the mission makers who don't have those requirements, would prefer something simpler. Such as this example.

    ;)

    I'm not vindicating those who use more complex solutions; simply saying this is an easy one for those who are looking for an easy solution.


  3. I've noticed a lot of people do complex IED scripts, when really, the simplest and best (from my own experience) is having actual AI detonate a satchel charge on the road.

    It has the best 'average' stopping power, not always killing, but not under powerful either.

    It can be stopped by killing the suspect who planted it; without any scripting.

    It has to be planted during game play. Giving two elements to an objective.

    Attached a mission on how this can be done. ;)

    http://dev-heaven.net/attachments/download/7928/ied_example.Takistan.7z


  4. FYI - if you rename the ADDONS folder then you *MAY* disable a lot of other custom content (mods) unwittingly (like skins).

    If you rename just the DTA folder then that seems to give you pure ARROWHEAD plus whatever is in your mod line.

    Don't quote me though - I don't understand it, I'm just trying different things and different mods require different files.

    You should NEVER have put custom addons in your addons folder... and if your running ArmA2 Dependant mods, of course they won't work. :rolleyes:


  5. Yes it is possible. Special usage of select player command on a newly created local unit. On my iPhone ATM but let's see how I go...

    Run this script in a killed eventhandler.

    _group = creategroup resistance;
    _unit = _group createunit ["classnameofunit", getmarkerpos "indespawn", [], 0,  "NONE"];
    selectplayer _unit;
    

    add a private statement in too.

    You could modify that to give the effect of 'replacing' another unit. Or you could change the locality of a unit via groupings and then switch the player


  6. Ok, so if i have a second task.sqf (called task_2.sqf) with the extra task inside and call it with a trigger it will show for every pleayer in MP, no problems there ?

    Correct, lets presume your trigger fires off on an OPFOR Not Present. The trigger has an OPFOR man at the start. Lets look at the following (common) case.

    OPFOR is killed.

    Trigger fires OnAct, extended tasks are added to all players.

    Player leaves, player rejoins.

    As long as that trigger condition is still true, (ie OPFOR not present), then it will fire the onAct for the JIP. If another OPFOR man has entered that trigger during his reconnection, then it will not fire off, as it is not true.

    If you want it to go off regardless once it has done it once, then you need to setup a way for the server to tell clients that, this can be done by two triggers, one with the briefing and the original OPFOR not present.

    I updated the example mission for you so you can see how to do this.

    For more information on how to updating tasks, see the following:

    http://forums.bistudio.com/showthread.php?t=73424

    Especially the taskhint function found in a link in that thread is very useful. :rolleyes:

    Again though, the point of this is simply to ease the creation process, updating tasks/briefing remains the same. So if your reading that thread, and want to use this (simple) system, start reading from 'other commands' onwards.

    OTHER GOOD INFORMATION: http://www.kylania.com/ex/


  7. thanks rommel, but how do you create new tasks while playing ?

    So you have task1 and task2 shown during briefing screen and if task1 is finished a new task (task 3) is created.

    My best suggestion (I did just write up a script that allowed for task dependencies, but it was too linear), is to simply write multiple task.sqf files, naming them maybe taskset1.sqf, taskset2.sqf, and then executing them at different times (perhaps via triggers), obviously it depends on how dynamic your mission is, if your doing something more complex, then perhaps it may be better for you to spend the time making it yourself.

    This does not and isn't made to handle the UI or the handling of tasks past the initialization.


  8. Hope this helps.

    briefing.html

    <html>
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
    	<title>breifing.html</title>
    </head>
    <body bgcolor="#FFFFFF">
    	<! --- ----------------------------->
    	<! --- DEBRIEFINGS        -->
    	<! --- ----------------------------->
    
    	<hr>
    	<h2><a name="Debriefing:End1">Ending #1</a></h2>
    	<hr>
    	<h2><a name="Debriefing:End2">Ending #2</a></h2>
    	<hr>
    	<h2><a name="Debriefing:End3">Ending #3</a></h2>
    	<hr>
    	<h2><a name="Debriefing:End4">Ending #4</a></h2>
    	<hr>
    	<h2><a name="Debriefing:End5">Ending #5</a></h2>
    	<hr>
    	<h2><a name="Debriefing:End6">Ending #6</a></h2>
    	<hr>
    
    	<! --- ----------------------------->
    	<! --- End of DEBRIEFINGS     -->
    	<! --- ----------------------------->
    </body>
    </html>

    Also updated first post to include file link to example.


  9. It would seem that a lot of people make briefings, but it just seems so tedious to watch them write out 10 lines with paragraphs fully integrated and it just seems silly. :eek:

    I've used this solution for a while now, gives full functionality so I don't see why you wouldn't.

    If your not sure from the layout how it works, I'll expand on it more, but it should be pretty simple.

    EXAMPLE MISSION - LINK

    One thing to note, is that it comes out in order, you don't have to reverse your briefing so it comes out properly, thats already done, so just put as you would 'want it to look like'. ;)

    Briefing.sqf

    [
    [
    	"Situation",
    	[
    		"Following the collapse of the Takistan Goverment, NATO forces are now conducting security and stability operations in Takistan. The Takiban maintain highly operational terrorist cells in the regional and mountainous areas; conducting small scale attacks on local populations in an attempt to overthrow the fledgling NATO backed goverment.",
    		"C/S 13D will be assisting in this operation"
    	]
    ],
    [
    	"Administration and Log",
    	[
    		"The order of seniority, signals and any other necessary cmd. information will always be given out to you prior to action. If you join in progress, you must wait until you are assigned a unit. Combat after-action reports, are to be posted after the disconnected unit has returned to a transmittable location (field camp or safe location)."
    	]
    ],
    [
    	"Credits",
    	[
    		"Mission by Author"
    	]
    ]
    ]
    
    // do not edit below this
    
    call {
    if (not isdedicated) then {
    	private "_briefing";
    	_briefing = _this;
    	waituntil {not isnull player};
    	for "_i" from ((count _briefing) - 1) to 0 step -1 do {
    		for [{_k = (count (_briefing select _i select 1)) - 1},{_k >= 0},{_k = _k - 1}] do {
    			player createDiaryRecord ["Diary", [_briefing select _i select 0,_briefing select _i select 1 select _k]];
    		};
    	};
    };
    };

    tasks.sqf

    [
    [
    	"task1", //Task Name (GLOBALVAR)
    	[
    		"Seize the town of Garmarud for FF to advance.", // Task Description Paragraph
    		"Seize Garmarud", // Task Title
    		"Seize Garmarud" // Waypoint Title
    	],
    	getmarkerpos "mkr_task1_garmarud" // Task Destination
    ],
    [
    	"task2", //Task Name (GLOBALVAR)
    	[
    		"Return to Base", // Task Description Paragraph
    		"RTB", // Task Title
    		"RTB" // Waypoint Title
    	],
    	getmarkerpos "headquarters" // Task Destination
    ]
    ]
    
    // do not edit below this
    
    call {
    if (not isdedicated) then {
    	waituntil {not isnull player};
    	{
    		private "_task";
    		_task = player createsimpletask [_x select 0];
    		_task setsimpletaskdescription (_x select 1);
    		_task setsimpletaskdestination (_x select 2);
    		_task settaskstate "created";
    		missionnamespace setvariable [(_x select 0),_task];
    	} foreach _this;
    };
    }

    For tasks, use the taskname to update the task, ie from the example task1 above, I would use:

    task1 setTaskState "FAILED";

    EDIT1: Added link to example mission.

    EDIT2: Added secondary task for extended example.


  10. The reason its 'blinking' in and out, is because BIS are very busy. Doing the following is quite hard. ;)

    Remembering the only changes are:

    > to a < and > to a ==

    Ie

    if (_active && {_town distance _x > _spawnDisMax} count _players > 0) then {

    to

    if (_active && {_town distance _x < _spawnDisMax} count _players == 0) then {

    They won't blink at the moment if all players are in the same town, or all players out side of any towns. All or nothing basically.

    Hopefully coming in the next patch... then again that was posted up for Dwarden over a month ago now...

    http://dev-heaven.net/issues/11613

    I think in all seriousness for the delay is because the original author isn't around, and their scared of touching his scripts...

    ---

    If you need ALICE, use this as temporary fix: http://dev-heaven.net/attachments/download/7369/alice2temp.7z

    Just execute the module\alice2.sqf and it will work as it should, no blinky blink.


  11. This isn't by far finished, and I don't really intend to, but I'm sure someone will love it as is, if not improve on it. ;)

    Linky

    eodd.jpg

    I give full permission for someone to rip this apart and release it properly. All I ask is my name somewhere in the credits... even if its subliminal. :p

    It was put together for fun, and is by no means a great example of coding, but it does the job well enough.

×