-
Content Count
668 -
Joined
-
Last visited
-
Medals
-
Medals
-
Posts posted by Ghost
-
-
Yea I cannot figure this one out. I guess its a tough one.
-
Thank you for the link Deadeye. Always better late than never :)
-
unfortunately _name is a string and the commands are looking for object.
-
I am trying to kill the players group AI when a player disconnects from a dedicated server for whatever reason. I have been searching and trying many different things for this and cannot get it to work. disabledAI = true; what i have so far is in the init.sqf i put
if (isServer) then {onPlayerDisconnected "xhandle = [_name] execVM ""dta\scripts\playerdis.sqf""";};then in playerdis.sqf
_grp_player = group player; { _x removeAllEventHandlers "killed"; _x setdamage 1; hidebody _x; sleep 2; deletevehicle _x;} foreach _grp_player;Currently the AI do not die or anything and when a player joins the same slot again the AI will follow him like they are part of the group, but the player is not able to command them. When you shoot them they are reported as 1 is down.
-
-
wow. I totally messed that one up. I do not believe you can adjust that besides changing the difficulty setting.
-
Awesome, needed to know this for several things. Thnx. :)Out of interest, is there a reason to use && instead of and. I have used and in other triggers, all seems to work fine.
there is no difference. Just different scripting styles
-
remove that task from your briefing file and put it in a trigger or script file that is actiavted when it is needed. Other option would be to put it in an if/then statement.
if (objcomplete) then {your task code};now you just define the objcomplete in your init.sqf like
objcomplete=false; publicvariable "objcomplete";
so once the condition is right have a trigger with onactivation of
objcomplete=true; publicvariable "objcomplete"; and your task code or script to run your task code
having the if/then statement will keep the code in {}; from activating until the () code is true. This is great for respawn so you dont lose the status of your task.
-
Thats good to here. I had trouble at the start with going from sqs to sqf, but now it is so much better. Glad to hear it is working for you. :D
-
for onmapsingleclick try implementing this set of code
mapclick = false; onMapSingleClick """arty"" setMarkerPos _pos; clickpos = _pos; mapclick = true; onMapSingleClick """";true;"; waituntil {mapclick}; _pos = clickpos;so _pos is the position of mapclick. Change arty to your marker name. Pay attention to how many "" are used. Might be excessive at the end but does not give errors and works. I read somewhere thats how you end a mapclick.
-
did you check your rpt file under application data? I have the folder open to check my rpt for script errors.
-
Thank you all for the replies. At the spawn there is an Officer that when you get close to will give you the options via action menu to: change viewdistance, recruit ai, and halo. Once a unit is recruited he will join your group and you control him like normal.
** Update **
I added a poll, please vote
-
Not everyone (points at self) have played since OFP, and it's not obvious at all. Not something that warrants fixing, but something that one could obviously make a mistake with. Fact is I'm not the first one to get confused by this.Rectangles have no radius ;)
good link for you http://community.bistudio.com/wiki/ArmA:_Mission_Editor#Triggers_Mode_.28F3.29
look at trigger axis descritpion.
-
I noticed after a long time working on this mission someone else has a similar named mission. If anyone has some good ideas for a name for this mission let me know but please play it first before giving me a name suggestion. I have been tweaking this mission for a while now, developing new basic scripts, expanding my mission making knowledge. I know it can be buggy and some things arent perfect but it has been tested on a dedicated server with 1-4 people and after numerous trys and many hours we finally beat it.
http://www.filefront.com/14129875/Longest_Day_CO10_V1.7z
Thanks to Armaholic for mirror
http://www.armaholic.com/page.php?id=6562
Features:
- Recruit AI up to 13 total units
- Vehicle Spawn with markers (deleted when vehicle is dead)
- Viewdistance adjustment
- Halo jump option
- Exstensive mission with numerous objectives
- Base respawn and you keep your loadout at death
- Vehicle resupply point (rearm,repair,refuel)
- AI units die when player dies (keeps them from taking command still wip)
- Body deletion script to keep the server running well
- Spawned vehicles delete after 30 secs
- Almost all objective town enemy units spawn when objective is activated
Known issues:
- On player disconnect ai from players group are not deleted and follow player when player joins same unit slot again. No controll over units though.
- Unlimited Vehicle spawns (need to limit players so there is not hundreds of vehicles)
- Halo script works but does require user to open/close map to activate Halo and bring up gps to see where he is
- Vehicle resupply point does not fill the extra magazine slots for turrets
- Recruit AI up to 13 total units
-
I decided to update this mission since i learned some new things that should make it better. check first post for the link to V4 if you would like to give it a run through.
** Update **
I added a poll, please vote
-
first put
completed=false
in the init.sqf or init line of unit. then put
completed=true
in first trigger. in condition line of next trigger put
this and completed
this refers to the activation of whatever you set. ie blufor present.
-
westheli as you used is a global name and should then be able to use for checking if it is alive.
-
you need to do a search. try searching "not alive unit". or any combination of words that mean that.
!(alive unitname)
is the command. This has been discussed many times.
-
ok so you named your manned aircraft unit and in a trigger or script have
unit selectweapon "gau12"; unit dotarget target; unit fire "gau12";
something along those lines and it does not work?
-
(alive vehiclename)
will be true if vehicle is alive. So you could use that like
if (alive vehicle) then { blahblah;}; -
thats a complicated resupply. Do a search and you will find very simply yet effective scripts to resupply vehicles using setfuel, setvehicleammo, and setdamage commands. But if you want it to be a specific resupply script for a few name vehicles then you would need a switch case http://community.bistudio.com/wiki/SQS_to_SQF_conversion#Structured_conditional_command.
before that structured command you will need to get the vehicle type, example:
_aircraft = _this select 0; _type = typeof _aircraft; switch (_type) do { case "C130J": {_aircraft animate ["ramp_top", 1]; _aircraft animate ["ramp_bottom", 1]}; case "MV22": {_aircraft animate ["ramp_top", 1]; _aircraft animate ["ramp_bottom", 1]}; };for the sit still part have something like this in beginning of script
_unit = _this select 0; WaitUntil{_unit in list Rearmlist}; sleep 4; if(!(_unit in list Rearmlist)) exitWith {_unit vehiclechat "Repair Aborted"};now the trigger that the vehicle has to drive in will be named rearmlist
-
use the selectweapon command http://community.bistudio.com/wiki/selectWeapon then dotarget http://community.bistudio.com/wiki/doTarget
-
do a search for Norrins revive script. Does all those things.
-
maybe try launching script from trigger that fires once, and put the isserver command in the script. init.sqs or sqf are ran for each player connecting. That is why intros and such are good to have in there. For JIP though puting various script executions may result in repeated events.





Why Can't this work in Arma 2?
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
create a gamelogic right over the building name it lgman for this example
then in the trigger or script have