AgamemnonTR
Member-
Content Count
37 -
Joined
-
Last visited
Never -
Medals
Everything posted by AgamemnonTR
-
I got a copy of Resistance from my brother but the cd-key he gave me is wrong so I can't install the game Can anyone please give me a cd-key?
-
this should help: create an object or a game logic and give it a name like "center" and place it anywhere on the map. the get it's x,y coordinates with the "getpos" command. the create a random number that would represent the radius of the area you want it to crash "x_random = random(200) - random(200)". That should produce 2 random numbers and their subtraction another random number to ensure that it won't always be a positive number (sometimes + and some -). now add the random number to your original coordinate, and you have your crash x coord "x1=x+x_random". repeat for y coord and then use this "my_helicopter setpos (x1,y1)". use the "setdammage" command, and you have a nice lil helicopter crashing anywhere up to 200 meters from the "center" object. simple, yes?
-
I'm a newby to scripting can someone....
AgamemnonTR replied to Talon's topic in OFP : MISSION EDITING & SCRIPTING
well, we could all start posting every lil crap we know abot scripts, but that's doubtfull to happen + it probably won't be what you really wanna know insted, try theEditing Center and go in the scripting section. you'll find most of the answers there -
it can be done but it needs work. here's what you do: set all enemy units (soldiers or whatever) into named groups. Use the "count" command for each group and add the results to get the total number of the enemy units on the map. Then use another script that activates each time you fire your weapon ("countammo" I think does that). In that script use the "count" command again and compare it with the original number that represent the total of enemy units .If the new number is smaller tell the script to add 1 to another variable that represents your kills and then print it on the script. ?(original_number < new_number) : personal_kills_variable=personal_kills_variable + 1 remember to equalize the values afterwards, because you'll always be adding 1 to your kill variable (original_number == new_number). try it out and let me know if it works, or if you need clarification Â
-
How can in game save be turned off?
AgamemnonTR replied to walker's topic in OFP : MISSION EDITING & SCRIPTING
well, the save function within the original game missions, is activated by a trigger or a wp that uses the "savegame" command. This means that you must download the original unencrypted missions and manualy find and delete the command that's all I can think of... -
this should help: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">removeallweapons this; this addweapon "weapon name"; this addmagazine "magazine name"<span id='postcolor'> put this in the unit's initialization field and add more for extra magazines. you can also use it in the activation field of a trigger, but put the unit's name instead of "this" go here, do some snooping and find a list with the weapon and magazine names
-
How to make alarm activate and deactivate?
AgamemnonTR replied to DareDjin's topic in OFP : MISSION EDITING & SCRIPTING
all you need to do is add a trigger (west, detected by east) and then go in effects and add the sound "alarm" not sure how you deactivate it thow. I only know it stops on it's own after a while... -
well, as I understand it, your problem is that the "distance" command calculates z, instead of only x and y. you could try comparing your player's x&y with the coordinates of the chopper, but it would be a bitch telling it when to check for positive and when for negative numbers, depending on your azimuth... here's what I'ld do: place a game logic on the map, name it, and then make it follow the position of the helicopter. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">logic setpos [getpos heli1 select 0, getpos heli1 select 1, getpos player select 2]<span id='postcolor'> that should give the game logic the same x and y as the helicopter, and the z from your player. now all you need to do is use the distance command again, but with the game logic, instead of the chopper
-
Getting heavy grenadiers to fire on a target
AgamemnonTR replied to qUiLL's topic in OFP : MISSION EDITING & SCRIPTING
you have to make a script for that here's what you need </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_target= this select 0 _target_pos= getpos _target _explosion="grenade" camcreate _targer_pos exit<span id='postcolor'> then put this in a trigger activation field </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[target_you_want_to_hit_name] exec "name_of_script.sqs"<span id='postcolor'> that should create a grenade exactly over the target you want msg me if you need more details... -
Getting heavy grenadiers to fire on a target
AgamemnonTR replied to qUiLL's topic in OFP : MISSION EDITING & SCRIPTING
well if what you want is just the effect of a grenadier firing, you could use the camcreate to create a grenade near or at the target you want. if you can tell me more about what you want to do, I think I can help you -
well, there's always the disableAI command, but I'm not all that sure it's gonna be all that helpfull. if you wanna try it, this is the syntax </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit_name disableAI "move"<span id='postcolor'>
-
well, I was kinda stuck on that my self. it's easy to check if he's running low on ammo, but you can't simply ask him to pick up magazines... you could always use the "ammo" command and if he's running low, make him go to the boxes, and then you give him the ammo. something like this: create a trigger and use this for condition: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">my_soldier ammo "M16" ==0<span id='postcolor'> this means that he's out of ammo. now, in the activation field put this: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">my_soldier domove getpos ammo_box<span id='postcolor'> ammo_box is the name you'll give to the ammo crate you want him to go and reload then use another trigger with a 2x2 radius, group it to the player using F2, and select "any member","present". then place it exactly over the ammo crate. this will activate everytime your soldier moves over the ammo. put this in the activation field: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">my_soldier addmagazine "M16";my_soldier addmagazine "M16"; my_soldier domove getpos his_place <span id='postcolor'> this will give him 2 M16 mags (add the command again for more) and move him back to the positon his_place is. "his_place" can be a marker, an object, or a game logic but you'll have to define it. make both triggers repeatedly, and it should work good
-
all I can think of, is give every unit "actuall" time. still, that will make 'em show in the map at all times
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Can you make a "spy" unit? As in an "east" unit that looks like a "west" unit, but "west" units dont recognize it to be "east". (I know there are "east" and "west" spies in the editor, but they only look the part. they dont play it) <span id='postcolor'> I suppose you could make an east unit and group it under a resistance unit that would lead. then kill the resistance guy, and you'll have an east soldier that's actualy in the resistance group. Make sure you have the resistance friendly to all. Once you start firing at the west, the will fire back so there shouldn't be any problems with firefights Â
-
I'm trying to work something out and I wanna know if anyone has come accross a command or a "trick" to make the player invisible on the map... I don't wanna hide the map, just make the player to NOT show on it, like he doesn't in the veteran mode. any ideas?
-
errr, I think there are sites that provide sound and voice matterial for free. some even got voice synthesis. try a couple of search engines and see what you come up with
-
Need help with user defined markers
AgamemnonTR replied to Royal_Blackwatch's topic in OFP : MISSION EDITING & SCRIPTING
you can give your marker a name and then call it from the script. for the second part, you place a trigger for spotting the unit you want, and the use this </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">marker_name SetMarkerPos [GetPos unit_that_you_spotted]<span id='postcolor'> that should place the marker directly over the unit. still, your marker must be set to "Empty" and when the trigger activates set it to "Target" or something else using "SetMarkerType" -
Please help with hostage
AgamemnonTR replied to DarkTerritory3's topic in OFP : MISSION EDITING & SCRIPTING
well I've never seen soldiers drop to their knees while captive, so there's a really good chance that the action doesn't exist now, when you rescue him, use this</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">hostage1 switchmove ""<span id='postcolor'> that's to take his hands off his head, and then use this</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[hostage1] join group my_soldier"<span id='postcolor'> "group my_soldier" gives the value of the group you're into. alternatively, you can use you group's name if you have set it up with the SetGroupID command -
Manning m2 machine guns with resistance soldiers..
AgamemnonTR replied to digitalcenturion's topic in OFP : MISSION EDITING & SCRIPTING
you'll have to make a "GET IN" wp for the unit and place it directly above the machinegun. (make sure the machinegun is empty ) that's for inside the mission. if you want him to start in it use this </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">my_soldier moveingunner my_machinegun<span id='postcolor'> obviously "my_soldier" is the name of your unit and "my_machinegun" the name of the machinegun you want to put him in -
yes, you can use variable=variable+1 but if you want to check for the variable's numerical value you'll have to use "==" </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">? (variable==2)<span id='postcolor'> you could also use 2 different variables set to true of false </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">variable1 = true AND variable2 = true<span id='postcolor'>
-
a suggestion to implement a new command
AgamemnonTR replied to shadow's topic in OFP : MISSION EDITING & SCRIPTING
hmm... might be good actualy a vote from me -
I know the weapon is in the damn crate but the stupid f*ck won't pick it up! I've tried the damn "action" command, but he doesn't pick it up! And no, he's not holding any other weapons. Am I using the command format wrong? Is it a bug? help out!
-
Blackhawk Flying Way Off Course
AgamemnonTR replied to Caelum Atra's topic in OFP : MISSION EDITING & SCRIPTING
try this one for size </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">helicopter_1 disableAI "autotarget" helicopter_1 disableAI "move"<span id='postcolor'> this usually works when the damn choppers insist on acting on their own -
alternatively, you could place a marker on each place you want the helicopter to go and use </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">helicopter_1 commandmove getmarkerpos "marker_name"<span id='postcolor'>
-
never thought about this, but I'ld probably create two triggers that would be repeatedly activated by the chopper and use "commandmove" in the activation fields to send it from 1 to the other example: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">trigger 1 on activation: helicopter_1 commandmove [trigger_2_postition_x, trigger_2_position_y] trigger 2 on activation: helicopter_1 commandmove [trigger_1_position_x, trigger_1_position_y]<span id='postcolor'> try it...