Home   Help Search Login Register  

Author Topic: Problems with moving targets  (Read 1344 times)

0 Members and 1 Guest are viewing this topic.

Offline jens198

  • Former Staff
  • ****
  • Falcon 3.0 forever!
Problems with moving targets
« on: 03 Jun 2004, 20:32:02 »
Hi,

found this script in an old sniper-range mission (as far as I can remember it was made by Bremmer).
Tried this with OFP 1.96. Problem is, that it won't work.

Even the first two lines (which should hide the targets beneath the earth) don't do a damm thing.
Same with the moving targets down below.
Any ideas what's going wrong here?

Any help is welcome.

Thanks
Jens


--------------------------------------------------------------------------------
_targets = [tag_1,tag_2,tag_3,tag_4,tag_5,tag_6]
"_x setpos [getpos _x select 0, getpos _x select 1, -2]" foreach _targets

#select
? count _targets == 0 : Hint "All Targets destroyed"; exit
_random = random (count _targets)
_random = _random - _random % 1
_target = _targets select _random

_pos = getpos _target
_x = _pos select 0
_y = _pos select 1
_z = _pos select 2

_delta = 2
_increment = 0

#up
~0.01
_target setpos [_x,_y,_z + _increment]
_increment = _increment + 0.05
? getpos _target select 2 < _z + _delta : goto "up"

~(random 2) + 2

#down
~0.01
_target setpos [_x,_y,_z + _increment]
_increment = _increment - 0.05
? getpos _target select 2 > _z : goto "down"

? getdammage _target > 0.9 : _targets = _targets - [_target]
~(random 2) + 2

goto "select"
Try to look unimportant; the enemy may be low on ammo and not want to waste a bullet on you!

Offline Blanco

  • Former Staff
  • ****
Re:Problems with moving targets
« Reply #1 on: 03 Jun 2004, 21:50:09 »
Maybe a stupid Q...

Are you're targets named :
tag_1,tag_2,tag_3,tag_4,tag_5 and tag_6?

« Last Edit: 03 Jun 2004, 21:52:01 by Blanco »
Search or search or search before you ask.

Offline jens198

  • Former Staff
  • ****
  • Falcon 3.0 forever!
Re:Problems with moving targets
« Reply #2 on: 03 Jun 2004, 22:21:57 »
 ;D Yep, names are ok.

Could be modifications like ECP (im using the Y2K3 Modification) cause such trouble?

Jens
Try to look unimportant; the enemy may be low on ammo and not want to waste a bullet on you!

Offline jens198

  • Former Staff
  • ****
  • Falcon 3.0 forever!
Re:Problems with moving targets
« Reply #3 on: 12 Jun 2004, 22:40:57 »
no ideas anyone? I know this script worked for me.

jens
Try to look unimportant; the enemy may be low on ammo and not want to waste a bullet on you!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Problems with moving targets
« Reply #4 on: 14 Jun 2004, 13:59:57 »
"_x setpos [getpos _x select 0, getpos _x select 1, -2]" foreach _targets

Does this work if you substitute in one of the named targets manually?   It seems very odd that the first two lines don't work.     I take it they just sit on the ground with no error message.
Plenty of reviewed ArmA missions for you to play

Offline jens198

  • Former Staff
  • ****
  • Falcon 3.0 forever!
Re:Problems with moving targets
« Reply #5 on: 14 Jun 2004, 14:37:36 »
Hm, seems like I fixed it. But it's strange. I made my own targets and configured them as "tanks" (so that my tanks at the shooting range would shoot at them). Ingame they appear as EAST/OBJECTS and EMPTY/OBJECTS. If I put EAST-targets at the map, script won|t work. If I use the EMPTY/targets, everzthing goes smooth as anything can go...

Jens
Try to look unimportant; the enemy may be low on ammo and not want to waste a bullet on you!

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Problems with moving targets
« Reply #6 on: 14 Jun 2004, 18:38:31 »
just had a quick look at post

an empty vehicle / object isnt seen as being on a side, EAST, WEST etc

hope that helps
« Last Edit: 14 Jun 2004, 18:39:45 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Re:Problems with moving targets
« Reply #7 on: 17 Jun 2004, 16:19:54 »
Is this also a possible anti-cheat addition to the OFP game code ?
ie to stop players "hiding" in the ground, or others being forced into the ground .... ?
.... just a thought.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Problems with moving targets
« Reply #8 on: 17 Jun 2004, 16:36:10 »
No, in general burying things is no problem.  The game code allows it.
Plenty of reviewed ArmA missions for you to play

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Problems with moving targets
« Reply #9 on: 17 Jun 2004, 19:04:20 »
The "anti-cheat code" was implemented in an earlier patch that prevents embedded map objects that are identified by an object id from being moved, but as mac stated it should not prevent editor placed objects from being moved.

                                                                 Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Re:Problems with moving targets
« Reply #10 on: 20 Jun 2004, 15:50:31 »
what I was suggesting was that anything considered "alive" may not be able to be buried.