+ Reply to Thread
Results 1 to 6 of 6

Thread: Making props' stay in your head's position with E2.

  1. #1
    Wire Noob Quantum's Avatar
    Join Date
    Dec 2008
    Posts
    2

    Question Making props' stay in your head's position with E2.

    I've seen people making props follow the same position as their head, like a cone hat or giant head made with multiple props. Could somebody please give me the E2 code required to do this, if it's not too much to ask?
    Last edited by Quantum; 04-10-2009 at 06:11 PM. Reason: Why can't I change the title?

  2. #2
    Wire Sofaking mjmr89's Avatar
    Join Date
    Mar 2008
    Posts
    555

    Default Re: Making props' stay in your head's position with E2.

    We'll help you... but were not going to just outright give you code. I'd suggest getting familiar with the applyForce and applyOffsetForce functions. Basically you take the position of said object as a vector and subtract from that the position where you WANT it to be (ie over your head).

  3. #3
    Wire Sofaking Jimlad's Avatar
    Join Date
    Dec 2008
    Posts
    941

    Default Re: Making props' stay in your head's position with E2.

    [ame=http://www.facepunch.com/showthread.php?t=707796]Bubble Buddy! - Facepunch[/ame]

    Just spawn one of those and look at the code. I assume that's what you're looking for?

  4. #4
    Wirererer NEMESiS's Avatar
    Join Date
    Oct 2008
    Posts
    162

    Default Re: Making props' stay in your head's position with E2.

    make a turret pointing at were are u looking and make it hover above ur head using gps
    its not that hard
    Quote Originally Posted by Nikita View Post
    1*7*sqrt(9)+8 = 36
    Also known as DXYOC.

  5. #5
    Wire Sofaking Hitman271's Avatar
    Join Date
    Feb 2008
    Location
    Why? You looking for somebody?
    Posts
    731

    Default Re: Making props' stay in your head's position with E2.

    Code:
    @name Imperial Hat
    @inputs 
    @outputs 
    @persist A:vector B:vector Ang
    
    interval(10)
    E = entity()
    A = E:pos()
    C = E:owner():pos()
    
    Att = E:isWeldedTo()
    
    B= C + 100*( vec(cos(Ang), sin(Ang), 0))
    
    Ang+=2
    
    #C = -(A - B+($A*30)-$B*30 + vec(0,0,-200))*5
    C = ( B + $B*75 -A - $A*75 + vec(0,0,200) )*Att:mass()/10
    
    applyForce( C )
    Spawn this on several props, one each. Then see the result
    Quote Originally Posted by Anticept View Post
    This is not some place where you can toss your dick around and expect people to suck it.
    Community Gpu Thread. Post Yours!

    Bouncy Ball

  6. #6
    Wire Noob Quantum's Avatar
    Join Date
    Dec 2008
    Posts
    2

    Default Re: Making props' stay in your head's position with E2.

    Thank you.
    [D3] Coffeelord

+ Reply to Thread

Similar Threads

  1. Um someting just hit my head.(Idea Ofc)
    By CAANz in forum Ideas & Suggestions
    Replies: 8
    Last Post: 05-12-2008, 01:27 PM
  2. My head just exploded.
    By GreyMario in forum Off-Topic
    Replies: 8
    Last Post: 04-01-2008, 06:29 PM
  3. I can't get my head around this bug?!
    By John-a-tron in forum Installation and Malfunctions Support
    Replies: 9
    Last Post: 09-27-2007, 02:40 PM
  4. Making props fatal to the touch
    By EntropyGuardian in forum Ideas & Suggestions
    Replies: 5
    Last Post: 05-26-2007, 07:00 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