Jump to content

kyfohatl

Member
  • Content Count

    247
  • Joined

  • Last visited

  • Medals

Everything posted by kyfohatl

  1. +1... Would be a useful thread
  2. @Myke: Good thread idea! Anyways, here's my solution to the first one for you scripting masters to critisize: Let's see what mark Prof. Myke gives me :bounce3: Ok, now I'm going to start working on number two...
  3. kyfohatl

    Money variable

    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>
  4. 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".
  5. kyfohatl

    Campain quality in ARMA

    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.
  6. kyfohatl

    BIS community is steadily growing!

    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.
  7. kyfohatl

    Campain quality in ARMA

    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: 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.
  8. @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
  9. 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
  10. 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
  11. 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.
  12. kyfohatl

    The name of a community that I`ve passed through a few times

    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: hehe...
  13. kyfohatl

    Role of India in the Anti-terror campaign

    I think he's talking about CODEMASTERS... 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:
  14. 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.
  15. @DMarkwick: Indeed. I can confirm what you said after some testing. It seems that the only way around is to create seperate logics. It's just that since I was using a lot of user defined waypoints, I didn't want to clutter the map with more waypoints/logics. But you're right; I think I just have to do it seperately. Thanks for the reply
  16. 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
  17. That is one detailed guide. Very useful thanks. I just tried that (with vanilla AI for testing). It works pretty well actually. Thanks alot.
  18. WOW... just WOW ...:eek:. I think I don't want to play with the vanilla AI anymore, before I have even tried the mod :D Thanks man 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
  19. kyfohatl

    skipTime

    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.
  20. No, the units will still take cover/return fire. Here's a quote from the wiki: That pretty much explains it all...
  21. 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. 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?
  22. kyfohatl

    skipTime

    Oh, ok. Thanks. I've been writing all my scripts with a semicolon at the end of EVERY line, including the last line of a block (they seem to work fine). Does it make a difference?
  23. kyfohatl

    skipTime

    Wait... don't you also need a semicolon at the end of "sleep 0.1" as well? i.e. While {true} do {skipTime 0.00333; sleep 0.1;};
  24. Set the "Special" section of the unit to to "NONE", then, in the init box: this disableAI "Move"; ...and to re-enable it: this enableAI "Move"; The code below will also work: doStop this
  25. Indeed. Maybe an even simpler version could be: waitUntil {!isNil "BIS_fnc_init"}; _type = ["Ins_Soldier_1","Ins_Soldier_2","Ins_Soldier_Medic","Ins_Soldier_AT","Ins_Soldier_MG"] call BIS_fnc_selectRandom; _unit = _type createUnit [_position, grpNull, "addSwitchableUnit this"]; ... Actually I don't think this is any "simpler". Just a different variation.
×