Cellus
-
Content Count
116 -
Joined
-
Last visited
-
Medals
Posts posted by Cellus
-
-
Anyone had problems with this in 1.03? Every time I respawn they are all re-written. So, three objectives, four deaths, I now have those three objectives four times each in tasks. I've tried removing the killed handler. Not sure whether to start on fixing it or just go break something.
Ed: also tried removing it from init.sqf and execing it from an in-game trigger with 'local player' as condition. I'm gonna go cry...
-
Interesting. The answer is a few threads down from where Placebo dropped you
http://forums.bistudio.com/showpost.php?p=1364481&postcount=5
-
Hey how do you set the damage of an object like a building? I'm trying to destroy the entire city of Chernorgorsk and bombs are really innefective (and crash my game - about 200-300 of them).Also, does anyone know how to remove trees?
Stolen from elsewhere on these boards:
// place a game logic where you want to destroy the trees and pass gamelogic name and the radius of detruction. // nul=[location,radius] execVM"gclear.sqf" _location = _this select 0; _radius = _this select 1; _what = (nearestObjects [_location,[],_radius]) - ((getPos _location) nearObjects _radius); sleep 1.5; {_x setdammage (1.0)} forEach _what;Heh - too late ;)
-
-
I thought it was the Force Recon guys that had it, but can't 'look' at the characters files to figure it out. Mr Murray's guide has a script for this in it.
-
Oh, it's well worth de-pbo'ing all the add-ons that come with the game. This one is in characters/scripts:
/* File: selectRandomSentence.sqf Author: Joris-Jan van 't Land Description: Analyzes conversation partners and determines which tags should be used in selecting a sentence. A random matching sentence is then returned. Parameter(s): _this select 0: 'this' - speaking party - person for who tags are determined (Object) _this select 1: 'from' - spoken to party (Object) Returns: Sentence (String) */ private ["_personThis", "_personFrom"]; _personThis = _this select 0; _personFrom = _this select 1; private ["_tags"]; _tags = ["greeting", "question"]; //Determine partner combination. private ["_typeTag", "_sideThis", "_sideFrom"]; _sideThis = side _personThis; _sideFrom = side _personFrom; if (_sideThis == civilian) then { _typeTag = "civilianTo"; } else { _typeTag = "combatantTo"; }; if (_sideFrom == civilian) then { _typeTag = _typeTag + "Civilian"; } else { _typeTag = _typeTag + "Combatant"; }; _tags = _tags + [_typeTag]; //Two combatants are speaking to one another. if (_typeTag == "combatantToCombatant") then { //TODO: Does this apply to player? Or should he have the option to speak still? //Determine combat situation. private ["_behaviour"]; _behaviour = behaviour _personThis; if ((_behaviour == "COMBAT") || (_behaviour == "STEALTH")) then { _tags = _tags + ["inCombat"]; } else { _tags = _tags + ["notInCombat"]; }; //Determine rank difference. private ["_rankTag", "_rankIdThis", "_rankIdFrom"]; _rankIdThis = rankId _personThis; _rankIdFrom = rankId _personFrom; if ((typeName _rankIdThis) != (typeName 0)) then { _rankIdThis = 0; }; if ((typeName _rankIdFrom) != (typeName 0)) then { _rankIdFrom = 0; }; if (_rankIdThis > _rankIdFrom) then { _rankTag = "toLowerRank"; } else { if (_rankIdThis < _rankIdFrom) then { _rankTag = "toHigherRank"; } else { _rankTag = "toSameRank"; }; }; _tags = _tags + [_rankTag]; //Speaking to a lower-ranking combatant. if (_rankTag == "toLowerRank") then { _tags = _tags + ["to" + (rank _personFrom)]; }; }; //Determine instigator morale. //TODO: When negative, often don't approach at all? private ["_morale"]; _morale = morale _personThis; if (_morale > 0.3) then { _tags = _tags + ["positive"]; } else { if (_morale < 0) then { _tags = _tags + ["negative"]; } else { _tags = _tags + ["neutral"]; }; }; //Determine gender combination. private ["_womanThis", "_womanFrom"]; _womanThis = getNumber(configFile >> "CfgVehicles" >> (typeOf _personThis) >> "woman"); _womanFrom = getNumber(configFile >> "CfgVehicles" >> (typeOf _personFrom) >> "woman"); if ((_womanThis == 1) && (_womanFrom != 1)) then { _tags = _tags + ["femaleToMale"]; } else { if ((_womanThis != 1) && (_womanFrom == 1)) then { _tags = _tags + ["maleToFemale"]; } else { if ((_womanThis != 1) && (_womanFrom != 1)) then { _tags = _tags + ["maleToMale"]; } else { _tags = _tags + ["femaleToFemale"]; }; }; }; //Determine time of day. if ((dayTime > 6) && (dayTime < 12)) then { _tags = _tags + ["morning"]; } else { if ((dayTime > 16) && (dayTime < 22)) then { _tags = _tags + ["evening"]; } else { if ((dayTime >= 22) || (dayTime <= 6)) then { _tags = _tags + ["night"]; } else { _tags = _tags + ["day"]; }; }; }; //Determine surrender status. if (captive _personThis) then { _tags = _tags + ["surrendered"]; } else { _tags = _tags + ["notSurrendered"]; }; //Select random, matching greeting and gesture. //We want to access the config only once. if (isNil "BIS_coreTalkSentences") then { BIS_coreTalkSentences = []; BIS_coreTalkTags = []; private ["_cfgTalkSentences"]; _cfgTalkSentences = configFile >> "CfgTalkSentences"; for "_i" from 0 to ((count _cfgTalkSentences) - 1) do { private ["_candidate"]; _candidate = _cfgTalkSentences select _i; BIS_coreTalkSentences = BIS_coreTalkSentences + [configName _candidate]; BIS_coreTalkTags = BIS_coreTalkTags + [getArray(_candidate >> "tags")]; }; }; //Make a list of candidates which match all given tags. private ["_candidates"]; _candidates = []; for "_i" from 0 to ((count BIS_coreTalkSentences) - 1) do { private ["_candidate", "_candidateTags"]; _candidate = BIS_coreTalkSentences select _i; _candidateTags = BIS_coreTalkTags select _i; //Are all tags in this candidate? if (({_x in _candidateTags} count _tags) == (count _tags)) then { _candidates = _candidates + [_candidate]; }; }; //TODO: remove. //debugLog (format ["Log: %1", _tags]); //Select a random sentence from the candidates. private ["_sentence"]; _sentence = _candidates select (floor (random (count _candidates))); _sentenceI don't play with AI, so can't be more help than that.
-
-
You can have your end1 trigger condition
!alive guy and isnull obj1
, having the objective 1 trigger activation include 'obj1'. So, when it gains a value the endgame trigger won't fire.
Or is it isnil? I actually use 'not obj1', and declare it false in init.sqf...
-
For C, you'll likely want to use 'knowsabout', and setcaptive when it reaches 0.
For B, vehicle player. Easy enough.
A I'm not sure about, and can't access ArmA to test. There is http://community.bistudio.com/wiki/weapons, but I haven't used it before, so can't be sure of its use. Likley you'll be wanting to test if it returns a null array, but I can't be specific, sorry. If nothing else, this will bump the thread for someone who knows what they're doing will see it and help you :p
The AI conversation is indeed possible - but I'm out of time. If nobody comes along beforehand, the random coversation between AI has it's own little script (I believe it's annotated, from memory) in the de-pbo'd add-ons in the game. Search there if no one has it handy.
-
I would hazard a guess:
Con: !alive radar
Act: iglaName setVehicleAmmo 0
For the other... I would politely ask to use the search function, and ask specific questions in any number of those already about: http://forums.bistudio.com/showthread.php?t=76545
-
One trigger, at exfil, with condition
this and not alive badguy1 and not alive badguy2
Or, if you want to look more like you know what you're doing,
this && (!alive badguy1) && (!alive badyguy2)
:p
Ed: Looks like just the 'this' part you're missing.
-
How do you order a unit into a building, or check whether a bridge is out, using the helipad?
-
Teamswitch on death should work now, if the patch is a success...
Ed: By the way, when making a title, please consider the people coming after you who will attempt to find a solution to the same problems using the search function (or just for people who are browsing).
-
The easiest thing to do is create a radio trigger, and rename it by typing whatever you want in the text field. I'm sure there are other things you could do...
-
I run a unit-specific .sqs from init.sqf, but with quotations:
["u1"] exec "UNIT_teamlead.sqs";
If that doesn't work, tell us what is in your .rpt.
-
Call respawn.sqf from init.sqf
Have within it a killed event handler
player addEventHandler ["killed", { [] spawn { waitUntil { alive player }; execVM "weapons.sqf"; }; }];With weapons containing the loadout
if (side=west) then { removeallweapons this; et cetera;};Or something similar...
-
There is nothing wrong with the modules - only their lack of documentation (ie they are configurable). It is coming, however. The 'empty' option is the same as placing a unit - Bluefor, Opfor, Civ, Empty, couple of others in that drop down. If you don't already have a player unit you'll need to select 'non-playable' from the control menu. You could also select weapons from the briefing screen before the game starts if you'd prefer. Just search the scripting forum here and at OFPEC and read Murray's Guide.
-
Search Armaholic for Mr Murray's editing guide.
A further great example is the textmessage which displays the information who killedwho. This option is a special feature espacially for the Multiplayer games. The
Eventhandler needs to be given to all units which are dedicated to. The Syntax looks as
follows:
{_x addEventHandler ["Killed", {hint format["%1 killed by%2",
_this select 0, _this select 1]}]} foreach [s1, S2, S3, S4]
Which should be good enough for a base for whatever you need doing.
-
The engine makes the pbo. Export to multiplayer (under save in editor), which I think puts it (the pbo) in game directory MPmissions. There'll be a folder in documents (not a pbo), for me under Arma2 other profiles --> Cellus --> missions. When you select 'new' on the multiplayer screen does the mission show up?
-
init.sqf, not the box in the editor. What Tigga said for the box thing, but it's better to run it from init file I reckon. And just after I posted that I realised you could just as easily move the respawn_west marker around the same way (more or less), which would probably be a preferred way. Anyhow, this IS 'on killed' - it's an event handler, not a looping script.
-
You needn't name the player. Get rid of this [sidebase] in the event handler. Put a location in the location field :rolleyes:. You might put a marker in named 'here', so location is '_location = getMarkerPos "here"; ', then move the marker depending on the objective. Don't forget to update the tasks in the killed handler. When I went to test this, I just ripped the briefing update out and whacked the setpos in:
init:
[] execVM "Respawn.sqf";
Respawn.sqf:
if ( isNil{player getVariable "mk_killedEHadded"} ) then { player addEventHandler ["killed", { [] spawn { waitUntil { alive player }; player setPos getMarkerPos "here"; }; }]; player setVariable ["mk_killedEHadded", true]; };Then stick in whatever else - tasks update, spawn resistance maybe, valkyries riding off, i don't know - whatever it is you lot do when you get risen from the dead/ drop fresh troops at the front line. Then just move the 'here' marker around with the objective.
-
Really helpful thread! This should be sticked, much help sources here for scripting. I never even knew that wiki was out there. Thanks for posting those links!:confused: There IS a sticky with all this. And the first link is to that wiki. :cry2:
-
Oh, that wasn't a suggestion - I just couldn't find a way to not make it work. Is it only when you team switch, then? Surely that's not in MP? Unless respawn does the same thing. They're working on team switch for the next patch (to get the switch on death menu option working) - don't know if that will affect this...
-
Having an un-synched arty module works. Also a synched arty. Empty and captured from enemy, normal rifleman, etc. Just put down arty, player and module and all was good.
Tasks not completing in multiplayer?
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
That'll do.