Jump to content

Trixta

Member
  • Content Count

    29
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Trixta

  • Rank
    Private First Class
  1. Have you tried using a count trigger? Create a trigger over the area and put the following in the condition: To check if there are five enemy left (assuming OpFor are the enemy): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">abs(EAST countside thislist)==5 To check if there are any enemy left <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">abs(EAST countside thislist)>0 Then run your script from the On Act. line. To do this from a script name your trigger (eg enemyleft) and put this in your script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">abs(EAST countside list enemyleft)==5 This will only activate if there are 5 left so if, for example you have six left and kill 2 simultaneously then it won't activate. You may wish to have a script that repeats when there are 5 or fewer left in which case use something like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#chkenemy ?(abs(EAST countside list enemyleft)<1):goto "alldead"; ?(abs(EAST countside list enemyleft)<6):goto "fewenemyleft"; #fewenemyleft hint "There's only a handful of enemy left"; goto "endscript" #alldead hint "That's all of them." #endscript exit then run the script from the count trigger using <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">abs(EAST countside list enemyleft)<6 in the condition line - it should activate first when you have less than 6 enemy left and then repeat every time you kill another enemy until they're all dead. Unhiding the objective You're right to hide the objective in init.sqs but to make it unhide create the condition / trigger / script and use <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"3" objstatus "ACTIVE" to make it appear, assuming OBJ_3 is the objective you want to make appear.
  2. Trixta

    Query Units Magazines

    Thanks Shuko - that's the very thing. Just for the sake of tidying up and closing the post I've pasted in the full script which I run from [] exec "havebomb.sqs" in uspc's init line. havebomb.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#getbomb {scopename magcheck;if (_x == "Pipebomb") then {ammodumpdone = true;breakout magcheck;};} foreach magazines uspc; ?(ammodumpdone):goto "havebomb"; goto "getbomb" #havebomb titletext ["Okay, I'm tooled up. Let's get outta here.","PLAIN DOWN"]; exit
  3. Any way of checking if a unit has at least one magazine of a certain type? Obviously hasweapon only checks the weaponslots for weapons. I'm looking to check if the unit has picked up a particular magazine (pipebomb). I'm playing about with reading the unit's magazine array slot by slot to see if pipebomb comes up but am not having much joy. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_mags=magazines uspc; _magcount=0; #getbomb ?(_mags select _magcount="pipebomb"):goto "havebomb"; _magcount=_magcount+1; goto "getbomb" #havebomb titletext ["Okay, I'm tooled up. Let's get outta here.","plain down"]; ammodumpdone=true; exit All I need to know is if unit's magazines include a pipebomb.
  4. Trixta

    Flares and Camcreate

    Ah, erm. Yep. That would be it. Works like a charm. Now, if you don't mind I'm just going to hide under my desk for a while. I did warn you that it was an idiot who needed guiding. Thanks.
  5. Possible workaround? Set something alight and see how long it burns (call it burntime). Then either: Use this with the dammage and distance commands on an incrementing loop to check if fire is still burning and if soldier is close enough to be burnt. You could even factor in distance to calculate how burnt the soldier is based on how close to the fire he is standing if you want to go that far. You may also wish to add something that recognises that, even if the fire is out, the metal will still be too hot to be right up against (eg <0.5 metres) or: create a trigger around the dammage=1 vehicle of the appropriate radius that applies to all units within it. Give it a timeout / countdown value = burntime and then setpos the trigger when the vehicle first ignites. Haven't tried any of this myself but is this the sort of thing you were thinking about?
  6. Trixta

    cant get the breefing to work

    You could try just writing it yourself in notepad or (as I do) keep a template handy to paste everything into. Here's my template (with your info in it). Copy & paste into notepad. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><html> <body bgcolor="#FFFFFF"> <h2><a name="Main"></a></h2> <h6> <b>**Insert your date here</b> <br><br> We just got intel that the russians are recruting civlians to create their own terrorist force in the name of christainty. We must stop this or they will give a bad name to christians! <br><br> Use the br br tag to create a new paragraph if needed. </h6> <hr> <p><a name="plan"></a> you are going to land on the beach, From their you will liberate the city and then transport the civilians out of their. <br> you are parchuted down to </a><a href="marker:paradroploc">this location</a> <br> The russian have occupied a this city <a href="marker:thiscity">Repel the enemy assault</a>and their are civilians in their so watch your fire! </p> <hr> <p><a name = "OBJ_1">your objective is to destroy </a><a href="marker:shilka1">shika 1</a>. </p> <hr> <p><a name = "OBJ_2"></a>and then destroy <a href="marker:shilka2">shika 2 </a> </p> <hr> <h2><a name="Debriefing:End1">Debrief: Mission Success #1</a></h2> <p> Stick the text you want to display for a successful mission (that uses End1) here. </p> <hr> <h2><a name="Debriefing:End2">Alternate Debrief</a></h2> <p> If you want an alternative ending (eg civilians killed etc) then you can stick the text for it in here to be activated by an End2 trigger. </p> <hr> </body> </html> Save as "briefing.html" then paste it into your mission folder. Be sure to add the markers to the map: paradroploc = the location where the paradrop will happen; thiscity = the location of the city with the civs shilka1 & shilka2 = self-explanatory Hope this helps.
  7. Trixta

    Flares and Camcreate

    Thanks for the reply Nichevo. I tried using both camcreate & createvehicle. I can createvehicle a smoke grenade no problem but when I try pasting a flarewhite_m203 in it just doesn't seem to work. I took on board what you said and scripted: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">flarepos=getpos flaresite; flarex=flarepos select 0; flarey=flarepos select 1; flarez=flarepos select 2; flare1 = "FlareWhite_M203" createVehicle [0,0,10000]; titletext ["5","plain"]; ~1 titletext ["4","plain"]; ~1 titletext ["3","plain"]; ~1 titletext ["2","plain"]; ~1 titletext ["1","plain"]; ~1 flare1 setpos [flarex,flarey,flarez+50]; titletext ["Flare fired","plain"]; exit The titletext is just to let me know that the script is running and introduce the delay you talked about. Flaresite is an object that the flare should appear above. The script is run from a radio trigger. I run it and the countdown shows ok (the script is definitely running) but no sign of the flare. Interestingly, if I replace FlareWhite_M203 with HWWMV a Hummer appears ok. Can you post one of your scripts that work (including instructions on setting up the trigger etc.). There's obviously something simple I'm missing here and seeing how you manage it may well highlight where I'm going wrong. Cheers.
  8. Can somebody please walk me through camcreating a flare? I need it for a cutscene and have tried everything I've found here and on biki but cannot make it work. I'm not new to scripting (nor am I a master) but this eludes me. Â Please: nice, easy, idiot-proof steps.
  9. Trixta

    Victory conditions

    Alternatively use my favourite: setup a trigger (OPFOR Present Once) and set the condition to be <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">count thislist == {fleeing _x} count thislist Now, once all the enemy are  "...dead, dying or running home to Mom" the trigger activates. You've held your ground, the enemy is dead or running for the hills and you don't have to hunt down every last one to activate the trigger. Ripped this from OFP posts and update for ArmA. Testing at present but it should work.
  10. Cheers for your help WarriorX. I tried your suggestion but couldn't get it to work. I did, however, manage to get the effect I wanted by using one of your earlier suggestions. The process I used (which is for a cut scene) is this: Created 2 units: attacker (svtrpg1) and dummy armoured target (usabrams) Position svtrpg1 as desired Position usabrams: Â Â Â 1. In sight of svtrpg1 (may need to reveal target to svtrpg1) Â Â Â 2. In a position that is never on camera Set both to combatmode blue Made svtrpg1 dotarget usabrams Svtrpg1 will now kneel and ready the rpg Insert a trigger that is tripped when the real target (usm113) is in position Use trigger to: Â Â 1. Order svtrpg1 dotarget usm113 Â Â 2. usabrams setpos faraway (where faraway is a position or marker that gets it out of the way) Â Â 3. Set svtrpg1 combatmode to red Provided you script the camera right svtrpg1 will hold the crouchtoweapon position indefinitely, usabrams will not appear in the cutscene and it looks like svtrpg1 has the rpg readied and is merely awaiting a target to lock on to. Bit of a long-winded workaround but it got the desired result. Thanks for all your help chaps. For the newb, example code is this (excludes all camera code): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">svtrpg1 setcombatmode "blue" usabrams setcombatmode "blue" svtrpg1 reveal usabrams svtrpg1 dotarget usabrams #waitforrealtarget ?(usm113arrived):goto "changetorealtarget" goto "waitforrealtarget" #changetorealtarget svtrpg1 dotarget usm113 usabrams setpos [0,0,0] svtrpg1 setcombatmode "red" The usm113arrived is made true by putting usm113arrived=true in the activation line of the trigger and setting it to West>Present>Once.
  11. Well, not really. The closest I've got is that the rpg guy sees the vehicle, switches weapons, fires the RPG, then returns to the AK. What I'm trying to do is get a nice slow camera shot of the rpg guy, down on one knee with the launcher prepped, and waiting for the target vehicle to get to a particular point before loosing the rocket off. I know I've seen it done in the credits for CWC (3 Soviet ATs firing on an Abrams) and I've checked the dePBO for the scene but it offers no clues.
  12. I am aiming the Launcher at a vehicle (it's an ambush on a convoy by SpetzNatz). Cheers for the OFPEC string - I think I see the answer in the USE WEAPON, SWITCH WEAPON actions. I'll give it a shot and see how that works.
  13. Anyone know how I can force an AI to use his launcher (LAW or RPG)? In particular I need it for a cutscene. I think it's based round selectweapon but I can't get the swine to do anything other than stand there grinning with his RPG on his back (even when it's the only weapon he's got)!
  14. Trixta

    A matter of time

    Cracked it! Hurrah! The final code, for anyone who's interested, is: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">madetrinite=false;madedourdan=false;madehoudan=false trinitedone=false;dourdandone=false _i=0 #cntr ~1 _i=_i+1 ?(madetrinite)&&!(trinitedone):goto "chktrinite" ?(madedourdan)&&!(dourdandone):goto "chkdourdan" ?_i==150:goto "chktrinite" ?_i==180:goto "chkdourdan" ?(madehoudan):goto "contmiss" ?_i>=240:goto "missfail" goto "cntr" #chktrinite ?!(madetrinite):titletext ["Faster! Faster! Piece of shit truck!","plain down",1] ?(madetrinite)&&!(trinitedone):trinitedone=true;titletext ["Alpha to Bravo. In La Trinite now. Hold tight, guys!","plain down",1]; goto "cntr" #chkdourdan ?!(madedourdan):titletext ["Damn! We're not gonna make it!","plain down",1] ?(madedourdan)&&!(dourdandone):dourdandone=true;titletext ["Alpha to Bravo. We're in Dourdan. Hang in there!","plain down",1]; goto "cntr" #contmiss titletext ["Yes! We made it! Everyone out! GO! GO! GO!","plain down",1] contmiss=true goto "finishit" #missfail titletext ["Bravo to Papa Bear! Where the hell's our- AARRRGGGHHH!","plain down",1] ~4 [usinfgrp,1] setwppos getmarkerpos "airfield" titletext ["Damn it, Alpha! You were too slow! Get your asses back here, now!","plain down",1] ~5 [usinfb_7,usinfb_8,usinfb_9] join usbinfgrp "_x setdammage 1" foreach units usinfbgrp missfail=true #finishit exit Thanks Klavan.
  15. Trixta

    A matter of time

    Nope, no joy. Here's the whole thing so you can see my problem: Squad A (player) must get from Malden airfield to Houdan within 4 minutes to reinforce and save squad B. If squad A does not make it to La Trinite within 2.5 minutes or Dourdan within 3 minutes then they're unlikely to make Houdan in 4 (they're in a 5 tonner). If they fall behind schedule they will receive a warning message at 2.5 and 3 minutes. If they are in Houdan within 4 minutes then the counter stops and the mission continues. If not then the mission ends and they go to another thread of the campaign. The code is along the lines of: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_i=0 #cntr ~1 _i=_i+1 ?_i=150:goto "chktrinite" ?_i=180:goto "chkdourdan" ?(madehoudan):goto "continuemission" ?_i=240:goto "missionfail" goto "cntr" #chktrinite ?!(madetrinite):titletext ["Faster! Faster!","plain down",1] goto "cntr" #chkdourdan ?!(madedourdan):titletext ["We're not gonna make it!","plain down",1] goto "cntr" #continuemission titletext ["Yes, we made it. Everyone go!","plain down",1] contmission=true goto "finishit" #missionfailed titletext ["Bravo to Papa, where's our- AAARRRGGGHHH!","plain down",1] missionfail=true [usinfgrp,1] setwppos getmarkerpos "airfield" titletext ["Papa to Alpha. You were too slow. Return to base.","plain down",1] goto "finishit" #finishit exit I've tried it with single "=" and double "==" on the counter but to no avail. I can't just force a delay (~240) as I need the mission to continue as soon as squad A arrive in Houdan, provided 240 seconds have not passed. If anyone can help, I'm all ears.
×