Home   Help Search Login Register  

Author Topic: Miscellaneous Problems  (Read 2603 times)

0 Members and 1 Guest are viewing this topic.

stretch65

  • Guest
Miscellaneous Problems
« on: 23 Nov 2003, 09:20:33 »
Hi,

I was wondering if anyone has worked out how to do the following:

(1) Using a script, is it possible to get a soldier to throw a grenade
    at a target?  (I've tried taking away a soldier's rifle and giving
    him just grenades, but when I order him to attack an enemy, he just
    stands there.)

(2) Is there some way of obtaining an array of the soldiers that can
    be selected using the keys F1-F12?  For example, if I'm the group
    leader and I press keys F3 and F5 (which selects the 3rd and 5th
    soldiers in the group), are there some script commands which will
    return an array of pointers to these 2 soldiers?

(3) Is there a way of determining if a target is in a soldier's clear
    line of sight?  In other words, can I tell (via a script) if a soldier
    has a clear shot without any obstacles (such as brick walls) blocking
    the way?


David.

m21man

  • Guest
Re:Miscellaneous Problems
« Reply #1 on: 23 Nov 2003, 09:43:33 »
1. You could have him target his target and then force him to fire a grenade.

2. onmapsingleclick is the only command I know that can do this.

3. Might be a time for a lot of nearestobject commands.
« Last Edit: 23 Nov 2003, 09:44:24 by m21man »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Miscellaneous Problems
« Reply #2 on: 23 Nov 2003, 13:17:35 »
1.  You could make him face the enemy and use the fire command to get him to throw a grenade which at least would be in the right direction.

3.   I have a vague memory that somebody (LCD?  snYpir?) wrote a guard-spotting-dead-body script that took account of line of sight effects such as buildings.  If you could it it might help.
Plenty of reviewed ArmA missions for you to play

Unnamed

  • Guest
Re:Miscellaneous Problems
« Reply #3 on: 23 Nov 2003, 18:55:44 »
For (3) the knowsabout command will tell you if you have an un-obstructed LOS. If it returns a value of 0 then it cant see the target, if the value returned is 4 then he is almost on top of your AI.

But you would have to play around with the command yourself to see how it may help with your particular scenario.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Miscellaneous Problems
« Reply #4 on: 26 Nov 2003, 11:38:43 »
@ unnamed

da knowsabout command is not dat exact  :-X somtimes it ignores objects  :o  :-X
wich is bad

@ macca - it was ma script usin som fancy maths  :o :wow:  :-X

but den u need 2 tell da script were r da objects emselfs  :-\ wich is not simple task (link 4 script is http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=7078)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Unnamed

  • Guest
Re:Miscellaneous Problems
« Reply #5 on: 26 Nov 2003, 23:02:10 »
It works with all the major terrain elements, so it should be ok? There are some things you have to bear in mind though, also check out the command depot for more info on the KnowsAbouts command.

If you move close enough to an AI (20-30 m depending on its skill) the KnowsAbout will automaticly goto 4, regardless of wether the AI can see you or not. Try putting a west guy directly behind a russian in the editor, as soon as you move he turns on you.

Not sure, but this means it's impossible to sneak up to an AI soldier?

The KnowsAbout level will slowly fall to a lower value when the AI loses sight on a target, so if you hide the AI will slowly forget about you. It will goto higher values instantly.

Beacues it takes time for the value to reduce, it can appear as though the AI can see you through bushes and such.

Forest objects reduce LOS but do not block it, so if you want to stay out of sight of AI, move around the edge of a large forests.

Like I said the it depends on the scenario\terrain e.t.c Best bet is to monitor the value during your mission and see if you can use it to do what you want.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Miscellaneous Problems
« Reply #6 on: 27 Nov 2003, 01:04:15 »
Quote
Not sure, but this means it's impossible to sneak up to an AI soldier?

It is possible, I did it in a mission once.   Loon was a sentry just outside the entrance to a base and I sneaked up behind him.    Oh how I wished OFP had knives ...
Plenty of reviewed ArmA missions for you to play