Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

1 Follower

About Sexacutioner

  • Rank
  1. Sexacutioner

    1.63 Script issues

    I have code like this in my script that worked before: waitUntil {!isNull attachLogic2}; It throws an undefined variable error when the entire reason for that is to wait until the variable is initualized before using it. So I am doing it proper and stuff like this is necessary when it comes to multiplayer scripts that you only want the server creating variables and the clients to wait for them.
  2. I ended up with a solution using nearEntities: _currentSpawnPos=getMarkerPos "eastStartSpawn"; while {count ((_currentSpawnPos) nearEntities 70)>0} do { _currentSpawnPos=[_currentSpawnPos select 0,(_currentSpawnPos select 1)+70,_currentSpawnPos select 2]; };
  3. For creating a custom interface you should look into dialog controls: http://community.bistudio.com/wiki/Dialog_Control For spawning units you should look into the createVehicle command: http://community.bistudio.com/wiki/createVehicle_array
  4. setPos on the agents I get back from this array does nothing. I haven't been able to extract any information from them besides the fact they seem to be of type "object". I'm not even sure this array contains the rabbits, but it is my best guess. Oh and also it changes size as the game runs. I'll have to look into that class. I haven't made much for addons since OFP but from what I remember you can include them in missions yes?
  5. I have a mission where you hunt rabbits, but the problem is there are default rabbits already spawned on the map that I can't keep track of for kills. Is there any way to remove these? I have tried looking through the agents array: { player globalChat "agent "+str(agent _x)+" "+str(agentCounter); } forEach agents; However typeOf returns an empty string so I have no idea if it's a rabbit and deleteVehicle or setdamage do not seem to have any effect. Ideas?
  6. Sooo. After lots of testing against rabbits, cows, 1000's of animals on the map and so forth I found what the problem was. There are already rabbits on the map! I was way off :). That's why it seemed the error was so random. Sometimes we were killing rabbits I hadn't created. So now I'm looking for a way to delete them. I found the "agents" command and can find all the agents on the map like so: agentCounter=0; { agentCounter=agentCounter+1; player globalChat "agent "+str(agent _x)+" "+str(agentCounter); } forEach agents; The problem now is I don't know what is rabbits and what is not. The typeOf agent _x returns an empty string. The getPos returns [0,0,0]. Is there any way of telling if this agent is a rabbit? I don't wish to remove everything from the map. ---------- Post added at 00:20 ---------- Previous post was at 23:54 ---------- Another problem I've found is I cannot find a way to delete these guys. Even if I can verify if it is a rabbit, deletevehicle or setdamage do not seem to change the agents array at all.
  7. Using this should help you create vehicles of any side: createcenter civilian; createcenter east; createcenter west; createcenter resistance; createCenter sideLogic; I have found setting friendly options is sometimes necessary when there aren't any units of type on the map as well: West setFriend [Resistance, 0]; West setFriend [East, 0]; West setFriend [West, 1]; East setFriend [Resistance, 0]; East setFriend [West, 0]; East setFriend [East, 1]; Resistance setFriend [East, 0]; Resistance setFriend [West, 0]; Resistance setFriend [Resistance, 1]; You only have to do that once. Then just create a new group when creating the unit (i.e. _civGroup = Creategroup civilian;)
  8. So this is a difficult thing to search for. I'm wondering if there is scripting command or similar to get all units around a certain position. What I'm trying to do is spawn an unknown amount AI in helicopters, but if I don't keep increasing the X or Y position they crash into each other. I would like if the space is empty to spawn the AI there, but if there is already someone there then spawn it a bit further and so on. I can accomplish this in a while loop if there is a command like "findEmptyPosition" or isAt(x,y,z) that can tell me if there is a vehicle already at this position. The AI will fly at different times and more are created at different times at the player control so it would be easiest to just check the area and move the position if it's occupied.
  9. I'm working on a multiplayer mission where I would like all units of only the side the player is on to show up on the hud. I used the military units moduled and tried the following: setGroupIconsVisible [true,true]; if (side player==west) then { BIS_marta_mainscope setvariable ["rules",[ ["o_", [0,.5,1,0] ], ["b_", [0,.5,1,1] ], ["n_", [0,.5,1,0] ], ["n_", [0,.5,1,0] ] ],true]; }; if (side player==east) then { BIS_marta_mainscope setvariable ["rules",[ ["o_", [0,.5,1,1] ], ["b_", [0,.5,1,0] ], ["n_", [0,.5,1,0] ], ["n_", [0,.5,1,0] ] ],true]; }; if (side player==resistance) then { BIS_marta_mainscope setvariable ["rules",[ ["o_", [0,.5,1,0] ], ["b_", [0,.5,1,0] ], ["n_", [0,.5,1,1] ], ["n_", [0,.5,1,0] ] ],true]; }; However it doesn't seem to be working at all. Sometimes nothing shows up and other times enemy units or vehicles show up. Anyone know if it's possible to set this up for each side to only see their teamates?
  10. Well there are groups that can be placed in the editor or you can select and ctrl-c ctrl-v to copy and paste them. For scripting you can use the createVehicle command.
  11. If I do a camSetTarget on a camera is it possible to make it a free cam again? I tried camSetTarget objNull but it still retains it's target. Thanks!
  12. Hello all! I'm working on my death spectator cam and have run into a problem when trying to watch a player from 3rd person. If I attemp to do _unit switchCamera "EXTERNAL"; when on expert difficulty it doesn't allow it since it only allows first person view. I'd like to allow watching from 3rd person after you as a spectator.
  13. Thanks. I was messing around with that, and wanted him walking with his head down. I can get it sometimes but I cannot refresh the doWatch to another position to keep his head in place. Might be the closest solution I'm going to find though.
  14. I'm making a camera scene from the AI perspective and I would like him to look down for a period of time. If I doWatch the ground he keeps looking back and forth from the doWatch direction and up again. Is there any way to keep his head down? So far I've tried disableAI TARGET/AUTOTARGET with no effect and enableSimulation shuts off breathing/walking which I would like to keep.
  15. I'd like to force an AI to do the "step over" move but am having a hard time finding it. I've looked over the moves here: http://community.bistudio.com/wiki/ArmA2:_Moves and haven't been able to find it. Does anyone know what this animation is, or can it be called another way like through an action? Thanks. ---------- Post added at 00:11 ---------- Previous post was at 00:07 ---------- Man, the way to figure out a problem is to give up and ask on the forums. Then the answer presents itself :). For anyone else looking, it's an action instead of an animation and shown here: http://community.bistudio.com/wiki/ArmA_2:_Actions#GetOver