Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Help and Support v
« Previous 1 … 14 15 16 17 18 … 21 Next »
Transporter Pad bugging...
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Transporter Pad bugging...
18-07-2015, 07:18 AM, (This post was last modified: 18-07-2015, 07:20 AM by Yuri6037.)
#4
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: Transporter Pad bugging...
(17-07-2015, 09:35 PM)Yuri6037 Wrote:
(17-07-2015, 06:55 PM)Person8880 Wrote: You can only beam:
  • Players not in vehicles
  • Entities you own that are not parented
and they must not be in a jammed location.

You can only beam to:
  • Another pad
  • A location inside the world
and the location must not be jammed.

If you can prove that you have met every one of these conditions and it is not beaming, then I can fix it. Without knowing what inputs you're giving the pad and the state of jamming etc. at the time of beaming, it's just as likely that you're simply hitting one of the above failure conditions.

Ok, thank you. I think I found how to reproduce the bug : transport a player that is moving, each times my friend uses beam manager gui to beam when I'm moving it's failing.
About inputs I use, well I use them all and after each use, I reset them. I'll need to wait tomorow so I can access the list of inputs I use for actions.

In all my code blocks you'll see a 'v' variable it's the entity found using find."something"
Please also ignore returnGui function because it's not linked to the system, it's an internal helper function that commands client to switch back to the Screen called 'Main' created using ScreenEngine V3.2.

So to beam a player to the pad here is my code (in this case it's find.allPlayers(), I'm also adding checks to be sure v is the real player and v is not invalid):
Code:
if (stargate.locationJammed(v:getPos())) then AI2Lib:AISay("Unable to beam : location is jammed !") returnGui() return end BeamPad["Target1"] = v BeamPad["Beam to pads"] = 1 timer.create("BeamManager_BeamPlayerStop1", 1, 1, function() BeamPad["Target1"] = nil BeamPad["Beam to pads"] = 0 end) AI2Lib:AISay("Beaming player to pad !") returnGui() return

To teleport to another pad here is what I'm using (in this case it's find.byClass("transporter_pad"), and I'm also checking if the entity's owner is the one we want and if it's valid) :
Code:
if (stargate.locationJammed(v:getPos())) then AI2Lib:AISay("Unable to beam : location is jammed !") returnGui() return end BeamPad["Target Pad"] = v BeamPad["Beam from pads"] = 1 timer.create("BeamManager_BeamPadStop1", 1, 1, function() BeamPad["Target Pad"] = nil BeamPad["Beam from pads"] = 0 end) AI2Lib:AISay("Beaming player to pad !") returnGui() return

Now the last code block about the teleport to a point (vector in the map) :
Code:
local name = StringReplace(net.readString(), " ", "") --It's in net hook local vec = GetBeamPointFromName(name) --Internal AI II function usefull ServerCommon stuff if (vec == nil) then AI2Lib:AISay("No such beam point name !") returnGui() --Again don't make attention return end if (stargate.locationJammed(vec)) then AI2Lib:AISay("Unable to beam : location is jammed !") returnGui() return end BeamPad["TargetLocation"] = vec BeamPad["Beam from pads"] = 1 timer.create("BeamManager_BeamStop1", 1, 1, function() BeamPad["TargetLocation"] = Vector(0, 0, 0) BeamPad["Beam from pads"] = 0 end) AI2Lib:AISay("Beaming to point !") returnGui() return

I hope you'll find what is causing those bugs.
In all the 3 cases you can see the location jammed check, and also that I'm reseting the entity after each work.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Transporter Pad bugging... - by Yuri6037 - 17-07-2015, 07:27 AM
RE: Transporter Pad bugging... - by Person8880 - 17-07-2015, 06:55 PM
RE: Transporter Pad bugging... - by Yuri6037 - 17-07-2015, 09:35 PM
RE: Transporter Pad bugging... - by Yuri6037 - 18-07-2015, 07:18 AM
RE: Transporter Pad bugging... - by Person8880 - 18-07-2015, 11:12 AM
RE: Transporter Pad bugging... - by Yuri6037 - 18-07-2015, 05:29 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.