Author Topic: Jail to info_teleport_destination (or info_target)  (Read 3925 times)

0 Members and 1 Guest are viewing this topic.

Offline AphisNano

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
  • That developer guy
Jail to info_teleport_destination (or info_target)
« on: March 11, 2009, 10:49:26 PM »
I've made a map which has it's own jail.  I would like to be able to integrate this map's jail with the ULX jail functionality, in the following way:

When an admin requests that a user be jailed, ULX or a ULX jail override would first search for a teleport destination named go2jail (or something along those lines; That's what I've named it ATM, but I'm flexible).  Upon finding the teleport destination, it teleports the jailed user to that destination and sets that point as his spawn location (until unjailed, anyway).  If the teleport destination is NOT found, it reverts to the "old" jail functionality of spawning a cage around them, etc, etc.

I believe that other mapmakers that wish to add this type of functionality to their own maps may find this useful, as well.

Professional Linux Devop

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Jail to info_teleport_destination (or info_target)
« Reply #1 on: March 12, 2009, 03:53:36 PM »
Hello.
Though I agree that is a wonderful idea for diversity of different maps, I believe it wouldn't be used enough to include into ULX as a standard feature.
That being said, a module could be written somewhat easily that would allow the action you're aiming for.
I currently do not have the desire to code such an addon, and most of my teammates don't have the time.

Perhaps you know some Lua? Perhaps it's time to learn? :)
Perhaps someone else around here likes the idea also and could tinker?
The Gmod wiki has several entity commands that could be reviewed as a basis.
See Entity:GetPos. If I were researching, I'd also recommend looking into the ULX code to see how it's jail and teleport work.
(Teleport because it deals with vectors, and GetPos returns a vector)


"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Jail to info_teleport_destination (or info_target)
« Reply #2 on: March 13, 2009, 05:50:09 AM »
I would actually even be really easy to include a custom ULX command to do this in your map.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Jail to info_teleport_destination (or info_target)
« Reply #3 on: March 13, 2009, 02:46:06 PM »
I would actually even be really easy to include a custom ULX command to do this in your map.
That being said, a module could be written somewhat easily that would allow the action you're aiming for.

Echo? Or do you mean actually coded 'into' the map?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline AphisNano

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
  • That developer guy
Re: Jail to info_teleport_destination (or info_target)
« Reply #4 on: March 13, 2009, 04:12:14 PM »
Hello.
Though I agree that is a wonderful idea for diversity of different maps, I believe it wouldn't be used enough to include into ULX as a standard feature.
That being said, a module could be written somewhat easily that would allow the action you're aiming for.
I currently do not have the desire to code such an addon, and most of my teammates don't have the time.

Perhaps you know some Lua? Perhaps it's time to learn? :)
Perhaps someone else around here likes the idea also and could tinker?
The Gmod wiki has several entity commands that could be reviewed as a basis.
See Entity:GetPos. If I were researching, I'd also recommend looking into the ULX code to see how it's jail and teleport work.
(Teleport because it deals with vectors, and GetPos returns a vector)
THanks.  I was hoping for this sort of response, and will begin work on a module that implements the requested feature. 
Professional Linux Devop

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Jail to info_teleport_destination (or info_target)
« Reply #5 on: March 13, 2009, 09:21:50 PM »
Echo? Or do you mean actually coded 'into' the map?

Coded into the map
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Jail to info_teleport_destination (or info_target)
« Reply #6 on: March 13, 2009, 10:24:07 PM »
Nice. Didn't know lua could be coded into Gmod maps. I knew that lua could interact with entities compiled into the maps, but not be actually included.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming