+ Reply to Thread
Results 1 to 3 of 3

Thread: [E2] E:freeze() function with e2function syntax?

  1. #1
    Wirererer S1L3NT's Avatar
    Join Date
    Apr 2009
    Posts
    146

    Default [E2] E:freeze() function with e2function syntax?

    I've made a freeze() and unFreeze() function for E2, but i currently have to put the entity in the brackets. This looks weird and makes code look cluttered, so i was wondering if it's possible to make the functions work with the entity first (E:function()).

    i've tried doing: "e2function void [entity Ent]:freeze()", but that didn't work.


  2. #2
    Wirererer S1L3NT's Avatar
    Join Date
    Apr 2009
    Posts
    146

    Default Re: [E2] E:freeze() function with e2function syntax?

    Come on, doesn't anyone know how to do this? come on guys...


  3. #3
    Developer Matte's Avatar
    Join Date
    Jan 2009
    Location
    Norway
    Posts
    3,109

    Default Re: [E2] E:freeze() function with e2function syntax?

    I know.... use "entity:freeze()". The entity will have "this" as the variable name. Example:

    Code:
    e2function void entity:freeze()
    	Object = this:GetPhysicsObject()
    	Object:EnableMotion(false)
    end
    "If anybody says he can think about quantum physics without getting giddy, that only shows he has not understood the first thing about them."
    -- Niels Bohr

+ Reply to Thread

Similar Threads

  1. [E2] Adding functions? How can i freeze entites in lua?
    By S1L3NT in forum Wiremod Addons & Coding
    Replies: 20
    Last Post: 06-14-2009, 05:44 AM
  2. E2: New Function (Freeze) Help
    By ahref in forum Wiremod Addons & Coding
    Replies: 8
    Last Post: 03-08-2009, 03:43 PM
  3. Freeze Latch
    By Shadow45 in forum Ideas & Suggestions
    Replies: 13
    Last Post: 03-01-2008, 08:37 PM
  4. singleplayer freeze
    By magmaknight in forum Bug Reports Archive
    Replies: 10
    Last Post: 08-05-2007, 07:15 PM
  5. Wired Freeze
    By Viking in forum Ideas & Suggestions
    Replies: 1
    Last Post: 05-12-2007, 11:49 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