Jump to content

twirly

Member
  • Content Count

    1304
  • Joined

  • Last visited

  • Medals

Everything posted by twirly

  1. Something that needs to be pointed out is that scripting for a Multiplayer game is very different to scripting for a Single Player game. Trying to create a Multiplayer game without loads of scripting knowledge is going to be an almost impossible task. That would be jumping in on the deep end...and will only lead to frustration. With the trigger... it is more than likely that only one person will set it off but the whole group needs to get the message. Correct?
  2. For the area clear of OPFOR do this.... Place a trigger over the area set to:- Activation: OPFOR ONCE Not Present On Act. : titleText ["OPFOR not present in area!","plain down"]; For you (the player) entering an area do this.... Place a trigger over the area set to:- Activation: ANYONE ONCE Present Condition: this && player in (thislist); On Act. : titleText ["Player entered trigger!","plain down"];
  3. Did you try typeName ? if (typeName _vehicle == "SCALAR") do { .... .... };
  4. Hi... Don't add them to the init fields of any units. Create a file in your mission folder called init.sqf. This will be executed once at mission start. You can use it to initialise things. Civilian setFriend [East, 0]; only needs to be done once... so it's ideal for the init.sqf. So put the line in the file....then try it. You can get commands like setFriend to work from the init fields of many things.... but much better from a script that you can easily open and read instead of clicking on every single item in your mission to try to find where you put the line.
  5. In your init.sqf...or from anywhere really... once all the units are initialized and on the map... execute this little script. littlescript.sqf:- _allunits = allunits; for "_i" from 0 to (count _allunits)-1 do { _unit = _allunits select _i; if (not (_unit hasWeapon "ItemRadio")) then {_unit addWeapon "ItemRadio"}; sleep 0.01; }; EDIT: Another way to make the purists happy! littlescript.sqf:- _allunits = allunits; {if (not (_x hasWeapon "ItemRadio")) then {_x addWeapon "ItemRadio"}} foreach _allunits;
  6. Ahhh... Sorry for missing that in your post. I'll see what I can knock up in the editor for you and post a demo mission. EDIT:- OK...this stops him when he enters the trigger. Waypoints are deleted... he is given a waypoint at his current location and he stops dead in his tracks. Demo here. _bot = _this select 0; _group = group _bot; while {(count (waypoints _group)) > 1} do { deleteWaypoint ((waypoints _group) select 1); sleep 0.01; }; _wp = _group addWaypoint [position _bot, 0]; What do you want him to do after he stops?
  7. Hi lax... To keep the guys in cargo from getting out.... maybe temporarily disableAI To keep the vehicles moving and firing.... to my knowledge that's a hard one.
  8. ' is the same as "" ...or... A single quote is the same as double quotes.
  9. When you run the mission...do you see the helipad at the height you want? Stupid question maybe! From looking through the code posted.... this is the line that spawns the chopper... _vcl = createVehicle [_type, [b]spawnPos[/b], [], 0, "None"]; Therefore the z element of spawnPos needs to be 3.5m I don't know where spawnPos is given it's value. That is what needs to be changed. If you hard code it to 3.5 before the vehicle is spawned... it's going to affect all vehicles.
  10. How are you spawning them? Do you get back the handle/name of the spawned group when they are spawned?
  11. Well the setWaypointPosition or addWaypoint was to give him a waypoint at his current position....which should stop him. You can always use doStop.
  12. Not tested but should work.... maybe instead of the setWaypointPosition you might need to use addWaypoint and add a waypoint here....since they've all been deleted. I'm not sure. while {(count (waypoints _bot)) > 0} do { deleteWaypoint ((waypoints _bot) select 1); sleep 0.01; }; [group _bot, 0] setWaypointPosition [position _bot, 0];
  13. There is some kind of invisible barrier... but for the life of me I can't find it and don't remember what it is called. Anyway I made a little test mission for you using hescos (h-barriers). It's a simple script that will smoothly lower an object below ground level. Here it lowers two objects.... h1 then h2. I use it to sink vehicles into the ground before respawn. See if it will be enough to do what you want. Test mission here. script.sqf:- _walls = [b][h1,h2][/b]; for "_i" from 0 to (count _walls)-1 do { _wall = _walls select _i; // Get the current position of the obj _origx = (getPos _wall) select 0; _origy = (getPos _wall) select 1; _origz = (getPos _wall) select 2; _z = 0; // Sink it in the ground while {(_z < 5)} do { _wall setPos [_origx,_origy,_origz-_z]; _z = _z + 0.05; sleep 0.02; }; //delete the wall deleteVehicle _wall; }; call it with:- nul = [] execVM "script.sqf";
  14. Ahhh... I don't know the answer to that one. Maybe someone else knows a way around that... I'd love to know myself now that you mention it. EDIT: From the little reading I just did... maybe changing his behaviour and combat mode to COMBAT and RED. setBehaviour setCombatMode
  15. Try it this way.... no need to loop it on the guy forever. _man = _this select 0; Removeallweapons _man; _man addmagazine "PG7V"; _man addmagazine "PG7V"; _man addweapon "RPG7V"; _man selectweapon "RPG7V";
  16. I copied the description.ext into a new ext and formatted it properly and I think you should try removing that last }; at the bottom of the file. This may or not be your problem.... but try it anyway. Something looks fishy. Here's a tip... When you are posting code use the "Code" or "PHP" tags.... not the "Quote" tags. The code will be a lot easier for everyone to read.
  17. Good tip. Thanks for mentioning it... I forgot about this.
  18. Try this....add the line in bold after the lines below. _unit = _type createVehicle _position; _unit setPosASL _position; _unit setDir _dir; [b]_unit addEventHandler ["HandleDamage",{_boo = _this call func_head;_boo}];[/b]
  19. It was simply to show you how to do it. I didn't intend it to work without some substitution on your part. You know.... the "give a man a fish" thing! Have you tried replacing "UH60M_EP1" with HELI2TYPE?
  20. Hi...try it this way... description.ext class CfgSounds { sounds[]= {music1}; class music1 { name = "music1"; sound[] = {\music\Qom_Nasheed.ogg, 1, 1.0}; titles[] = {}; }; }; Then do... playsound "music1"; //is non 3D sound or... _obj say3D "music1"; //is 3D sound EDIT: I'm not sure about the looping part... I think you're going to have to time it and then play the sound again to get the loops.
  21. Try replacing.... _veh = format["at_%1",_num] with.... call compile format ["_veh = at_%1",_num]; See if you get some joy. As you have it there.... _veh ends up being a STRING and not an OBJECT! EDIT: Forgot to scold you... lol! Go stand in the corner! Next time use a more descriptive header for your post. "I'm such a noob" doesn't help anyone that's searching for answers.
×