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

Thread: Can someone write an Expression for a drone?

  1. #1
    Wire Noob ryan1271's Avatar
    Join Date
    Aug 2008
    Posts
    22

    Question Can someone write an Expression for a drone?

    I only know the very basics about Expression 2 but I want a drone that orbits me and can attack people.

    I want it to be chat controlled:
    "-orbit" makes it start orbiting me
    "-stoporbit" makes it stop orbiting
    "-ram" makes it fly at the person I'm looking at and kill them
    "-stopram" makes it stop ramming the person

    And I want the expression model to be the small PHX sphere. I am probably asking for too much but I would appreciate it if someone made one for me.

  2. #2
    Wire Sofaking SpectreCat's Avatar
    Join Date
    Mar 2008
    Location
    Sammamish, Washington
    Posts
    504

    Default Re: Can someone write an Expression for a drone?

    No
    10char

    New to the E2? Try my Tutorial:
    A Beginners Guide to Expression 2



    ***Please send a PM before you add me to friends***

    Quote Originally Posted by chinoto View Post
    E2 is not complicated, but many of the people who use it do complicated things with it.

  3. #3
    Wiremod Helper Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,659

    Default Re: Can someone write an Expression for a drone?

    We don't hand out codes.

    Try to make it yourself, and then we'll try and help you out when you encounter problems.

  4. #4
    Wire Noob ryan1271's Avatar
    Join Date
    Aug 2008
    Posts
    22

    Default Re: Can someone write an Expression for a drone?

    I would make an attempt if I knew anything about Expression 2 but I don't and I wouldn't fell right about stealing someones code.

    I just figured it wouldn't hurt to ask.

  5. #5
    Wire Sofaking SpectreCat's Avatar
    Join Date
    Mar 2008
    Location
    Sammamish, Washington
    Posts
    504

    Default Re: Can someone write an Expression for a drone?

    Read tutorials, I got one in my sig.

    New to the E2? Try my Tutorial:
    A Beginners Guide to Expression 2



    ***Please send a PM before you add me to friends***

    Quote Originally Posted by chinoto View Post
    E2 is not complicated, but many of the people who use it do complicated things with it.

  6. #6
    billywitchdoctor.com Schilcote's Avatar
    Join Date
    Jan 2009
    Location
    There.
    Posts
    2,006

    Default Re: Can someone write an Expression for a drone?

    Learn expression 2. It's pretty easy.

  7. #7
    Wire Noob ryan1271's Avatar
    Join Date
    Aug 2008
    Posts
    22

    Default Re: Can someone write an Expression for a drone?

    Ok Spectre, I read your whole tutorial and it seems simple enough. I have a few questions though. Am I using a hologram for the drone? And if I am does that rule out the ram feature because holograms are nocolided with everything? And if I want the drone to orbit me does that mean I have to use trigonomety to change the vectors?

  8. #8
    Wire Sofaking SpectreCat's Avatar
    Join Date
    Mar 2008
    Location
    Sammamish, Washington
    Posts
    504

    Default Re: Can someone write an Expression for a drone?

    You can use a hologram if you like, or use apply force

    If you do use a hologram, it will be noclided with everything, so you cannot ram.
    (For a drone, I would use apply force)

    To make something orbit, you do need trig. But I gave you how to do it in the tutorial.

    New to the E2? Try my Tutorial:
    A Beginners Guide to Expression 2



    ***Please send a PM before you add me to friends***

    Quote Originally Posted by chinoto View Post
    E2 is not complicated, but many of the people who use it do complicated things with it.

  9. #9
    Wire Noob ryan1271's Avatar
    Join Date
    Aug 2008
    Posts
    22

    Default Re: Can someone write an Expression for a drone?

    Ok, I used your code from the tutorial but that only makes it rotate, not orbit. I tried to modify it to work but it only goes in a line over my head.

    I don't know any trigonometry but I think I need sin and cos right? Help

  10. #10
    Wire Sofaking Beer's Avatar
    Join Date
    Jul 2007
    Location
    Dallas, Texas
    Posts
    1,357

    Default Re: Can someone write an Expression for a drone?

    You don't necessarily need trig, it can be done by rotating vectors too.. but yes, sine and cosine are what you would need if you went the trig route.

    Using vectors, you could do something like:
    I++
    Position + Direction:rotate(ang(0,I,0)) * Distance

    Which would rotate your direction vector around the Z axis as I is incremented. Distance is essentially the radius.
    Last edited by Beer; 07-31-2009 at 02:21 PM.

+ Reply to Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Cannot write or see my expressions.
    By T3h in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 07-28-2009, 01:04 PM
  2. E2 help: file read/write?
    By Nikita in forum Expression 2 Discussion & Help
    Replies: 5
    Last Post: 07-02-2009, 11:10 AM
  3. I want to write ugly code, help me!
    By Echo51 in forum Installation and Malfunctions Support
    Replies: 18
    Last Post: 06-05-2009, 08:55 PM
  4. file.Write getting screwed
    By ZeikJT in forum Installation and Malfunctions Support
    Replies: 13
    Last Post: 03-04-2009, 09:51 AM
  5. Write-Only (4 store)
    By Anthoni_C in forum Gate Nostalgia (Old School Wiring) Discussion & Help
    Replies: 6
    Last Post: 08-12-2007, 02:51 AM

Tags for this Thread

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