Home   Help Search Login Register  

Author Topic: Simple Amo Crate Attached to Parachute??  (Read 3265 times)

0 Members and 1 Guest are viewing this topic.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Amo Crate Attached to Parachute??
« Reply #15 on: 15 Mar 2005, 23:23:39 »
Quote
_Cargo setpos[_cx, _cy, (_cz + _Height)]
Looks fine to me.  I would only take out the round brackets to make it look tidier.

I was commenting on your post #12
Quote
Error Message :   _cargo getpos[_cx,_cy,(_cz+height)] /#/: error type expect number.

I repeat

  _cargo getpos

is wrong.

getpos [.....]

is also wrong


I suggest you read the comref on getPos and setPos.  Go the the Editors Dept/Online references/Commands.
« Last Edit: 16 Mar 2005, 22:14:06 by THobson »

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Simple Amo Crate Attached to Parachute??
« Reply #16 on: 16 Mar 2005, 00:34:00 »
Oh i see, after looking it up, the differences are
getpos --> goes and finds the position on map of the object
setpos--> goes and puts the object in desired position...

That been said, I put the script back as Mr. Palmer had written/coded it. Then went to the Desert Isle of Intro, in mission mode, and set up a dummy action so nothing but the script runs in the mission folder named test drop.

Use a Ammo crate named Am1, an actual (F6) marker name Mk2, west loon name me1 and in trigger area, and a trigger set to west present and the activation field coded [Am1,Mk2,148,150,2,2,2] exec "ParaDropObjest.sqs" per Mr. Palmers  instructions.
hit the preview button and I got same thing for and error

_Cargo setpos[_cx, _cy, (_cz + _Height)]/#/: invalid error type any expected number.

However i have found out by playing around the "cz" variable does make the parachute open if the number is large enough.
Bottom line is that I think the Script is flawed or the instruction on the usage of script is flawed.

Could some-one please test this-script out and see if I am Wrong. I truely would like to be wrong and  to be shown  the way of my errors.  :P
use search in editor depot, type in "para"  and look for Mr. Plamers script.
 Thank you for your Time  :)
« Last Edit: 16 Mar 2005, 05:25:38 by sharkyjoe »
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Amo Crate Attached to Parachute??
« Reply #17 on: 16 Mar 2005, 14:43:08 »
My guess is that the script works or there would be some adverse comments about it where you got it from.

My suggestion is that you look through the script line by line to try and understand it - using the comref as you go.  That way it will all seem much less like back magic and it should help get you set up for writing scripts of your own.

Quote
Oh i see, after looking it up, the differences are
getpos --> goes and finds the position on map of the object
setpos--> goes and puts the object in desired position...
This would indicate to me that you did not see my earlier post
Quote
_cargo setPos ....  if you are placing the cargo

or

getPos _cargo  if you are trying to find where it is
« Last Edit: 16 Mar 2005, 15:02:34 by THobson »

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Simple Amo Crate Attached to Parachute??
« Reply #18 on: 16 Mar 2005, 17:23:00 »
Oh how, I have tried to go through script time, after time, and time again with the Unofficial Operation Flashpoint  Command Reference Manual version 1.04 "web based" opened up and clicking for referencing.
Now, I know I don't understand everything. Some of it, I do understand.
However I still don't understand, why i would get the error meassge. Even though, i followed the instructions as given, per Mr. Palmer.

I'll adapt and change my Mission a little to suit my needs.
This thread has gone on way to long.

Thankyou everybody, especially Macguba and Thobson for the kind help! :)
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Amo Crate Attached to Parachute??
« Reply #19 on: 16 Mar 2005, 17:37:06 »
I rarely use other people's scripts - I prefer to write my own.  The only exception I make to this now is where a drop command is needed, and despite the subject that is not here.

If you know how to de-pbo a mission have a look at this one:
http://www.ofpec.com/missions_depot/index.php?ID=967
In it I use parachutes to drop people, ammo crates, mg-jeeps, repair trucks, M113s and even Abrams tanks.  When I get home tonight I will dig out what I used in that mission for the ammo crates.  The problem with that is there may be some mission specific elements in it.  I will check.

The mission is and 'early work' of mine - that is shorthand for 'I will probably be embarrased at what I see when I look at it', so if looking at it forces me to we write the whole thing I will blame you.
« Last Edit: 16 Mar 2005, 17:40:10 by THobson »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Amo Crate Attached to Parachute??
« Reply #20 on: 16 Mar 2005, 19:09:57 »
Create a parachute.  
Set it to Flying
call it: chute 1
and in its Init field put:

this flyInHeight 150

Create an ammo crate.  In its Init field put:

[this,chute1] exec "ObjDrop.sqs"

Copy the following into a file and save it as ObjDrop.sqs

Quote
;ObjDrop.sqs
;call by:  [object,chute] exec "ObjDrop.sqs"
;Object starts in the chute

_obj = _this select 0
_chute = _this select 1


#DropUpdate

_chutePos = getPos _chute
_chutePosX = _chutePos select 0
_chutePosY = _chutePos select 1
_chutePosZ = _chutePos select 2

_obj setPos [_chutePosX, _chutePosY, _chutePosZ - 2]
~0.01
? (_chutePosZ > 2) : goto "DropUpdate"
exit

I beleive this will give you what you want, the mission starting with an ammocrate in the air coming down by parachute
« Last Edit: 16 Mar 2005, 22:08:52 by THobson »

keou

  • Guest
Re:Simple Amo Crate Attached to Parachute??
« Reply #21 on: 16 Mar 2005, 20:38:27 »
out of curiosity, will the space (or lack thereof) after the setpos make any difference?

all of sharkyjoe's posts have none, and all of THobson's do.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Amo Crate Attached to Parachute??
« Reply #22 on: 16 Mar 2005, 22:04:20 »
Not if what follows is an array.  I just do it that way.
« Last Edit: 16 Mar 2005, 22:05:13 by THobson »

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Simple Amo Crate Attached to Parachute??
« Reply #23 on: 17 Mar 2005, 04:09:13 »
THANK YOU THobson  THANK YOU THobson  THANK YOU THobson!!
Yes, I was literally shouting that out.
It Worked Like a Charm and it looks good too!  ;D

Very simple and easy to do.
I will be using your Script and The Credit will be yours, Of course!

Not complaining, dont get me wrong, but why didn't the other Script of Palmers Work?? This should be looked into. So others dont go through the same Frustration i have.

Thanks again and if it were up to me, I think you should get another GOLD Star by your Name.
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance