+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Learning Entity Discovery.

  1. #1
    Wirererer vortexnl is on a distinguished road vortexnl's Avatar
    Join Date
    Sep 2007
    Posts
    108

    Default Learning Entity Discovery.

    I want to learn the basics of Entity Discovery.
    Just a simple thing, like getting the entity of a barrel that is near.
    So I can afterwards applyForce it or something :P

    I have no clue where to start, I hope that someone can help....



  2. #2
    Inactive Zanik is on a distinguished road Zanik's Avatar
    Join Date
    Sep 2008
    Posts
    118

    Default Re: Learning Entity Discovery.

    Code:
    interval(500)
    findInSphere(Vectorofbarrel)
    Target = find()
    
    Iirc thats how you do it, you would make Target a persist of course, and you can raise or lower the interval according to how fast you need to update it. This code is also assuming you know how to use vectors, if you dont, go read the wiki.
    [url=http://www.game-monitor.com/garrysmod2_GameServer/69.162.79.109:27015/Archils_247_build_server._PhxSVNWiremodSVNLagfree.html][img]http://module.game-monitor.com/69.162.79.109:27015/image/default/p:99FFD6/ps:110300/t:FF2011/h:220400/l:FFF1BB/crysis-05.png[/img][/url]

  3. #3
    Wirererer vortexnl is on a distinguished road vortexnl's Avatar
    Join Date
    Sep 2007
    Posts
    108

    Default Re: Learning Entity Discovery.

    so Target = Find() means that the variable Target is the output of the findInSphere?

  4. #4
    Wirererer vortexnl is on a distinguished road vortexnl's Avatar
    Join Date
    Sep 2007
    Posts
    108

    Default Re: Learning Entity Discovery.

    God freaking damnit, I get the same fcking error!..
    Code:
    Expression 2: entities\gmod_wire_expression2\core\find.lua:84: attempt to index local 'ent' (a nil value)
    
    This is my code:
    Code:
    @name Barrel lolz
    @inputs 
    @outputs Name:string
    @persist Barrel:entity
    interval(100)
    findInSphere(vec(0,0,0),1000)
    Barrel=find()
    

  5. #5
    Wire Sofaking Officer Tibbles has a spectacular aura about Officer Tibbles has a spectacular aura about Officer Tibbles has a spectacular aura about Officer Tibbles's Avatar
    Join Date
    Aug 2008
    Location
    Barnus Philbert Boulevard
    Posts
    813

    Default Re: Learning Entity Discovery.

    Update your wire.

    If you get Lua errors -> YOU IS OUTDATED

  6. #6
    Spucatum Tauri Bull is a splendid one to behold Bull is a splendid one to behold Bull is a splendid one to behold Bull is a splendid one to behold Bull is a splendid one to behold Bull is a splendid one to behold Bull is a splendid one to behold Bull's Avatar
    Join Date
    Jun 2008
    Location
    Finland
    Posts
    4,702

    Default Re: Learning Entity Discovery.

    He's not outdated.
    My signature has a point.
    Quote Originally Posted by Squeakyneb View Post
    when l3ulletje says do it, do it.
    That

  7. #7
    Inactive Zanik is on a distinguished road Zanik's Avatar
    Join Date
    Sep 2008
    Posts
    118

    Default Re: Learning Entity Discovery.

    Should work, the vec(0,0,0) is the center of the map so the barrel would have to be close to the center of the map. Make sure you are up to date.
    [url=http://www.game-monitor.com/garrysmod2_GameServer/69.162.79.109:27015/Archils_247_build_server._PhxSVNWiremodSVNLagfree.html][img]http://module.game-monitor.com/69.162.79.109:27015/image/default/p:99FFD6/ps:110300/t:FF2011/h:220400/l:FFF1BB/crysis-05.png[/img][/url]

  8. #8
    Wirererer vortexnl is on a distinguished road vortexnl's Avatar
    Join Date
    Sep 2007
    Posts
    108

    Default Re: Learning Entity Discovery.

    I removed my entire wire, and updated via SVN, I am not outdated.
    This is weird

  9. #9
    Inactive Eirath245 is on a distinguished road Eirath245's Avatar
    Join Date
    Feb 2008
    Location
    England
    Posts
    210

    Default Re: Learning Entity Discovery.

    Vortex, I have to say, you're sig severely freaks me out :P
    [URL="http://www.sloganizer.net/en/"][IMG]http://www.sloganizer.net/en/image,Wire,lblue,blue.png[/IMG][/URL]

  10. #10
    Spucatum Tauri Bull is a splendid one to behold Bull is a splendid one to behold Bull is a splendid one to behold Bull is a splendid one to behold Bull is a splendid one to behold Bull is a splendid one to behold Bull is a splendid one to behold Bull's Avatar
    Join Date
    Jun 2008
    Location
    Finland
    Posts
    4,702

    Default Re: Learning Entity Discovery.

    Hehe, I blocked his sig already, together with tibbles

    On topic:
    From find.lua
    Code:
    82: local ent = exp2Discoveries[myId].entities[i - indexOffset]
    83: local entSteamId = nil
    84: if ent:IsPlayer() then entSteamId = ent:SteamID() end
    
    Is it possible something is messing up with the singleplayer steamID?
    My signature has a point.
    Quote Originally Posted by Squeakyneb View Post
    when l3ulletje says do it, do it.
    That

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Similar Threads

  1. Entity Discovery Bugs
    By goluch in forum Expression 1 & 2
    Replies: 9
    Last Post: 04-19-2009, 01:06 PM
  2. Learning Lua
    By turck3 in forum Off-Topic
    Replies: 42
    Last Post: 04-13-2009, 07:11 AM
  3. Expression 2 - Entity Discovery
    By chiss in forum Wiremod Tutorials
    Replies: 12
    Last Post: 03-17-2009, 12:02 PM
  4. E2 Entity Discovery, findResult , Loops?
    By Dave-X in forum Expression 1 & 2
    Replies: 4
    Last Post: 02-09-2009, 12:13 PM
  5. Learning CPU
    By Kupo in forum CPU, GPU, and Hi-speed
    Replies: 5
    Last Post: 09-28-2008, 10:17 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