SFC11B 0 Posted November 6, 2009 Making a mission where player infiltrates area to ID target via scope or binos thereby enabling missile strike option. I don't want the option of just launching once player has played the mission and knows where the meeting place is. Also, want added realism w/ID of target. I tried making a trigger with condition 1 = player knowsabout target which i hoped to be made true when the player sees the target. This doesnt seem right (and doesnt work). I think this more of a return value command rather than an action command? <--- question mark on purpose. I dont know how to use return values at this point in mission editing. Also, I've found that x = in the knowsabout cmd can be 0-4. How much does player start to know when 0 becomes greater? Share this post Link to post Share on other sites
AgentD 10 Posted November 6, 2009 The magic "identified" knows about number is apparently 0.105. Share this post Link to post Share on other sites
manzilla 1 Posted February 19, 2010 So how would this look in the units init line? I want to make an enemy ai sniper on a building "know about" friendly units in a specific area, say an airfield. Is there anyway to make this enemy ai sniper spawn in a certain location(on a building) when a certain trigger is activated by the player. Once the enemy sniper spawns on the location, which is 300m away, I'd like him to know about a bunch of friendly units in a specific area already so he can immediately start taking shots at them. Share this post Link to post Share on other sites
AliMag 0 Posted February 19, 2010 Hi, I guess this is what you're looking for: http://community.bistudio.com/wiki/reveal Cheers Share this post Link to post Share on other sites
wiggum2 31 Posted February 19, 2010 Interesting ! How can i make it that the target must be in my scope or binos for some time so that it not happens that i just can point the cursor from great distance and get the airstike option ? Share this post Link to post Share on other sites
manzilla 1 Posted February 19, 2010 Hi,I guess this is what you're looking for: http://community.bistudio.com/wiki/reveal Cheers Like I said, how would this look in a line. I've read that and searched numerous times but it doesn't work. The BIKI and comref are great help but when I can't understand what it says it's useless. I'm a noob with scripting and learning as fast as I can. Can this be used with multiple groups/units? Will the sniper fire from this command? Share this post Link to post Share on other sites
blakeace 11 Posted February 20, 2010 I'm away at the moment so I can't check this option, but have you checked cursorTarget. It is tied in with knowsabout, but could even help with testing some knowsabout options possibly? http://community.bistudio.com/wiki/cursorTarget Share this post Link to post Share on other sites
ceeeb 147 Posted February 20, 2010 Manzilla, you can use the forEach command to reveal many targets at once, and the list command on a trigger to refer to the appropriate units. example: {sniperName reveal _x} forEach list triggerName where sniperName is the name of the sniper triggerName is another trigger covering the area, set to the appropriate side present. if the sniper has line of sight, he will start shooting Share this post Link to post Share on other sites
manzilla 1 Posted February 20, 2010 Manzilla, you can use the forEach command to reveal many targets at once, and the list command on a trigger to refer to the appropriate units.example: {sniperName reveal _x} forEach list triggerName where sniperName is the name of the sniper triggerName is another trigger covering the area, set to the appropriate side present. if the sniper has line of sight, he will start shooting Thanks ceeeb, that will be helpful. I'll play around with it. And thank you blakeace. I'll see what I can do with that. I never realized that's what this was. Share this post Link to post Share on other sites
wiggum2 31 Posted February 20, 2010 Manzilla, you can use the forEach command to reveal many targets at once, and the list command on a trigger to refer to the appropriate units.example: {sniperName reveal _x} forEach list triggerName where sniperName is the name of the sniper triggerName is another trigger covering the area, set to the appropriate side present. if the sniper has line of sight, he will start shooting Where do i put this code ? Share this post Link to post Share on other sites
manzilla 1 Posted February 20, 2010 (edited) Where do i put this code ? I'm thinking maybe in the OnAct line of a the trigger where I want to have it activated then have another trigger(name goes in the code he provided above) which the units I want to have revealed to said sniper are located. I haven't tried it though, yet. I'd like to have it activated in the script that makes my sniper appear though. Not sure if the syntax is right for that though and I have know clue about that stuff. ---------- Post added at 03:40 PM ---------- Previous post was at 02:15 PM ---------- I'm not sure if this is really work, but I think it is. Question though ceeeb, first how would this go in a script? Like this: sn1 setpos [getPos m1 select 0, getPos m1 select 1, 39.9]; sn1 setdir 90; {sn1 reveal _x} forEach list WT1; sn1 dofire c1; sn2 setpos [getPos m2 select 0, getPos m2 select 1, 39.9]; sn2 setdir 90; {sn2 reveal _x} forEach list WT1; sn2 dofire c3; Next can I add dofire in this manner? Like this: {sn1 dofire _x} forEach list WT1; {sn2 dofire _x} forEach list WT1; Basically in the scenario for the top piece of code "sn1" and "sn2" are ACE Insurgent snipers that are beamed to small objects "m1" and "m2" on top of a building when the player enters a trigger area.(I wanted to just spawn the snipers and have them appear at markers on the same location but I'm having a bitch of a time getting that to work, per another thread.) From the building a few hundred meters away they start firing on a group of BLUFOR units(player's side) in a trigger "WT1". I used "doFire unitname" because I don't know how to get the snipers to start firing on the units, more or less at random. I'm wondering if doFire can be used for this basically so the sniper fires on one of the units in "WT1" and if he hits him the sniper will next target another unit in "WT1". Will what I have above do this, or will it even work? If anyone can help I'd appreciate it. Edited February 20, 2010 by Manzilla Share this post Link to post Share on other sites
ceeeb 147 Posted February 20, 2010 (edited) Manzilla Do not use doFire within forEach. forEach code is executed for all elements in the array within a single frame/tick of the game, so the AI is being ordered to fire at each of the targets, in order, and at once. AI can only have one target at any one time, which would be the last one in the forEach loop. The rest of the doFires are just wasted cpu time. I'd would leave it to the AI to decide which is the best target to shoot at. You may tell it to fire upon a specific target without a line of sight, which means no shooting. Wiggum, My reply was to Manzilla's questions. The code will not help you. You want to use the knowsAbout command. If the player knowsAbout value of the target exceeds some value (you'll need to work out what value suits your needs) then the player's group (all units in a group share a single knowledge base) have identified the desired target. The shared knowledge base can cause gameplay problems if the player has AI in his group, since they may detect the target while the player has no idea of it. You may also need to use the vehicle command if the target is in a vehicle. Then make a trigger, with the following as it's condition: player knowsAbout targetName >= someValue Edited February 20, 2010 by ceeeb Share this post Link to post Share on other sites
wickedstigma 10 Posted June 5, 2010 Is there any easy way to use the knowsAbout command? Share this post Link to post Share on other sites