Welcome, Guest. Please login or register.
Did you miss your activation email?
September 20, 2024, 05:41:43 AM
Home Help Login Register
News: Zombie Master 2 discussion

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Allow certain entity possession.
Pages: [1]
Author Topic: Allow certain entity possession.  (Read 6369 times)
phoenixf129
Poster

Posts: 476


I Rise from the Ashes.


« on: February 24, 2011, 09:18:29 PM »

Is there a way i can allow spectators to spectate / control entities i've created? I've done something silly and made an edible kfc bucket, but i want spectaotrs to be able to possess them :)

Any way i can allow?

( entity name is ttt_kfc )

Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it.
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #1 on: February 24, 2011, 10:00:50 PM »

ENT.AllowPropspec = true

[edit: fixed typo]
« Last Edit: March 11, 2011, 07:21:52 PM by Bad King Urgrain »
phoenixf129
Poster

Posts: 476


I Rise from the Ashes.


« Reply #2 on: February 24, 2011, 10:37:25 PM »

Thanks :D

Should make a tttesque wiki page under Convars / Commands, and have "Useful TTT Lua" lol.

Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it.
phoenixf129
Poster

Posts: 476


I Rise from the Ashes.


« Reply #3 on: February 25, 2011, 04:00:23 PM »

Doesnt work.

Placed in the same place i put ENT.CanPickup = true

Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it.
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #4 on: February 25, 2011, 05:16:20 PM »

Look at PROPSPEC.Target in propspec.lua. See if your entity isn't passing one of the checks. The entity also has to be a collision group that is hit by use key trace (ie. not non-solid).
phoenixf129
Poster

Posts: 476


I Rise from the Ashes.


« Reply #5 on: March 11, 2011, 06:37:58 PM »

Yeah. Fixed it... Had to edit;


local function IsWhitelistedClass(cls)
  return (string.match(cls, "prop_physics*") or
          string.match(cls, "func_physbox*") or
          string.match(cls, "ttt_kfc") or
          string.match(cls, "ttt_evil_kfc") or
          string.match(cls, "ttt_chicken") or
          string.match(cls, "sent_egg"))
end


Wasn't passing the whitelist check till i edited that.
« Last Edit: March 11, 2011, 06:42:49 PM by phoenixf129 »

Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it.
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #6 on: March 11, 2011, 07:21:23 PM »

Look at where that function is called:
   if (not ent.AllowPropspec) and (not IsWhitelistedClass(ent:GetClass())) then return end

If you set ENT.AllowPropspec = true, the whole whitelist is irrelevant.

Of course, Lua is case sensitive, and my earlier post had it as PropSpec instead of Propspec. Probably why it didn't work for you before.
sniperduck
Poster

Posts: 178


|:NxS:| Staff! :D


« Reply #7 on: March 11, 2011, 08:09:10 PM »

I can imagine a bunch of KFC boxes surrounding someone. lol

Overtime these forums have made me an asshole. ;D (TTT subforum)
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27016
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: <COMING SOON>
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #8 on: March 11, 2011, 10:15:26 PM »

Well, gameplay on your server is going to be interesting to say the least.
phoenixf129
Poster

Posts: 476


I Rise from the Ashes.


« Reply #9 on: March 11, 2011, 10:47:42 PM »

Look at where that function is called:
   if (not ent.AllowPropspec) and (not IsWhitelistedClass(ent:GetClass())) then return end

If you set ENT.AllowPropspec = true, the whole whitelist is irrelevant.

Of course, Lua is case sensitive, and my earlier post had it as PropSpec instead of Propspec. Probably why it didn't work for you before.


Agh; well, now we find out ;)

I've had someone propkill me with a KFC bucket already Fffffffuuuuuuuu.
Serves me right for running around with 1hp xD

Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it.
Liru
Poster

Posts: 36



« Reply #10 on: March 11, 2011, 10:48:39 PM »

As if the chickens weren't enough, lol...

Redditor? Join the TTT reddit:
http://ttt.reddit.com
phoenixf129
Poster

Posts: 476


I Rise from the Ashes.


« Reply #11 on: March 11, 2011, 10:53:54 PM »

As if the chickens weren't enough, lol...


Chickens turn into KFC on death, a little reward for that, since chickens arent so easy to kill when they are pissed off - restores 20hp, traitors have an 'evil bucket' which explodes on ingestion, can cause heartburn, be warned.

Chickens now have a sort of anger issue, like the gmod.org ones, lol. They get angrier and redder the more they are damaged, they cool down if they are left alone. They go out with a bang at 200 anger.

Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it.
theDjLolz
Poster

Posts: 30


« Reply #12 on: March 15, 2011, 07:33:04 PM »

server ip ?
Tommynator
Poster

Posts: 173

Tommynator is a traitor!


« Reply #13 on: March 16, 2011, 12:57:13 PM »

server ip ?

109.70.148.193:27016
theDjLolz
Poster

Posts: 30


« Reply #14 on: March 16, 2011, 04:45:46 PM »

i will be sure to visit once i get back from my vacation, ty
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Allow certain entity possession. « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.008 seconds with 18 queries.