1. Post #321
    PencilOnDesk's Avatar
    October 2011
    120 Posts
    Manual Transmission

    Ignore the ugly debugging text; working on sorting out a HUD for everything at the moment. I didn't show it in the video but you can stall/downshift improperly resulting in a stop or jolt. The system is pretty bare-bone and is more of a proof of concept type thing for future use. And yes, I did miss 5th gear 3 times.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 1Artistic Artistic x 1 (list)

  2. Post #322
    Gold Member
    Feihc's Avatar
    October 2006
    1,070 Posts
    I'm trying to implement it to an SNPC now. What was the method you used to get them to move from point to point? I'm doing this

    	self:SetLastPosition(pos)
    	self:SetSchedule(SCHED_FORCED_GO_RUN)
    

    With pos being the next point but you can see how he pauses from point to point.
    I ran into problems with this if you call it too fast. They'll spaz out and not move if you call it too quickly and if you don't call it fast enough then the movement isn't that smooth. Might work better with your system but finding a happy medium for calling speed proved to be annoying for me.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1 (list)

  3. Post #323
    foxcock
    Bletotum's Avatar
    June 2008
    6,873 Posts
    I ran into trouble with the run command forcing the npc to stop whatever it is doing (like running), and then run. This means that it isn't easy to make the npc run along a list of nodes, since the npc will stop at each one.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1 (list)

  4. Post #324
    Get your own DarkRP Server!
    FPtje's Avatar
    January 2006
    5,543 Posts
    Is it just me, or is
    self.Entity:PhysicsInit(SOLID_VPHYSICS)
    local phys = self.Entity:GetPhysicsObject()
    if phys and phys:IsValid() then phys:Wake() end
    completely counter-productive?
    I mean, if your vphysics based entity doesn't have a valid physics object, it's completely useless.
    Thus pussyfooting around the issue is shooting yourself in the foot when you could be spewing informative errors like a fountain to help you debug it.
    I only ask because I've been violently tearing DarkRP apart in my spare time in an attempt to make it slightly less stupid and nearly every single entity has those three lines which got me thinking about the whole issue while I ripping them out:
    Why do people seem to be in the habit of silently ignoring abnormal conditions once they've detected them?

    Hi by the way. Sorry I've been absent for so long. University and all that.
    I just copied that over from the default GMod entities., thinking it was necessary.

    May I ask what exactly you're changing? Feel free to send me an SVN patch when you're done.
    Reply With Quote Edit / Delete Netherlands Show Events Friendly Friendly x 1 (list)

  5. Post #325
    Gold Member
    Lexic's Avatar
    March 2009
    6,118 Posts
    I just copied that over from the default GMod entities., thinking it was necessary.

    May I ask what exactly you're changing? Feel free to send me an SVN patch when you're done.
    You seem to have also copied across the legacy self.Entity syntax, which was from when Garry hadn't worked out how to metatable his userdata and you had a separate table from the entity to store stuff.
    self.Entity == self now and has done for years, stop using it.

    Mainly I'm just rewriting the bits that have annoyed me while messing about with Lua on a friend's server.
    So far that's been nearly all his custom enhancements, the money printer system and the shipment system + relevent commands.
    I also removed the hunger, disaster, shitting and drugs systems and a good deal of convars because they were annoying and taking up space they didn't need to.
    I don't think a patch would be appropriate given that this is a) a fairly old version and b) I've killed a ton of features which some people supposedly enjoy, but I could probably send you a copy when I get bored of working on it, if you want to cherrypick bits out.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Friendly Friendly x 1Lua Helper Lua Helper x 1Agree Agree x 1 (list)

  6. Post #326
    Gold Member
    Hentie's Avatar
    May 2010
    2,128 Posts
    I'm trying to implement it to an SNPC now. What was the method you used to get them to move from point to point? I'm doing this

    	self:SetLastPosition(pos)
    	self:SetSchedule(SCHED_FORCED_GO_RUN)
    

    With pos being the next point but you can see how he pauses from point to point.
    I made a derivative of this:
    Code:
    //=========================================================
    // > Forced_Go (Used for debug only)
    //=========================================================
    AI_DEFINE_SCHEDULE
    (
    	SCHED_FORCED_GO_RUN,
    
    	"	Tasks"
    	"		TASK_SET_TOLERANCE_DISTANCE		48"
    	"		TASK_SET_ROUTE_SEARCH_TIME		3"	// Spend 3 seconds trying to build a path if stuck
    	"		TASK_GET_PATH_TO_LASTPOSITION	0"
    	"		TASK_RUN_PATH					0"
    	"		TASK_WAIT_FOR_MOVEMENT			0"
    	""
    	"	Interrupts"
    );
    with tolerance and route search time modified.

    honestly, the npc's have trouble going to the path most of the time which is why I started working on that one player controller.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  7. Post #327
    Get your own DarkRP Server!
    FPtje's Avatar
    January 2006
    5,543 Posts
    You seem to have also copied across the legacy self.Entity syntax, which was from when Garry hadn't worked out how to metatable his userdata and you had a separate table from the entity to store stuff.
    self.Entity == self now and has done for years, stop using it.

    Mainly I'm just rewriting the bits that have annoyed me while messing about with Lua on a friend's server.
    So far that's been nearly all his custom enhancements, the money printer system and the shipment system + relevent commands.
    I also removed the hunger, disaster, shitting and drugs systems and a good deal of convars because they were annoying and taking up space they didn't need to.
    I don't think a patch would be appropriate given that this is a) a fairly old version and b) I've killed a ton of features which some people supposedly enjoy, but I could probably send you a copy when I get bored of working on it, if you want to cherrypick bits out.
    Thanks for the tip anyway :)
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Friendly Friendly x 7Winner Winner x 1 (list)

  8. Post #328
    Conna is finally become inter-national dick. Conna 애미뒤진 씹새끼^^
    rebel1324's Avatar
    December 2008
    1,727 Posts
    Is it entity? It seems you made a script for that vehicle.
    Reply With Quote Edit / Delete Windows 7 Korea, Republic of Show Events

  9. Post #329
    PencilOnDesk's Avatar
    October 2011
    120 Posts
    Is it entity? It seems you made a script for that vehicle.
    It's just a normal prop_vehicle_jeep from your average vehicle pack on garrysmod.org; I didn't edit anything in the vehicle script.

    Edit:

    I'll post another video with some improper shifting so you can see without a doubt it's me deciding when to gear up or down, not the vehicle script.

    Reply With Quote Edit / Delete Windows 7 United States Show Events Lua King Lua King x 1 (list)

  10. Post #330
    CapsAdmin's Avatar
    August 2005
    3,926 Posts
    pac3!!

    Reply With Quote Edit / Delete Windows 7 Norway Show Events Lua King Lua King x 31Winner Winner x 6Funny Funny x 2 (list)

  11. Post #331
    garry's Avatar
    September 2001
    12,322 Posts
    Haha, DAYYMMMM
    Reply With Quote Edit / Delete Windows 7 Show Events Funny x 10Agree x 5Lua King x 2Zing x 1Late x 1Winner x 1 (list)

  12. Post #332
    ezio audtioriet
    alexanderk's Avatar
    May 2007
    1,338 Posts
    oh god what have you done capsadmin
    Reply With Quote Edit / Delete Windows 8 Norway Show Events Dumb Dumb x 1 (list)

  13. Post #333
    johnny guitar was here
    comet1337's Avatar
    February 2010
    6,081 Posts
    he has done melons.

    or what does it look like?
    Reply With Quote Edit / Delete Windows XP Finland Show Events Dumb Dumb x 1 (list)

  14. Post #334
    Gold Member
    Killer_Steel's Avatar
    October 2007
    1,362 Posts
    A mechanic's worst nightmare, that's what it looks like!
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Funny Funny x 3 (list)

  15. Post #335
    Map in a box's Avatar
    July 2009
    7,073 Posts
    snip
    Reply With Quote Edit / Delete Windows XP United States Show Events

  16. Post #336
    CapsAdmin's Avatar
    August 2005
    3,926 Posts


    more stuff :)
    Reply With Quote Edit / Delete Windows 7 Norway Show Events Funny Funny x 16Lua King Lua King x 3Zing Zing x 1Winner Winner x 1 (list)

  17. Post #337
    MoronYard
    _nonSENSE's Avatar
    May 2010
    1,264 Posts
    creepy stuff
    Nightmares, lots of nightmares.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Agree Agree x 4 (list)

  18. Post #338
    Gold Member
    Feihc's Avatar
    October 2006
    1,070 Posts


    more stuff :)
    THESE ARE THE THINGS OF NIGHTMARES!!!!!
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 4 (list)

  19. Post #339
    Terabit's Avatar
    December 2009
    217 Posts
    Basically my old smf and mybb addon, but I've start/completed the following.

    No more modding forum tables.
    Improved linking accounts.
    Started xenforo support.
    Add client tab for information on forum account name, user group, and posts.
    Started vgui work over again.
    Improved support for forum controlled server admin.
    Prefix var for custom prefixes forced by web hosts.
    In-game forum personal messages.
    Other stuff I can't think off.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Useful Useful x 3 (list)

  20. Post #340
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,944 Posts
    Almost kind of useless with Login Thru Steam able to be used on any website - but it is cool nonetheless especially with the added features it has.

    Especially because it'll work with any server and not some proprietary bullshit.

    I give you props :>
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 2 (list)

  21. Post #341
    Terabit's Avatar
    December 2009
    217 Posts
    Was checking to to see if their was an update to mybb. It turns out they've become a victim to a deface.



    Turns out the deface page has cloudflare. Looks like the "hackers" don't want their site to go down? That's a laugh.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 5 (list)

  22. Post #342
    taste the salty dong
    Remscar's Avatar
    September 2009
    1,821 Posts
    function ImportMapEnts()
    	local EntityTable = {}
    	for _, v in pairs(file.Find("Contaminant/leveldata/"..game.GetMap().."/*.txt")) do
    		table.Add(EntityTable,ImportFile("Contaminant/leveldata/"..game.GetMap().."/"..v))
    	end
    	return EntityTable
    end
    
    
    local function ImportFile(filename)
    	local contents = file.Read(filename)
    	local output = {}
    	local buffer = {}
    	for k1,v1 in pairs(string.Explode(contents,"\n")) do
    		for k2,v2 in pairs(string.Explode(v1,"|")) do
    			buffer["classname"] = v2[1]
    			buffer["location"] = Vector(v2[2],v2[3],v2[4])
    			table.Add(output,buffer)
    			buffer = {}
    		end
    	end
    	return output
    end
    
    Coded it and then forgot why i did in the first place.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  23. Post #343
    Terabit's Avatar
    December 2009
    217 Posts
    function ImportMapEnts()
    	local EntityTable = {}
    	for _, v in pairs(file.Find("Contaminant/leveldata/"..game.GetMap().."/*.txt")) do
    		table.Add(EntityTable,ImportFile("Contaminant/leveldata/"..game.GetMap().."/"..v))
    	end
    	return EntityTable
    end
    
    
    local function ImportFile(filename)
    	local contents = file.Read(filename)
    	local output = {}
    	local buffer = {}
    	for k1,v1 in pairs(string.Explode(contents,"\n")) do
    		for k2,v2 in pairs(string.Explode(v1,"|")) do
    			buffer["classname"] = v2[1]
    			buffer["location"] = Vector(v2[2],v2[3],v2[4])
    			table.Add(output,buffer)
    			buffer = {}
    		end
    	end
    	return output
    end
    
    Coded it and then forgot why i did in the first place.
    Why not use glon instead of having to use string.Explode?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Disagree Disagree x 2 (list)

  24. Post #344
    We Are No Idiots
    Aide's Avatar
    March 2010
    4,515 Posts
    local function ImportFile(filename)
    	local contents = glon.decode(file.Read(filename)) or {}
    	local output = {}
    	local buffer = {}
    	for k, v in pairs(contents) do
    		buffer[#buffer + 1] = { ent = v.ent, pos = v.pos }
    		table.Add(output, buffer)
    	end
    	return output
    end
    

    Thinking something like this. No need to use 2 loops and 2 string.Explodes. If it's gonna end up being a table save it as a table using glon.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  25. Post #345
    taste the salty dong
    Remscar's Avatar
    September 2009
    1,821 Posts
    local function ImportFile(filename) local contents = glon.decode(file.Read(filename)) or {} local output = {} local buffer = {} for k, v in pairs(contents) do buffer[#buffer + 1] = { ent = v.ent, pos = v.pos } table.Add(output, buffer) end return outputend

    Thinking something like this. No need to use 2 loops and 2 string.Explodes. If it's gonna end up being a table save it as a table using glon.
    Never really ever used glon. Good idea.

    local function ImportFile(filename)    
    local contents = glon.decode(file.Read(filename)) or {}    
    local output = {}    
    local buffer = {}    
    for k, v in pairs(contents) do        
       buffer = { ent = v.ent, pos = v.pos }       
       table.Add(output, buffer)  
       buffer = {}  
    end    
    return output
    end
    
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  26. Post #346
    Gold Banana
    Banana Lord.'s Avatar
    May 2010
    6,431 Posts


    more stuff :)


    :(!
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 7Disagree Disagree x 1 (list)

  27. Post #347
    Moderator
    Ninja101's Avatar
    December 2008
    740 Posts
    Oh great he's killed my dropbox :c

    Edited:



    Re-Upp'd
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Funny Funny x 12Friendly Friendly x 1 (list)

  28. Post #348
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,944 Posts
    That is terrifying.. omg what.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 4Late Late x 1 (list)

  29. Post #349
    zzaacckk's Avatar
    June 2009
    2,140 Posts
    Almost kind of useless with Login Thru Steam able to be used on any website - but it is cool nonetheless especially with the added features it has.

    Especially because it'll work with any server and not some proprietary bullshit.

    I give you props :>
    Yes, but if your community doesn't focus on just source games (they do minecraft for example) then using the Steam developer API would be stupid.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Zing Zing x 1 (list)

  30. Post #350
    gamerpaddy's Avatar
    March 2009
    311 Posts
    Working on a new Dataline between Arduino and Garrysmod
    .. damn i need a Serial-Module for gmod.. this TCP-Com program is a 14 days trial version -.-


    ohai
    the serial connection can handle more.. but im using 9600 BAUD rate..
    thats to slow :P
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Lua King Lua King x 5Winner Winner x 2 (list)

  31. Post #351

    Some gameplay from that gamemode called 'Project 5' that I've been working on.

    Edit: bonus.

    Reply With Quote Edit / Delete Windows 7 Lithuania Show Events Lua King Lua King x 2Artistic Artistic x 1Funny Funny x 1 (list)

  32. Post #352
    Gold Member
    Feihc's Avatar
    October 2006
    1,070 Posts
    Yay prediction! Now only if I could put these values to use!
    Reply With Quote Edit / Delete Windows 7 United States Show Events Useful Useful x 5Winner Winner x 1Artistic Artistic x 1 (list)

  33. Post #353
    gamerpaddy's Avatar
    March 2009
    311 Posts
    New Protocol, works better


    how it works?
    Here is an Example

    "sab"

    first char is mode
    s = set value
    m = set mode

    second is PORT
    A = 3
    B = 4
    C=5
    D=6
    ...
    ...
    K=13

    and third char is Value
    A= LOW
    B = HIGH

    (Arduino return every 10Milliseconds a string,"sa,A5,A4,A3,A2,A1,ea,sd,D3,D4,D5,D6,D7,D8, D9,D10,D 11,D12,D13,se")
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Informative Informative x 1 (list)

  34. Post #354
    Gold Member
    Crap-Head's Avatar
    May 2010
    408 Posts
    Sooooo, its the 1st.

    I suppose its time for someone (not me, i suck a such posts), to wipe up a new thread for June?
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events

  35. Post #355
    PENISCORP DIRECTOR
    Gran PC's Avatar
    August 2007
    3,086 Posts
    Yeah prepare a new thread - thanks for reminding me so I can buttwhip the people over at the programming WAYWO too.
    Reply With Quote Edit / Delete Windows 7 Spain Show Events Funny Funny x 4Agree Agree x 1 (list)

  36. Post #356
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,944 Posts
    [TABLE="width: 600, align: center"]
    [TR]
    [TD]
    [/TD]
    [/TR]
    [/TABLE]
    [TABLE="width: 100%, align: center"]
    [TR]
    [TD][/TD]
    [/TR]
    [/TABLE]
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 6Artistic Artistic x 3Friendly Friendly x 1Informative Informative x 1 (list)