Jump to content

demonized

Member
  • Content Count

    2658
  • Joined

  • Last visited

  • Medals

Everything posted by demonized

  1. Strange, i thought disableAI in description.ext would remove all non player ai from playableUnits. try putting this in the while code: if (!isPlayer _this) exitWith {}; now have your friend do the same and the marker should be deleted.
  2. looks good, can you provide code used or a demo mission for those of us willing to look into it without a tutorial?
  3. demonized

    Spawn menu

    Golden rule of forum, search before posting. a simple search gives many examples. http://forums.bistudio.com/search.php?searchid=1925055
  4. only leader of group gets the radio triggers. you can use addAction instead.
  5. {(vehicle _x) setDammage 1} foreach thisList; will kill anything inside the trigger.
  6. http://forums.bistudio.com/showthread.php?t=116330
  7. Since it returns a result, use call. _return = _unit1 call getStance; hint format ["unit1 stance is %1",_return]; you will get(_return) either UP, MIDDLE OR DOWN EDIT: there is also the boundingbox command that can be used, but i remember a long time ago that there was some talk about issues getting lying down units with that. NOTE: a long time ago.
  8. using this code on a AI not in a player led group: unit assignAsCargo car; [unit] orderGetin true; that will make AI run to and board the car. however when used on a AI in a group where player is leader, the commands does nothing. i found the commandGetOut command, but did not see any commandGetIn, i asume that orderGetin does what the commandGetin should have done, in theory ofc. Is orderGetIn command broken? or are there other ways of ordering a AI to enter a vehicle without player leader physically selects 4,vehicle,getin through the squad commands ingame. im fiddling with hidden units and giving board pos to moving unit for then to run the action, but it seems silly to me to have to do this.
  9. demonized

    Check Any Unit is !alive not all

    ah yes, i saw that now, BD code works just fine... sorry about that BD, corrected previous post.
  10. Just so there is no confusion: deactivate only activates after the trigger is activated and condition is no longer true.
  11. demonized

    Check Any Unit is !alive not all

    Big Dawgs code would fail if they are all dead. ( the count would not be less than ( < ) 3, it would be 3. edit, nvm that, another way same result: this will activate if one or more is dead. ({!alive _x} count [aaaa,bbbb,cccc]) != 0
  12. [b]_vcl[/b] = createVehicle [MHQTYPE, spawnPos, [], 0, "None"]; the higlighted _vcl is what you need to add the eventhandler i described above on. _vcl = createVehicle [MHQTYPE, spawnPos, [], 0, "None"]; _vcl addEventHandler ["GetIn", {......................... edit: just to make it clear, now using above code, the MHQ can only be driven by the players who are listed in the MasterUID list.
  13. there was a misplaced _this instead of a _x in the markernamepart. maybe that was the issue, previous post fixed. if not try this, small change same effects. Untested but should work in theory, the how is: 1: whenever a player joins a game, he runs the init.sqf for all playableUnits. 2: if a marker with player name is not present(isNil), he willl create one, else do nothing. 3: once he leaves game, marker is deleted and the the marker name is removed again(set to nil). place this in your init.sqf. _null = player execVM "trackPlayers.sqf"; save this as trackPlayers.sqf and place in your mission folder. waitUntil {!isNull player}; if (_this != player) exitWith {}; _mName = format["player_%1_marker",_this]; _pName = format["%1",(name player)]; if (isNil (_mName)) then { _marker = createMarker[_mName,[0,0]]; _mName setMarkerShape "ICON"; _mName setMarkerColor "ColorBlue"; _mName setMarkerType "DOT"; _mName setMarkerText _pName; while {!isNull player} do { _mName setMarkerPos (getPos player); sleep 1; if (!alive player) then { _mName setMarkerAlpha 0; waitUntil {alive player}; _mName setMarkerAlpha 1; }; }; deleteMarker _mName; _mName = nil; };
  14. [url="http://community.bistudio.com/wiki/while"]while[/url] {alive player} do { hint "player is still alive"; sleep 1; }; hint "player is dead";
  15. afaik, orderGetIn worked fine some time ago in player group AI, so my guess is, that its a bug or there are a unnoticed replacement. i did however go through the wikis list of all commands, and read up on all who i thought had a relevant command name, though it may be hidden in a strange / unexpected command name. edit: i sent a PM to Dwarden asking about this, if he replys ill post it here:
  16. if you use this, you can see the exact details of the BIS_fnc_taskAttack. but if i remember correctly, it is just a set of SAD waypoints. (search and destroy)
  17. Untested but should work in theory, the how is: 1: whenever a player joins a game, he runs the init.sqf for all playableUnits. 2: if a marker with player name is not present(isNil), he willl create one, else do nothing. 3: once he leaves game, marker is deleted and the the marker name is removed again(set to nil). place this in your init.sqf. _null = playableUnits execVM "trackPlayers.sqf"; save this as trackPlayers.sqf and place in your mission folder. { waitUntil {isPlayer _x}; if (_x != player) exitWith {}; _mName = format["player_%1_marker",_x]; _pName = format["%1",(name player)]; if (isNil (_mName)) then { _marker = createMarker[_mName,[0,0]]; _mName setMarkerShape "ICON"; _mName setMarkerColor "ColorBlue"; _mName setMarkerType "DOT"; _mName setMarkerText _pName; while {!isNull player} do { _mName setMarkerPos (getPos player); sleep 1; if (!alive player) then { _mName setMarkerAlpha 0; waitUntil {alive player}; _mName setMarkerAlpha 1; }; }; deleteMarker _mName; _mName = nil; }; } foreach _this;
  18. _object setPos [getPos _object select 0, getPos _object select 1,200]; set object 200 meter up above in the air from its current position.
  19. what i do for now, to workaround it is to spawn a setcaptive invicible unit of same side, use getin action on him, and track his position until he is inside the vehicle, last position is the correct boarding position. then unassignhim, setpos and delete him and make "my" unit go to the last outside pos and do the getin action when there, it works and looks ok. but it is somewhat much just for a getin order.
  20. demonized

    DMZ Delete [script]

    i was actually thinking of making a engineer version for tires and vehicles, and the ieds are a good idea for them too. but ill start with repairs and tire fixes. the auto medic seemed like a sucess so ill start working on Auto Engineer. :D
  21. demonized

    Spawn distance from pos

    position 200 meter N of vehicle. positionToSpawnIn = [getPos vehicle select 0, (getPos vehicle select 1) + 200,0]; then just addWaypoint and setWaypointType to "SAD"; on group spawned.
  22. demonized

    DMZ Delete [script]

    Just to clarify, the timer runs no matter the distance, but the delete waits for the distance check to be true. i thought of resetting timer if player was to close, but figured the current would be the best way. cheers Foxhound.
  23. or just this for all weapons and magazines. removeAllWeapons this;
×