+ Reply to Thread
Results 1 to 7 of 7

Thread: [E2 Help] Asgard Transporter

  1. #1
    Wire Amateur Milo is on a distinguished road Milo's Avatar
    Join Date
    May 2008
    Posts
    69

    Default [E2 Help] Asgard Transporter

    hey im trying to build a chat controlled transporter for players here is what i got:

    Code:
    @name Asgard
    @inputs 
    @outputs OX OY OZ DX DY DZ Send Retrive Evrything
    @persist Chat:array Target:entity AimPos:vector 
    @trigger all
    runOnChat(1)
    Chat=lastSaid():explode(":")
    if (Chat:string(1)=="player")
    {
        Target = findPlayerByName(Chat:string(2))
        TargetPos = Target:pos()
        OX = TargetPos:x()
        OY = TargetPos:y()
        OZ = TargetPos:z()
        Evrything = 0
        Send = 1
    
    }
    if (Chat:string(1)=="set")
    {
        AimPos = owner():aimPos()
        DX = AimPos:x()
        DY = AimPos:y()
        DZ = AimPos:z()
        
    }
    
    it sends the cords rigth but the send just stays at 1 so if i use it, usuallly dosent work at all, or it teleports the player over and over agian till a new chat message is said...
    how do i fix this pice of crap ?

  2. #2
    Wirererer adadr will become famous soon enough adadr's Avatar
    Join Date
    Jan 2009
    Location
    South Dakota, USA
    Posts
    293
    Blog Entries
    3

    Default Re: [E2 Help] Asgard Transporter

    may need an else at the end, or itll just stay at 1.

  3. #3
    hat full of head

    Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael is a glorious beacon of light Azrael's Avatar
    Join Date
    Aug 2007
    Posts
    1,947

    Default Re: [E2 Help] Asgard Transporter

    Send will never return to 0 again. Add an else case.

  4. #4
    Wire Amateur Milo is on a distinguished road Milo's Avatar
    Join Date
    May 2008
    Posts
    69

    Default Re: [E2 Help] Asgard Transporter

    Now have
    @name Asgard
    @inputs
    @outputs OX OY OZ DX DY DZ Send Retrive Evrything
    @persist Chat:array Target:entity AimPos:vector
    @trigger all
    runOnChat(1)
    Chat=lastSaid():explode(":")
    if (Chat:string(1)=="get")
    {
    Target = findPlayerByName(Chat:string(2))
    TargetPos = Targetos()
    OX = TargetPos:x()
    OY = TargetPos:y()
    OZ = TargetPos:z()
    Evrything = 0
    Send = 1
    }
    else
    {
    Send=0
    }
    if (Chat:string(1)=="set")
    {
    AimPos = owner():aimPos()
    DX = AimPos:x()
    DY = AimPos:y()
    DZ = AimPos:z()

    }
    It outputs Send inuntill another chat message is sent + it dosent teleport, nothing happends

  5. #5
    Wire Amateur Milo is on a distinguished road Milo's Avatar
    Join Date
    May 2008
    Posts
    69

    Default Re: [E2 Help] Asgard Transporter

    Please ?!!! waited an hour...
    Code:
    "I have a better Pythagorean theorem than you"
    

  6. #6
    E2 Optimizer
    chinoto is on a distinguished road chinoto's Avatar
    Join Date
    Apr 2008
    Location
    In the skybox, lost another contraption...
    Posts
    1,714

    Default Re: [E2 Help] Asgard Transporter

    I added a timer that makes it turn off "Send" 100ms after turning it on.
    Code:
    @name Asgard
    @inputs 
    @outputs OX OY OZ DX DY DZ Send Retrieve Everything
    @persist Target:entity AimPos:vector 
    @trigger all
    #Whats the point in "Retrieve" if it is never set and "Everything" if its only set to 0?
    runOnChat(1)
    if (chatClk(owner())) {
        Chat=lastSaid():explode(":")
        if (Chat:string(1)=="player") {
            TargetPos = findPlayerByName(Chat:string(2)):pos()
            OX = TargetPos:x()
            OY = TargetPos:y()
            OZ = TargetPos:z()
            Everything = 0
            Send = 1
            timer("send-stop",100)
        }
        if (Chat:string(1)=="set") {
            AimPos = owner():aimPos()
            DX = AimPos:x()
            DY = AimPos:y()
            DZ = AimPos:z()
        }
    }
    if (clk("send-stop")) {Send=0}
    

    (\__/) <- Put this bunny in your sig and help him to rule the world!
    (='.'=) PM me code and I'll send it back optimized if possible. (I find it fun dammit!)
    (")_(") Expression Gate 2 Wiki Help us update the wiki! Together we can make it more up to date than the SVN! ...

  7. #7
    Wire Amateur Milo is on a distinguished road Milo's Avatar
    Join Date
    May 2008
    Posts
    69

    Default Re: [E2 Help] Asgard Transporter

    #Whats the point in "Retrieve" if it is never set and "Everything" if its only set to 0?
    its not complete... different commands for each
    but thanks
    Code:
    "I have a better Pythagorean theorem than you"
    

+ Reply to Thread

Similar Threads

  1. Asgard teleport [REQ]
    By chaos101 in forum Finished contraptions
    Replies: 29
    Last Post: 09-29-2009, 04:22 PM
  2. How to add glow to the model of Asgard Transporter ?
    By lotus006 in forum Technical Support
    Replies: 1
    Last Post: 04-19-2009, 12:36 AM
  3. Asgard Transporter - Origins and Destinations
    By Cpt. Archie in forum Wiremod Tutorials
    Replies: 3
    Last Post: 07-30-2008, 07:52 AM
  4. Easy to use: Asgard teleporter
    By LinkMandos in forum Finished contraptions
    Replies: 2
    Last Post: 10-14-2007, 07:28 AM
  5. Multi-Targeting Transporter Control Setup
    By cbale2000 in forum Finished contraptions
    Replies: 6
    Last Post: 07-18-2007, 01:54 PM

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