Jump to content

kyfohatl

Member
  • Content Count

    247
  • Joined

  • Last visited

  • Medals

Posts posted by kyfohatl


  1. Suppose the variable "money" is what you store player's money in (I'm using global cause I'm assuming you'll be using it in many different scripts). Then:

    hint format ["You have $%1", (money)];

    The "%1" takes the value of the "money" varible.

    Or:

    _str = format ["You have $%1", (money)];

    titleCut ["_str", "Plain Down"];

    If you want to have it displayed on the bottom of your screen. That way you can controll for how long this is displayed by:

    titleFadeOut <time>


  2. This basic camera script is executed when the player enteres a trigger area:

    changeCameraPos1 = false
    titleCut ["Congrgulations, you have arrived at the Russian Holdout", "Plain"]
    ;Ok, I can't write SQS, so I prefered to write the rest of the script in SQF
    0 = [] execVM "Scripts\Story\RussianBaseArrival.sqf"
    
    _camera = "camera" camCreate [0,0,0]
    _camera cameraEffect ["internal", "back"]
    
    
    #Loop1
    _camera camSetTarget s1
    _camera camSetrelPos [-1,-2,3]
    _camera camPrepareFOV 0.600
    _camera camCommitPrepared 0
    @camCommitted _camera
    ?(changeCameraPos1): goto "Position2"
    goto "Loop1"
    
    #Position2
    _camera camPrepareTarget s1
    _camera camPreparePos [11272.39,5472.14,3.72]
    _camera camPrepareFOV 0.700
    _camera camCommitPrepared 2
    @camCommitted _camera
    
    exit;

    And RussianBaseArrival.sqf:

    // "hq" is just some unit I use for HQ dialogue and to switch the player
    // to momentarily so that my camera script works
    selectPlayer hq;
    // s1 is the player
    _grpPlayer = group s1;
    // player has no other waypoints, hence the use of "0"
    _wp1 = _grpPlayer addWaypoint [getPos RuOfficer, 0, 0];
    [_grpPlayer, 0] setWaypointType "MOVE";
    [_grpPlayer, 0] setWaypointBehaviour "SAFE";
    [_grpPlayer, 0] setWaypointSpeed "LIMITED";
    waitUntil {(s1 distance RuOfficer) < 50};
    changeCameraPos1 = true;
    waitUntil {(s1 distance RuOfficer) < 3};
    RuOfficer doWatch s1;
    s1 doWatch RuOfficer;
    titleCut ["Will be done later", "Plain Down"];

    This works when instead of all of the "waypoint stuff" is replaced by a move command. But I want the player character and his group to walk, not run, and I don't know if that is possilbe with the "move" command. So I'm using waypoints instead. However, when I use the waypoint script, the player unit just walks out of the trigger area once the scripts is started and just stays there. Any ideas why player unit is not moving to Russian Officer's position ("RuOfficer")?

    Oh, if you wanted to know: I'm just using this script to create a scene in which the player has a conversation with his officer. The camera initially follows him (as he walks across the base to the officer's position), then changes to a set position to "observe the conversation".


  3. Gray/realistic story instead of normal Black and White

    That's another point I was trying to make, but you summed it up much better. Too many games have one side (usually your side) whose every member is loving and caring of their fellow human brothers and sisters (and whose leader has a big halo on his head) and the other side filled with psycopathic murdrers and rapists. Ok, I've done some exageration, but I just wanted to point out that the "black and white" thing is getting a bit repetative.

    Also I forgot to mention EW. That campaign was awsomn... probably one of the best campaign s I've played. The cheesy voice acting was usually amusing.


  4. I have a friend who knows precisely about my "eccentric" taste in games (that is; I didn't like COD and Halo much, prefered lots of realism and couldn't stand games that wouldn't let the player different ways to approach challenges and were linear, hence not liking Half Life too much either). So when he played the demo, he immediately knew I'd like the game, so he showed me the demo and I loved it. Went out and bought ArmA2 the next day.


  5. I'm jumping in the middle of the calls of hatred here, but I just wanted to say that unlike most posters here I actually enjoyed the vanilla ArmA2 campaign (not talking about OA/BAF/PMC because I don't have them). I have seen several games that claim they can have a highly variable story depending on player's actions, and yet, when I get to the end part, it seems that the main ending is almost universally simillar doesn't matter what you do. That is; like Mass Effect, your actions only determines the fate of side storylines such as the survival of side characters. However, doesn't matter what you do, the game ends with the death of the main villan, your characters survival and victory of the "good". This has always been quite dissapointing for me (though mass effect may be excused, as it is a triology).

    Harvest red was one of the very few campaigns in which the core plot could be completely altered, that is:

    ranging from your team getting owned and enemy winning to total enemy anihilation and sucess of the razor team,

    all of which was dependent on the many choices you could make during the game. The missions were generally very open, allowing player to excersise tactical approaches from many different angles and ways and I found the difficulty to be quite well balanced (I played through on vetren). I also had the prievelage of starting late (since initially I was too busy learning about the editor), when patches had adressed most problems, so I had a smooth playthrough with some really minor bugs. The voice acting... well, I didn't mind it too much, though I must admit it was a bit too cheesy.


  6. @AZCoder: Ok, thanks, will remove it when using the script. However, I have a bit of trouble as Kylania's script (on his website, accesed by the link he provided in this thread) is a little too complicated for me to understand. I don't need the laser guided stuff, as the player has nothing to do with controlling the missile. A missile simply "pops out of nowhere" and hits the chopper that is about to pick up the player. Could anyone guide me on changing this script so that the "laser guided" stuff is removed?

    By the way I've given up on my own script. It doesn't work very well.

    Thanks


  7. This is just a theory, but you should test it out:

    Before doing anything, you have to check for ACM initiation of course, so suppose you named the ACM as myACM, then put in your init.sqf:

    waitUntil {!isNil {myFirstACM getVariable "initDone"}};
    waitUntil {myFirstACM getVariable "initDone"};

    Then, there is, as you probably already know a predifined BIS function that allows the editor to customize the groups spawned by the ACM. It is used by the following format:

    [<the ACM's name> , <an array of strings containing unit class names>] call BIS_ACM_addGroupClassesFunc;
    [i]so for example:[/i] [myACM, "Ins_Soldier_1", "Ins_Soldier_2", "Ins_Soldier_AT", "Ins_Soldier_Sniper"] call BIS_ACM_addGroupClassesFunc;

    Thus the classnames specified in the string's array will be the only units spawned by the ACM. Now my theory is that repeating a classname a number of times should increase the chance of that unit spawning, but I haven't actually tested it/used it mainly because I don't bother with ACM anymore. So instead of the previous example, you could have:

    [myACM, "Ins_Soldier_1", "Ins_Soldier_2", "Ins_Soldier_AT", "Ins_Soldier_Sniper", [b]"Ins_Soldier_Sniper", "Ins_Soldier_Sniper"[/b]] call BIS_ACM_addGroupClassesFunc;

    The addition of two new Chedaki sniper classnames should severely increase the chance of a sniper spawning. Though of course the problem with this is that you have to manually define each and every calssname, including armored/air units (if you want them too). However it does give you quite a bit of flexibility.

    Further information:

    http://community.bistudio.com/wiki/Ambient_Combat_Manager ---> For general info about the ACM

    http://community.bistudio.com/wiki/Ambient_Combat_Manager_-_Group_types ---> This link specifically discusses the "BIS_ACM_addGroupClassesFunc" function and other ways of formatting it (using config entries).

    http://community.bistudio.com/wiki/Ambient_Combat_Manager_-_Functions ---> Very good. Has detailed information on the many different ACM functions.

    Hope this helps


  8. I was going to suggest using the guided missile trick from ArmA2 to fake it, but seems that doesn't work too well with flying targets. Launches fine, flies fine (though smoke only lasts a few hundred meters) but when it gets into range it keeps setPosing really stupidly till it finally hits. :)

    Thanks man, the line,"_missile = _missileType createVehicle _missileStart;" is what I was looking for. So here's my version of the script (a lot shorter, less flexible and not very well done) for a flyign target:

    private ["_markerPos", "_missilePos", "_missile", "_targetX", "_targetY", "_targetZ"];
    
    // creating the missile
    _markerPos = getMarkerPos "Start";
    _missilePos = [_markerPos select 0, _markerPos select 1, 500];
    hint format ['Initiating'];
    _missile = "M_Stinger_AA" createVehicle _missilePos;
    
    // The missile continues to move towards the target by readjusting X,Y and Z values every loop
    while {alive _missile} do {
    
    _targetX = (getPos chopper) select 0;
    _targetY = (getPos chopper) select 1;
    _targetZ = (getPos chopper) select 2;
    
    if (_missilePos select 0 > _targetX) then {
    _missilePos = [(_missilePos select 0) -1, _missilePos select 1, _missilePos select 2];
    } else {
    _missilePos = [(_missilePos select 0) +1, _missilePos select 1, _missilePos select 2];
    };
    
    
    if (_missilePos select 1 > _targetY) then {
    _missilePos = [_missilePos select 0, (_missilePos select 1) -1, _missilePos select 2];
    } else {
    _missilePos = [_missilePos select 0, (_missilePos select 1) +1, _missilePos select 2];
    };
    
    
    if (_missilePos select 2 > _targetZ) then {
    _missilePos = [_missilePos select 0, _missilePos select 1, (_missilePos select 2) -1];
    } else {
    _missilePos = [_missilePos select 0, _missilePos select 1, (_missilePos select 2) +1];
    };
    
    _missile setPos _missilePos;
    sleep 0.005;
    };

    Now this works fine for a ground target, but for an air target, just like you said, the missile path is retarded. The smoke goes backwards (in opposite direction) whilst the missile travels forward towards the chopper. And the smoke only lasts a very short time. Even when I add the line: (right at the end, before the end of the "While" statement)

    if (_missile distance chopper < 5) then {_missile setpos (getPos chopper);};

    The wierd missile path still remains (it get even wierder).

    One more problem: The missile approaches the target backwards; that is, the front point (or nose) of the missile is pointing away from the chopper which makes the scene look really awkward. How can I keep the front point of the missile pointing towards the chopper at all times?

    By the way, really nice website. The general set out just looks very neat. It has been very useful :)

    Thanks


  9. Just when the player thinks the mission has ended and the allied transport chopper is landing to pick him and his squad up, an AA rockets hits the chopper (so now the player has to get back on foot). Currently I am using a unit called "enemyAA" and the script:

    waitUntil {chopper distance enemyAA < 650};
    enemyAA selectWeapon "Stinger";
    sleep 1;
    enemyAA doTarget chopper;
    sleep 0.5;
    enemyAA doFire chopper;

    However, as the distance gets greater than the 650 meters, I've found that sometimes the AA soldier may not fire. So distance has to be 650 meters or less, and the AA soldier has to be in a reletively clrear spot (no trees or buildings blocking his view) according to my tests. This puts the exposed AA soldier in the danger of being spotted and killed by the player.

    So, instead, is there a way to create a rocket somewhere (without a visible in-game source like an AA soldier), that hits the player chopper?

    Thanks in advance for any help.


  10. I haven't really checked out DAC3.0 yet, I thought it was too complex, I am having good results on ground to air ratio, but I am getting a HUGE amount of stryker squads and ACR motorized patrols and almost no other BLUFOR units, I will see if I can get DAC working.

    DAC is anything but complex. I managed to use DAC effectively (reletively) at a stage when I didn't even know how to use waypoints properly. That should speak volumes...

    Besides, not only DAC units fight better and come with cool fuetures such as reinforcing each other or calling in for artillary support, they are also much easier to produce (in larger numbers). Rather than having to say place 50 units per side manually, you could simply type the number "50" in the DAC trigger.


  11. There's also Condom, though it's way more tame than the other town names posted in this thread.

    And about that "Fucking" town (note that I'm using "fucking" as a noun, not an adjective), I found this to be quite amusing in the wikipedia article:

    The lower sign — which features an illustration of two children — is meant to advise drivers to watch their speed, but tourists see this as a double meaning coupled with the village name.

    hehe...


  12. What "we" is that then ?

    I think he's talking about CODEMASTERS...

    why put another nation into war , killing, victims, suffering , costs ???

    Completely agreed. Why would India want to participate? What benefit would it bring them? Why would they spend so much money for a war that doesn't even concern them anyway (I don't think the Taliban would pose a threat to India, though I'm happy to be proven wrong), when they could instead spend the money on some of poor people in the rural areas of their own land?

    Besides, they already have their own problems with pakistan. According to an Indian friend of mine, the Indian-Pakistani borders aren't as peaceful as I thought they were (though I'm not sure which militia groups are fighting over there and what their purpose is). Though I guess the Indian army might be happy to move in to some of the Pakistani territory and "help the Pakistani government stabilize against possible terrorist threat" :rolleyes:


  13. Best Ingame AI are the Boy's from Company of Heroes!

    When they get shot at, they hide them selfs behind things, not in front like arma2

    They shoot back at Hostiles, In ArmA 2 they are blind, dont see shite at 10 meters in front LMAO

    The AI Medics go get the wounded AI soldiers !!! Bring them back at MASH, after a few saves u get AI Units back for fight....

    When u call Arty support or Air support, they strike where U Want it.....

    Company of heroes, all the 3 parts!! i play them when i get bored from ArmA 2 bugs

    Lucky for us, and me! people like gunter compile nice MOD's to use with the ArmA 2 AI

    Thanks Gunter! @A2Warmod !!!!!!!!!!!!

    Zeus ! @zcommon

    SLX ! @SLX

    if those guys did not exist.....pfffffffffffffffffff wat a AI mess in ArmA 2.....sigh sigh :(

    PS: And also a big THANKS for all those that made the AI in ArmA 2 better ! Tally-hoooooooooo!!!!!

    Mac out

    I personally think that the ARMA2 AI is actually quite good. They are able to preform flanking and use cover in any environment (ok, maybe excluding water), however, I also find the vanilla AI to be a little slow in spotting things and reacting. The pathfinding is a real pain at times too. Mods like Zues AI change the AI into one of the best game AI's in my opinion, though their pathfiding can still be problematic at times.


  14. WOW... just WOW :wow:

    Enemy A.I. Request Reinforcement

    Enemy A.I. Request Artillery Strikes

    Enemy A.I. Request Air Support

    Enemy A.I. React to / Detect Gun Fire

    Enemy A.I. React to / Detect Suppressed Fire

    Enemy A.I. React to / Detect explosion of vehicles

    Enemy A.I. House Search

    ...:eek:. I think I don't want to play with the vanilla AI anymore, before I have even tried the mod :D Thanks man

    If you've got all AI subordinates, you don't need to. They basically ask to let you know that they're far away.

    Yeah, I was talking about the AI subordinates. I was wondering why I didn't have a "report position" option in my character's action options. Thanks


  15. This new form of code is in SQF, not SQS. So you need to save it as an SQF file. Plus, there is no need for the goto "loop" stuff; while {true} do {} is already a loop itself. I don't think a while {} loop would work well in a trigger. Just save it in a notepad as an sqf file, then put:

    OnActivation : Myprocedure = [] execVM "example.sqf"

    in the trigger.

    Remember, your code should now be:

    whie {true} do {skipTime 0.00333; sleep 0.1};

    No more "#Loop" or "goto" stuff. That's in SQS only.

    Should work fine now.


  16. But wouldn't it just stop AI from moving or taking cover as well? I want the AI to at least have some functionality such as going behind cover.

    No, the units will still take cover/return fire. Here's a quote from the wiki:

    Even if you disable the "MOVE" AI, the units will still move out to attack the enemy, unless you disable the "TARGET" AI. Disabling both these AI sections is useful when placing units in defensive positions. This way, you can have them stay behind their cover, and not run out into the open.

    That pretty much explains it all...


  17. (Shift F keys allows you to select the team at 1 keystroke).

    Excellent, just what I was looking for. Thanks. I always wondered how an AI squad leader was so much better than me (when I played as a squad memeber, not the leader). They were able to quickly issue commands to for example units 3,6,7 and 9 to flank right or whatever and then tell 2,3,4 to do "X" and etc. Me on the other hand... well let's just say before I found the position of the appropriate F keys and selected the appropriate units, half my squad was already down, and before I'd manage to issue any effective command, we were already flanked. That really annoyed me.

    Use mod such as GL4 that forces AI to move even under fire.

    Sound like a useful mod. But when I search "GL4" in the title-search, I only find a few threads with some questions on the mod, not the actual download thread. Could you please provide a link?

    You know, this is really one of the few things that really annoys me about the ARMA2 AI, and the ONLY thing that I believe was done better in Dragon Rising. I am by no means saying that Dragon Rising's AI is better; I already know that ARMA2's AI is far superior. It's just that in Dragon Rising it was so much easier to get the AI to follow you, and you wouldn't have to "babysit" them as much if you know what I mean. In ARMA2 on the other hand, I have to turn around every now and then, only to find out that all of my squad are some 300+ meters away from me because they saw some guy 600 meters away in some far away hill (that was probably not a threat) and refuse to come doesn't matter how many time I repeat, "RETURN TO FORMATION" or "ALL AT EASE".

    By the way, I have a noobish question: How do you report your position as a squad leader?


  18. I find it very hard to move my squad when there are enemies around. The AI always (almost) stops listening to my commands and goes prone/goes behind cover and fires at the enemy. Now this is a good thing in most cases and demonstrates the intelligence of the ArmA 2 AI, however, sometimes I really need them to keep moving, even if we're under fire. So I constanly tell them to "return to formation", however they seem to just ignore that and remain prone or keep fire. Maybe there is a way to stress the command? Or some sort of a force-move comand that a squad leader can give to the AI?

    Another thing: What is the advantage of splitting your squad to teams? (I though it allowed the player to quickly select a group of squad members, but I haven't found any quick method of selecting a team without having to scroll through several command menues).

    Thanks for the help


  19. I think I have a solution to your first problem (sorry, as my multiplayer scripting skills aren't very good, I prefered to write it in singleplayer version, though it shouldn't be too hard to convert to multiplayer):

    Try this script in single player. Best run via init.sqf (I haven't tested it):

    private ["_type", "_position", "_unit"];
    
    _type = floor (random 6);
    _position = <Insert your desired position of spawning here>;
    
    switch (_type) do {
    case 0: {_unit = "Ins_Soldier_1" createUnit [_position, grpNull, "addSwitchableUnit this"];};
    case 1: {_unit = "Ins_Soldier_2" createUnit [_position, grpNull, "addSwitchableUnit this"];};
    case 2: {_unit = "Ins_Soldier_Medic" createUnit [_position, grpNull, "addSwitchableUnit this"];};
    case 3: {_unit = "Ins_Soldier_AT" createUnit [_position, grpNull, "addSwitchableUnit this"];};
    case 4: {_unit = "Ins_Soldier_Sniper" createUnit [_position, grpNull, "addSwitchableUnit this"];};
    case 5: {_unit = "Ins_Soldier_MG" createUnit [_position, grpNull, "addSwitchableUnit this"];};
    };

    It should create one of six different types of units, and it's pretty easy to change the unit types (by changing the unit class) or how many random types to choose from by decreasing/increasing the number "6" and changing the number of "cases".

    As I said, I haven't tested this, but I can see a possible problem, as the units created join "grpNull" (a non-existant group), which may cause issues with the "createUnit" command. If it does, try the procedure bellow:

    1. Create a gameLogic and group a unit with 0 probability of presence to it.

    2. In the init line of the logic type, "grp1 = group this".

    3. Replace the "grpNull" in the script with "grp1".

    4. Just before you end the script, add the line:

    _unit join grpNull

    5. Then you can choose which group to place the units in by (after the first code):

    _unit join <Insert group here>

    Hope it helps

×