Jump to content

RazorX

Member
  • Content Count

    123
  • Joined

  • Last visited

  • Medals

Everything posted by RazorX

  1. That's because I don't want about 800 units to be in their own groups because I just can't do it with 144 group limit. I have most units joined 1 group. The player is in a separate group. I want a solution to one of the AI follow player or one of the members of his own group. That's the tricky point
  2. yes, it works. But try it on vehicles. Works not to well. On normal units works good
  3. Analysing your code here, I see, you are using waypoints to make one group follow another group. But I want a single unit from one group to follow a single unit from another group (groups with no formation, because units in my groups don't move in formation) or a unit from the same group following another one from the same group (and not using AssignTeam). That's a bit of problematic code to invent especially when scripted for following vehicles
  4. after attachTo use: object setDir direction (where direction is in degrees) the direction is relative to the object
  5. You can't. There is no traditional way. You can bypass it by attaching i.e a nested mg to the vehicle and then moveInDriver (or moveInTurret - check which one works) player inside the attached weapon. EDIT: oh, sorry, misunderstood your question... I'll try to find it out right now
  6. first of all do you want to script SP or MP mission?
  7. This is the simplified version of the solution, I created in Icarus. 100% reliable Create 2 triggers, one of them fully inside another. The outer one must be about 100m larger in each dimension (safety reasons). in the init.sqs paste this: speed_limit = false speed_limit_units = [] The inner trigger: Activation: Civil Repeatedly Timeout: 0.1 0.1 0.1 Condition: !speed_limit && this On activation: [thislist,speed_limit_units,13] call compile loadfile "speed_limit_area.sqf"; speed_limit = true; (13 is the speed limit in meters per second) The outer trigger Activation: Civil Repeatedly Timeout: 0.5 0.5 0.5 Condition: speed_limit && this On activation: speed_limit_units = thislist; speed_limit = false; speed_limit_area.sqf _newList = _this select 0; _oldList = _this select 1; _limit = _this select 2; { if (_x isKindOf "car") then {driver _x forcespeed _limit} } foreach _oldList; for "_a" from 0 to ((count _newList) - 1) do { _oldList = _oldList - [(_newList select _a)]; }; if ((count _oldList) != 0) then { {driver _x forcespeed -1} foreach _oldList; }; How it works? when a unit drives inside the inner trigger, it must have driven through the outer trigger. Then the speed limit is applied to the driver. When a unit was in the inner trigger and now is only in the outer trigger, it means it is driving out of the speed limit area and the forcespeed is reset for him, he can drive full speed now. The inner trigger must cover the area inside which speed limit needs to be applied.
  8. RazorX

    Population CAP

    There are many solutions. The question is what do you want to spawn so many units? Describe it precisely and I'll try to find the best way.
  9. When using a "package" of functions like you said above, it would be more professional to also describe them in description.ext (cfgFunctions). But I also found call command useful while converting sqs scripts to sqf. When I wanted to convert goto loops and it was important to operate in one script and use only normal loops and no recursion.
  10. syntax is wrong. You'll get errors try: damage player > 0.5 (0 - no damage, 1 - full damage) but notice, that if the unit's damage is >0.9 it dies anyway.
  11. I can tell you much about what scripting a big project like this by 1 man looks like. Also I can give you some ideas you can try to implement in your project - ideas, not scripts, you need to write script by yourself. PM me if you're interested. But first you need to learn scripting, dialog system, how to make description.ext file. Seriously, you can't do shit if you can't do the above, especially if you want to create something as big as the project you've mentioned. But I know this is possible and 1 man army style is good in many aspects :) Just good luck and learn, learn, learn...
  12. Add a trigger, activation -> radio XXX, when activated run a script. Combine createGroup with createUnit. That's the easiest way, I think. Have you scripted anything before? If not then http://community.bistudio.com/wiki/Category:Scripting_Topics. It's for a start. Someone can eventually post you a ready-to-use script, but why if you won't understand it.
  13. I have a problem with playMove I have this: _unit playMove "RepairingKneel" and the unit plays the given animation in a loop. How can I get the unit in the normal standing position again? I used: _unit playMove ""; _unit playMoveNow ""; _unit switchMove ""; None of them works. When using switchMove, the unit's anim is changed to the default but again the "RepairingKneel" animation starts. What am I doing wrong?
  14. Yep, I need a smooth transition :) thanks a lot, problem solved
  15. I may have not understood you properly. Even if all the group members die this doesn't mean that the group itself gets deleted. If you spawn a new team, try to assign them to the previous group, which has been wiped out. First create the group: grp = createGroup SIDE //where SIDE is east/west etc When you spawn units, make them join the group: this join grp; in the init line of every newly created unit. Of course change the group's behaviour/waypoints etc to whatever you like afterwards. When spawning is completed, write a script that checks if all units of the group is dead and when true - spawns another meat that will join the group. In ArmA2 you can only create 144 groups so make sure that groups without units are deleted or assign new team members to them like in the example above. When you try to create 145th group, it won't be created and won't throw an exception.
  16. _unit_name = _this select 0; _count = (count GLOBAL_CIVS) - 1; for "_i" from 0 to _count do { if (_unit_name == ((GLOBAL_CIVS select _i) select 0)) then { . . . }; }; where: unit_name - a string variable GLOBAL_CIVS - an array containing other arrays. The other arrays have a string on their first position. i get the following error: 21:11:14 Error in expression <i" from 0 to _count do { 21:11:14 if (_unit_name == ((GLOBAL_CIVS select _i) select 0)) t> 21:11:14 Error position: <== ((GLOBAL_CIVS select _i) select 0)) t> 21:11:14 Error Ogólny błą…d w wyrażeniu What's wrong? I thought I can compare strings easily EDIT: ISSUE SOLVED
  17. I have ArmA2 and bought Arma2 OA lately (Polish version, originally patched to 1.52). Installed OA on ArmA2. When I start the game via the shortcut on dekstop or directly by arma2oa.exe, the game loads about 5 minutes to the main menu! The splash screens are animating at around 0.1 FPS. The game is unplayable (difficulty even in choosing options in main menu). The CPU load is stuck on 100%. What is strange, that when I open the OA's cd-menu and choose "play", the game works perfectly. The game also works when i run only ArmA2.exe. The same bug appears when I patched the game to v. 1.54. Tried reinstalling OA, both... nothing helps. What's going on? Acer Aspire 7738G Intel Core 2 Duo T6500, 2.1 GHz Intel Cantiga PM45 GeForce GT130M 1GB DDR2 4GB DDR3 Win 7 Professional x64
  18. I'm just curious, because I found it interesting for my project. Let's say I'm creating a SP mission which a player will play for dozens of hours. When I will release a new modification for this mission - an addon containing a set of new scripts - I don't want to force the player to download the updated version of the mission including these scripts and start the mission all over again if he wants to play with this addon. It might be a bit frustrating. So my question is: is it possible to load the addon during gameplay (ie. by dialogs system - user friendly :)) by activateAddons and the addon will now be visible to the game?
  19. But seriously, doesn't it seem a bit archaic to insert the DVD every time? I know it's just to make illegal copies owners' lifes more screwed, however I don't think it's too healthy for the DVD itself too.
  20. That's the only explanation to use cracks
  21. Patched to 1.55 Still can't play when launching via arma2oa.exe, everything works fine when launching arma2.exe CPU load hangs up on 100%, both cores
  22. "#lightpoint" is used to create point light sources. But is there a way to create directional light source?
  23. Beta patch solved the problem. Something is f***ed up with the default .exe IMO
  24. I do, checked that already
×