Home   Help Search Login Register  

Author Topic: Massive ship attack  (Read 801 times)

0 Members and 1 Guest are viewing this topic.

Shove It

  • Guest
Massive ship attack
« on: 18 Jul 2004, 20:37:32 »
I can't get any decent addons so for my next mission I need to get one of those LSTs moving but they never do, how could I make it work?

ponq

  • Guest
Re:Massive ship attack
« Reply #1 on: 18 Jul 2004, 22:12:35 »
write a script to make it move with
-getpos
-setpos

look these commands up at the editors depot online references.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Massive ship attack
« Reply #2 on: 18 Jul 2004, 22:28:57 »
Rather use the setvelocity command.

Quote
vehicle setVelocity [x, z, y]
Operand types:
    vehicle: Object
    [x, z, y]: Array
Compatibility:
    Version 1.8 required.
Type of returned value:
    Nothing
Description:
    Set velocity (speed vector) of vehicle.

You should be able to have the ship running smoothly with that.
Not all is lost.

GrimMonkey

  • Guest
Re:Massive ship attack
« Reply #3 on: 19 Jul 2004, 06:29:33 »
Yes, do what Arty said.

I would just like to say that the LSTs will not move when given the 'Move' waypoint, they're just stubborn that way.


Beware the GrimMonkey

Shove It

  • Guest
Re:Massive ship attack
« Reply #4 on: 19 Jul 2004, 10:26:25 »
See, I'm still an amateur at this game so I don't know what I put in the places x, y, z. I knew that the setvelocity command would work I just don't know how to use it.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Massive ship attack
« Reply #5 on: 19 Jul 2004, 10:57:36 »
The LSD is not a vehicle, it is an object.   Giving it a waypoint is like giving a waypoint to a tent.

x, y and z are the components of the movement you want.    x is east-west, z is north-south and y is up-down.   (At least I think its that way around)

If you wanted something to move due north you'd use

ship1 setVelocity (0,20,0)

If you are really picky about the direction and speed you want you'll probably need some trigonometry (see the trig guide in the Ed Depot or the end of the Unofficial comref) but if you're not that fussy then I'd just experiment till you get what you want.    If you want it to move a long way you'll need to reissue the command to keep it moving.
Plenty of reviewed ArmA missions for you to play

Shove It

  • Guest
Re:Massive ship attack
« Reply #6 on: 19 Jul 2004, 13:23:06 »
Yeah I just realised it about the xyz. Thanks anyway.

I don't really trust trigonometry though. I hate trigonometry!
« Last Edit: 19 Jul 2004, 13:24:38 by Shove It »

Shove It

  • Guest
Re:Massive ship attack
« Reply #7 on: 21 Jul 2004, 20:35:24 »
Thanks, it works completely but the ship stops after some time and  I want it to move for the rest of its existence without having to use more than one trigger or using the repeatedly option of a trigger. Anyone know the solution?

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Massive ship attack
« Reply #8 on: 21 Jul 2004, 21:02:33 »
Quote
x is east-west, z is north-south and y is up-down.  (At least I think its that way around)

If you wanted something to move due north you'd use

ship1 setVelocity (0,20,0)
 :hmm:
...
Want to check that statement in Mr. Spocks logic test?  ;D

Shove It, you can put your setvelocity commands in a script which is executed from the trigger that you're now using to give her the velocity once.

old on activation: ship1 setvelocity [100,100,0]
new on activation: [ship1] exec "velocity.sqs"

in velocity.sqs:
_unit = _this select 0
#velloop
~1
_unit setvelocity [100,100,0]
goto "velloop"

Doing so will give ship1 the desired velocity every second for the rest of the mission. Good thing about this scripting or whatever it's called, is that you can execute the same script for ship2 or what ever unit you want to. Just change the [ship1] to [ship2] or whatever unitname.  ;)
Not all is lost.

Shove It

  • Guest
Re:Massive ship attack
« Reply #9 on: 21 Jul 2004, 21:57:05 »
Thanks

Shove It

  • Guest
Re:Massive ship attack
« Reply #10 on: 21 Jul 2004, 21:57:10 »
Thanks