Jump to content

tryteyker

Member
  • Content Count

    1164
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by tryteyker

  1. What you need to understand is that all names of a group, like Alpha, 1-1-A, are not useable in a script. You need to use the squad leader init to name the group, like this: groupName = group this;
  2. tryteyker

    Repeat & Randomize?

    Local only creates things for the player. It's unnecessary to use createMarkerLocal if you're making a SP mission. _pos = [(getpos Cache1 select 0) + 15, (getpos Cache1 select 1) + 15, 0]; _plMarker = createMarker ["Cache1",_pos]; For the marker to properly respawn use EHandler Killed player addEventHandler ["Killed","[player] execVM ""mkr.sqf"""]; mkr.sqf deleteMarker _plMarker; if (playerSide == West) then { _pos = [(getpos Cache1 select 0) + 15, (getpos Cache1 select 1) + 15, 0]; _plMarker = createMarker ["Cache1", _pos]; _plMarker setMarkerColor "ColorBlack"; _plMarker setMarkerType "ELLIPSE"; _plMarker setMarkerText format["Ammo cache?"]; _plMarker setMarkerSize [30, 30]; _plMarker setMarkerDir (getdir Cache_1); }; Hint "Complete"; Hope this helps.
  3. You can't use crew in conjunction with an array because it needs an object. I don't see why it doesn't return an object though. Try using a hint to display what's in the _boats array. It should definitely return an object and not a string or array if you use select.
  4. tryteyker

    Need some functions :S

    Use a rectangular trigger for that. On activation: { _x setcaptive true} foreach units in thisList On Dea: this setCaptive false I don't think that ArmA detects if anybody touches a wall or so so it's going to be pretty hard to fix that. A possible workaround could be make a rectangular trigger around the walls and use setdamage on act.
  5. Alright your solution worked JW, but no idea why. I tried using select at first (in the outer hintsilent) but it just returned null. Thanks though.
  6. Hi, basic question here. Seems like I forgot most of the stuff already since I took quite a break from scripting. :( Anyway, onto my question. I have a for loop, which is supposed to run through all towns and villages found via nearestLocations and place a marker. So far so good, it works, most of it anyway. Here's the script: _villages = nearestLocations [getmarkerpos "center",["NameVillage","NameCity","NameCityCapital"], 50000]; for "_i" from 0 to count _villages do { sleep 0.5; _town = _villages select _i; _mkr = createMarker ["asdf",getpos _town]; _mkr setmarkershape "ICON"; _mkr setmarkertype "Destroy"; }; The problem is that the script uses _mkr over and over and does not seem to renew variables once executing the for loop. That means it wont return an error, but won't place any more markers except in the first town. I got no idea on how to tell it to refresh the variables though. (the whole thing probably has to be wrapped in a foreach loop)
  7. That doesn't work if towns is not pre-defined apparently, and pre-defining it with panthers method is the same as the one I'm using currently, so it doesn't work that way either. It returns "markers: any" when using towns + [_mkr].
  8. I tried that but it makes essentially no difference.
  9. Thanks. Still running into issues though, this time with adding stuff to an array. So what I'm doing right now is this: for "_i" from 0 to count _villages - 1 do { sleep 0.1; _town = _villages select _i; _mkrname = format ["%1",_i]; _mkr = createMarker [_mkrname,getpos _town]; towns = [] + [_mkr]; hintsilent format ["Markers: %1",towns]; }; Adding _mkr to an empty array. It's not exactly adding stuff together, more like going upwards. Expected behavior is this: ["1","2","3"] which are the markernames Current behavior is this: ["1"] ["2"] etc, so towns first equals ["1"], then ["2"] and so on. I guess this is because _mkr is always newly defined but I don't see another way of doing this atm, so I need another pair of eyes to look at it.
  10. Thanks for the help, fixed it. I'm still running into problems later on though, it seems like he's not getting anything else from _villages but still executes the for loop. Any ideas why? I'm specifically getting an error that he's not passing anything to createMarker.
  11. According to wiki the effects are global but arguments passed have to be local, so you need to execute addWeapon locally.
  12. Why use onplayerconnected? The init.sqf runs even when JIP players connect, then something like this: [player] execVM "pistol.sqf"; in the init.sqf. That should work just fine, although I'm not sure how player will be affected. Should work on a dedi server.
  13. You cannot initialize local variables in a trigger or in the ingame editor.
  14. You're telling the script that format ["%1Pos",_x] is essentially equal to getPos _x, which doesnt make any sense. Why not use getpos _x alone instead? Seems to me you are overcomplicating things.
  15. Try setvehicleinit { //stuff }; instead. Multiple lines always have to be defined via {} else it wont work.
  16. Try adding this at the bottom of your script: waitUntil {vehicle player != player}; suitcase hideobject true; waitUntil {vehicle player == player}; suitcase hideobject false; Or try switching Sel's condition from player != vehicle player to vehicle player != player
  17. Did you die in any way or did anything happen to the vehicle?
  18. AFAIK Shacktac also has a working drive-by system for vehicles such as the Humvee but they haven't released it yet. Dunno who created that though.
  19. Upside down is Z axis since you have to think 3D. try setVectorDir maybe. Or setVectorUp. Never worked with these so I can't help you further.
  20. It could be further improved by using _this select 2 in conjunction with _this select 0 to remove the action, making naming these (question = XXX) unnecessary. So for example: _unit = _this select 0; // the cop _caller = _this select 1; // the player _ID = _this select 2; // The ID of the addAction _unit removeAction _ID; /* rest of the code */
  21. Why not just stuff the whole task & dialog into an appropriate addAction for the player to use? Provided that you only use a single script for the task and dialog this could very well work out, just an idea.
  22. Another question, am I able to recruit people or am I stuck with my 7 man squad forever? Additionally you should probably add an action for things like getting intel from the local tribes leader. I accidentally clicked "Ask for enemy sightings" and the conversation overlapped due to both things using titleText but the intel convo getting triggered automatically.
  23. Well it's not a bad feature per say it's just really horrifying to see a car turning when walking on a street and then blowing up :( I gotta ask, does the bomb blow when I shoot the civilian in the face, or does it otherwise punish me?
  24. I decided to give Whole Lotta War a go today and was very surprised of some of the features, namely carbombs (okay I love carbombs for some reasons although they're horrifying). Honestly I expected the carbomb to be a bit bigger at first because it only knocked me out of my Stryker and didn't kill me at all. Also they apparently like to drive straight into people and just blow them up. Definitely had a fun hour or two defending Nagara from the nearby Taliban camp and stupid carbombers trying to blow away single soldiers. Great mission so far :D
  25. tryteyker

    Side Foreach

    Another possible explanation could be that PlayableUnits takes into account all playable units, regardless of which side the player's on. if (side player == WEST) then { playSound "Captured"; }; would also be a possible solution, although I'm not entirely sure if player is also accounting for other players in an MP environment (which is what you're aiming for I suppose).
×