Home   Help Search Login Register  

Author Topic: whats wrong? (another prob)  (Read 677 times)

0 Members and 1 Guest are viewing this topic.

moondogy

  • Guest
whats wrong? (another prob)
« on: 31 Oct 2003, 15:32:32 »
ok what is wrong in this script? (the script isnt finished yet)
i have the latest patch (1.94) and im runing the fdf mod.(if thats help)

in ofp it says: tbhe move setpos |#|[getpos _buggy select 0, getpos _buggy select 1, (getpos _buggy select 2) + 6]?: error unknown operator
??? ??? ???

Quote
_buggy = tbug
_he = tbhe
_bug = tbug



#move

tbhe move getMarkerPos "tbug"
~ 0.1
? (speed tbug == 0) : goto "pickup"

goto "move"


#pickup

tbug setfuel 1

_tbhe = getpos tbhe
_tbug = getpos tbug

_tbugpos = getpos [_buggy select 0, getpos _buggy select 1, getpos _buggy select 2]
_tbhepos = getpos [_he select 0, getpos _he select 1, (getpos _he select ) + 6]
_tbugpos2 = getpos [getpos _buggy select 0, getpos _buggy select 1, (getpos _buggy select) 2 + 6]

tbhe move setpos [getpos _buggy select 0, getpos _buggy select 1, (getpos _buggy select 2) + 6]

? (_tbhepos == _tbugpos2) : goto "ende"

titleText ["ssssssssssss", "PLAIN"]

#ende

titleText ["aaaaaaaaaaaaaa", "PLAIN"]

exit

i know...bad english...  ;)
« Last Edit: 01 Nov 2003, 00:05:33 by moondogy »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:whats wrong?
« Reply #1 on: 31 Oct 2003, 16:54:10 »
Quote
tbhe move setpos [getpos _buggy select 0, getpos _buggy select 1, (getpos _buggy select 2) + 6]

There's you're error right there.    Do you want tbhe to move or to setpos?    You're gonna have to choose.

The # in the error message marks the location of the error in the line of code.
Plenty of reviewed ArmA missions for you to play

moondogy

  • Guest
Re:whats wrong?
« Reply #2 on: 31 Oct 2003, 17:16:21 »
aaaa

i want tbhe to move in exacly same location as buggy is, but 6 meters higher! how to do that?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:whats wrong?
« Reply #3 on: 31 Oct 2003, 17:34:33 »
just remove the "move"

tbhe setpos [getpos _buggy select 0, getpos _buggy select 1, (getpos _buggy select 2) + 6]

Check the syntax of both the move and setpos commands in the command ref, preferably both the online version and the unofficial command ref.    Never use a command unless you understand what goes on either side of it, otherwise ... well you just get error messsages.   ;D
Plenty of reviewed ArmA missions for you to play

moondogy

  • Guest
Re:whats wrong?
« Reply #4 on: 31 Oct 2003, 17:58:22 »
oh shit i didnt explained well: i want the tbhe MOVES to that location. the "xx move getmarkerpos "xx" is not enought precise...


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:whats wrong?
« Reply #5 on: 31 Oct 2003, 18:33:28 »
Nothing can move to that location, it's 6m off the ground.    To get something there you have to setpos it.   Setpos is as precise as you want.

Tell us more about the problem.    What are you trying to do?
Plenty of reviewed ArmA missions for you to play

moondogy

  • Guest
Re:whats wrong?
« Reply #6 on: 31 Oct 2003, 19:14:06 »
im trying to pick up the buggy with a choper.  the choper flys to buggy waits for few seconds and then flys away with buggy (buggy is atached on a rope under the choper, something like in BAS_UH-60 addon where the hmmw is atached) on location which is choosed on map (onmapclick-> i downloaded a tutorial for that).  

Offline Spinor

  • Members
  • *
  • I'm a llama!
    • The chain of command
Re:whats wrong?
« Reply #7 on: 31 Oct 2003, 19:27:59 »
the height of a chopper is controlled with the command
     chopper flyInHeight height

In your case it should be something like
tbhe move (getPos _buggy)
tbhe flyInHeight 6

moondogy

  • Guest
Re:whats wrong?
« Reply #8 on: 31 Oct 2003, 19:38:27 »
yea i know that, thx for reply anyway.  in that way the helo stops few meters away so if use a script to atach the buggy on chopper, buggy jumps (or spawn (i dont know how to say->my english sucks))  in the position under the choper ( that doesnt look good )

Offline Spinor

  • Members
  • *
  • I'm a llama!
    • The chain of command
Re:whats wrong?
« Reply #9 on: 31 Oct 2003, 19:44:03 »
You could try 'doMove' instead 'move'. I'm not sure but maybe this is more
exact. 'move' is used to move whole groups.

moondogy

  • Guest
Re:whats wrong?
« Reply #10 on: 31 Oct 2003, 22:27:24 »
ok, i save the problem with domove!thx  ;)

now another prob (again i dont know whats wrong):
opf says: tbhe move _pos|#|: error move , type string expected array

_pos = _this select 0
OnMapSingleClick {if (Count _units == 0) then {[_pos, _shift, _alt] exec (rRadioFolder + "\markeraction.sqs"); true} else {false}}

"lz" setMarkerType "marker"
"lz" setMarkerPos _pos

tbhe move _pos

@(unitReady tbhe)

exit

_pos is the location selected on map! (i copied this from pmc_command campaign and modified a little)


« Last Edit: 31 Oct 2003, 22:31:26 by moondogy »