Home   Help Search Login Register  

Author Topic: needed script...  (Read 641 times)

0 Members and 1 Guest are viewing this topic.

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
needed script...
« on: 02 Aug 2005, 08:44:20 »
Hey! I need a little script.... I dont know how to do it... but IÂ'm quite sure that it can be done with the Cosin-Sin thing....

I need a script which must attach any cargo to any other object.. like a M2 Machinegun in a 5th Truck...  and the orientation must be the same... it can be done easily with the setpos command.. but if you set an offset to any direction, it will keep it  without getting the angle direction of the first object...
if mi english isn't clear.. ask.. :P

What IÂ'm trying to do is to attach an M113 to a Mark 2 PBR... (like it is in the back)


Ha!! and I forgoth the Class name for the Stachel Charges/Pipe Bombs.. or whatever...


Thanks anyway...

Offline 456820

  • Contributing Member
  • **
Re:needed script...
« Reply #1 on: 02 Aug 2005, 18:27:20 »
well first question i remember seeing a script in the ed depot wich attacked an M2 to a 5t truck but i had a look and cant find it

seconds question isnt it 'Pipebomb' thats what i can remember hope that helps alittle ill have a nother look in the dpot and ill look for a link

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:needed script...
« Reply #2 on: 02 Aug 2005, 19:40:11 »
Code: [Select]
;put m113 on pbr

#loop

_pbrx = getpos pbr_name select 0
_pbry = getpos pbr_name select 1
_pbry = getpos pbr_name select 2
_pbrdir = getdir pbr_name

m113_name setpos [_pbrx + (1*sin(_pbrdir)), _pbry + (1*cos(_pbrdir)), _pbry]
~0.1
?not (stop_pbrloop):goto "loop"

exit

to end the setpos loop, set stop_pbrloop to true.
« Last Edit: 02 Aug 2005, 19:40:48 by bedges »

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:needed script...
« Reply #3 on: 03 Aug 2005, 01:04:50 »
Well, The Bedge's Script did it, Thanks guys!!!

And... I Thought it was pipebomb... but it is not? I'll try again, but I tryed whit Pipebomb and didnt work... maybe I didnt Writed it well.. or someting..

Thanks

You exel boys!

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:needed script...
« Reply #4 on: 03 Aug 2005, 02:47:51 »
no, IÂ've lied ;D.... BedgeÂ's Script dinnt make it :s He gets de Idea... but the script dind't work..... and I cant fund the problem! :-[

Please make an other one  :-\

Offline rhysduk

  • Former Staff
  • ****
Re:needed script...
« Reply #5 on: 03 Aug 2005, 11:41:06 »
Quote from: Flauta
Please make an other one  :-\
Quote

*Rolls on floor in sheer laughter*

LOL  ;D Thats great!!

If the RECRUITMENT Depot was working then you could ask (politely) in there.

Use the recruitment lounge if needs be.

Have you thought about starting to script yourself?

Rhys
« Last Edit: 03 Aug 2005, 11:43:13 by rhysduk »
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:needed script...
« Reply #6 on: 03 Aug 2005, 21:28:41 »
hey whatÂ's your problem?
I know the basics of scripting, and I made a lot of own made scripts, but this script go beyond mi knowledge... and I jus tried to fix the problem, but mi I didnt get any result, the script keeps not working propely..

so because I used this way to solve mi problem....
I hope this dont bother anyone

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:needed script...
« Reply #7 on: 04 Aug 2005, 17:38:29 »
m'kay. if you could tell me how it doesn't work, that would help to find the bug.

also, weapons classnames -

Quote
Pipebomb(Satchel Charge)....................................Pipebomb
Timebomb(30s delayed satchel, no remote detonation).........Timebomb

look at this.

EDIT - found typos in code -

Code: [Select]
_pbrz = getpos billy select 2
Code: [Select]
m113_name setpos [_pbrx + (1*sin(_pbrdir)), _pbry + (1*cos(_pbrdir)), _pbrz]
« Last Edit: 04 Aug 2005, 17:53:52 by bedges »

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:needed script...
« Reply #8 on: 04 Aug 2005, 21:11:45 »
Ouch! im sure it dosnt work because of that typos... I'll trying to make it work on a few minutes.... Thanks bedges!
And In first thime Pipebomb dosnt work for me because I was adding it whit Addweaponcargo  ::) jeje and I must add it whit Addmagazinecargo....
Thanks for your patient!!!!

CHeers!