+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Drone Help

  1. #1
    Wire Amateur Mattdaman's Avatar
    Join Date
    Jul 2009
    Location
    Hell no stalkers!
    Posts
    34

    Post Drone Help

    Hi, I need help getting an expression for expression 2 to make a drone that can move forward, back, side to side, and look at the angle you are looking at, purly by vector thrusters. If you were a help enough, I would give you a cookie , if I could...
    Last edited by Matte; 07-19-2009 at 02:44 PM.

  2. #2
    Lifetime Supporter Nikita's Avatar
    Join Date
    May 2009
    Posts
    769

    Default Re: Drone Help

    Lol what is this vector thruster fetish everyone is having :P

  3. #3
    Wire Sofaking Echo51's Avatar
    Join Date
    Feb 2009
    Location
    Denmark
    Posts
    1,489

    Default Re: Drone Help

    A fetish i assume..

    Matt, go try, and fail, then come for help with the problem you have, DO NOT ask for code
    Proud of my non-existant life...
    In russia, Expression 2 codes you!
    Quote Originally Posted by Snowden42 View Post
    Nooblishious? That's a signature keeper.

  4. #4
    Wirererer adadr's Avatar
    Join Date
    Jan 2009
    Location
    South Dakota, USA
    Posts
    303
    Blog Entries
    3

    Default Re: Drone Help

    i'm not sure if you could do look angles with vector thrusters...if so it would be hard. you could do vector thrusters to go to the position and apply angular force to look id say it the easiest way. no code handouts sry.

  5. #5
    Wire Sofaking Echo51's Avatar
    Join Date
    Feb 2009
    Location
    Denmark
    Posts
    1,489

    Default Re: Drone Help

    Applyforce all the way is ofcause the easiest adadr
    Proud of my non-existant life...
    In russia, Expression 2 codes you!
    Quote Originally Posted by Snowden42 View Post
    Nooblishious? That's a signature keeper.

  6. #6
    Wire Amateur Mattdaman's Avatar
    Join Date
    Jul 2009
    Location
    Hell no stalkers!
    Posts
    34

    Default Re: Drone Help

    Yeah, maybe I should use apply force, but I have no idea why that did not hit me using the idea using apply force on it though.

  7. #7
    Wirererer adadr's Avatar
    Join Date
    Jan 2009
    Location
    South Dakota, USA
    Posts
    303
    Blog Entries
    3

    Default Re: Drone Help

    lol thanks if i helped if you need help with applyforce Maso has a great tutorial thats how i learned.

  8. #8
    Wire Amateur Mattdaman's Avatar
    Join Date
    Jul 2009
    Location
    Hell no stalkers!
    Posts
    34

    Default Re: Drone Help

    I don't understand though (since I am new to the wiremod forums), why won't people handout codes when you ask for them?

  9. #9
    Wire Amateur Mattdaman's Avatar
    Join Date
    Jul 2009
    Location
    Hell no stalkers!
    Posts
    34

    Default Re: Drone Help

    Okay, ignore the last line, I found out why you should not give out codes for help, LOL.

  10. #10
    Wire Tutor chinoto's Avatar
    Join Date
    Apr 2008
    Location
    Brooklyn Park, MN. Lost my thumbdrive yet again...
    Posts
    1,983

    Default Re: Drone Help

    Giving out code is a personal choice that several choose not to ever do, but there are a few like me who just want to code something . Thank you for asking for the code, this was actually fun to do because it was a bit challenging.
    To make it work paste the expression on something, put 4 vector thrusters on it (location doesn't matter much), use the "Expression 2 - Wirelink" gun on each VThruster and then wire each wirelink input to a VThuster. Feed it a vector to stay at and an angle to face.
    Code:
    @name
    @inputs Angle:angle Vector:vector
    @inputs W1:wirelink W2:wirelink W3:wirelink W4:wirelink
    runOnTick(1)
    EE=entity(),EV=EE:massCenter()
    LocalE=transpose(matrix(EE:right(),EE:forward(),EE:up()))
    LocalA=transpose(matrix(Angle:right(),Angle:forward(),Angle:up()))
    
    E1=W1:entity()
    E2=W2:entity()
    E3=W3:entity()
    E4=W4:entity()
    
    V1=(Vector+LocalA*(LocalE*(E1:pos()-EV))-EV)*10-E1:vel()
    V2=(Vector+LocalA*(LocalE*(E2:pos()-EV))-EV)*10-E2:vel()
    V3=(Vector+LocalA*(LocalE*(E3:pos()-EV))-EV)*10-E3:vel()
    V4=(Vector+LocalA*(LocalE*(E4:pos()-EV))-EV)*10-E4:vel()
    
    W1:setVector("Vector",-V1)
    W2:setVector("Vector",-V2)
    W3:setVector("Vector",-V3)
    W4:setVector("Vector",-V4)
    
    W1:setNumber("Mul",V1:length())
    W2:setNumber("Mul",V1:length())
    W3:setNumber("Mul",V1:length())
    W4:setNumber("Mul",V1:length())
    (\__/) Expression 2 Resources: E2 Beginner's Guide | E2 Formatting Guide | E2 Function Reference | E2 Examples | Me
    (='.'=) PM me code and I'll send it back optimized if possible. (I find it fun dammit!)
    (")_(") Drunkie referring to an E2: "It's obvious that Chinoto made this, his coding style is all over it."

+ Reply to Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Another 5 second drone!
    By Nikita in forum Finished contraptions
    Replies: 25
    Last Post: 08-16-2009, 11:01 PM
  2. NPC Killer Drone
    By daemoz in forum Finished contraptions
    Replies: 4
    Last Post: 07-30-2009, 02:59 AM
  3. need help with an attack drone.
    By liam is me in forum Expression 2 Discussion & Help
    Replies: 18
    Last Post: 07-14-2009, 12:50 AM
  4. The Drone-It Launcher
    By Vivid in forum Finished contraptions
    Replies: 7
    Last Post: 03-01-2009, 01:20 PM
  5. Z axis following drone
    By -XI- in forum Installation and Malfunctions Support
    Replies: 8
    Last Post: 07-07-2007, 12:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots