Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Person Teleport System

Most likely using virtual objects as the triggers, would it be possible to create a person teleport system? It's not for some kind of Sci-fi modification (Although you can't deny that would be pretty awesome) but I want to use it as a lift (Elevator).

 

Basically, with a hospital building I am planning on doing, the HEMS (Helicopter Emergency Medical Service) personnel have a section of the building near the roof by the helipad that I want to be enterable, however these same people also have response cars, so they would need a way to get to the ground floor to the car park.

 

Idea is simple, you have a lift that when you put someone near (Enter the VO), they will teleport down to the ground floor's VO, and vice versa.

Featured Replies

Its possible.

  • Person goes to virtual object
  • Execute command to "warp" them to rooftop or ground floor. Probably will make use of another set of virtual objects which need to be defined as vectors
  • These vectors, you then set so that the position of the person will be changed. If they are at the bottom VO, they will be sent upstairs, and vice versa
  • Then upon being teleported, have them enter their respective vehicles.

Very possible, would like to see it done.

Yes this is possible, you just "kill" (remove) the individual in the upper VO and re-create them in the lower VO with the same attributes/traits in place....  The only thing that you want to do is to make sure the VO's don't activate by the persons going into them, but instead have a console on the lower level and upper levels which the player has to interact with in order to trigger the script.  The one up top would trigger the transfer down script, the one on the bottom triggers the go up scripting... 2 separate functions but a reversal of the same task.

Yes this is possible, you just "kill" (remove) the individual in the upper VO and re-create them in the lower VO with the same attributes/traits in place....  The only thing that you want to do is to make sure the VO's don't activate by the persons going into them, but instead have a console on the lower level and upper levels which the player has to interact with in order to trigger the script.  The one up top would trigger the transfer down script, the one on the bottom triggers the go up scripting... 2 separate functions but a reversal of the same task.

I was thinking Pottyscotty wanted automation, like a call script that would require zero action by the player, which is why PushActionDelete wouldnt work because the person would no longer be referenced in the script. I was thinking along the lines of having a permanent person that is created, teleported, and enter the desired vehicle.

 

The manual method you described is useful if you want the player to have to command the persons to go up/down and the script would deselect the deleted person and select the new person. Both ways are feasable, just 2 different ways to do one thing.

  • Author

The one up top would trigger the transfer down script, the one on the bottom triggers the go up scripting... 2 separate functions but a reversal of the same task.

I was thinking Pottyscotty wanted automation, like a call script that would require zero action by the player, which is why PushActionDelete wouldnt work because the person would no longer be referenced in the script. I was thinking along the lines of having a permanent person that is created, teleported, and enter the desired vehicle.

I would think automation would be better however Mikey's idea would work just as well. More a case of being able to hurry them out during an incident as the Mod is based on management of resources and time.

 

I would say getting them into the vehicles automatically would not be required and perhaps even hard in this case due to the fact that some of the vehicles have different roles and it's up to the player to send which ones/s.

I would think automation would be better however Mikey's idea would work just as well. More a case of being able to hurry them out during an incident as the Mod is based on management of resources and time.

 

I would say getting them into the vehicles automatically would not be required and perhaps even hard in this case due to the fact that some of the vehicles have different roles and it's up to the player to send which ones/s.

Then manual method is the way. Scripts are set up to only do specific vehicles and specific setups. Something variable like that wont be doable without making many scripts for the many roles desired by the player. Manual method it is then. Though I'd like to imagine that having to delete and create a new person would probably be less efficient than just warping one to the top as stated by the title. I believe that creating a vehicle, person, or object by script just adds a burden to this game. I personally prefer using ChangePrototype or any other non-deletion method to avoid having to create a new person or delete an existing one.

  • Author

Then manual method is the way. Scripts are set up to only do specific vehicles and specific setups. Something variable like that wont be doable without making many scripts for the many roles desired by the player. Manual method it is then. Though I'd like to imagine that having to delete and create a new person would probably be less efficient than just warping one to the top as stated by the title. I believe that creating a vehicle, person, or object by script just adds a burden to this game. I personally prefer using ChangePrototype or any other non-deletion method to avoid having to create a new person or delete an existing one.

Would the warp method still be doable using a manual button/command?

Would the warp method still be doable using a manual button/command?

Very much so. Its simply going to be one command with several childObjects executed in a certain order to either warp them upstairs or downstairs. Since there is no need to make them automatically enter a specific vehicle, there is no need to write that part of the code.

  • Author

Very much so. Its simply going to be one command with several childObjects executed in a certain order to either warp them upstairs or downstairs. Since there is no need to make them automatically enter a specific vehicle, there is no need to write that part of the code.

Away this weekend but shall attempt it when I'm back, not really a scripter myself but I know a few bits and bobs. Worth a try I guess :D

The reason you want a console/button to trigger it is so that the script doesnt keep relocating people that you do not wish to relocate.  It prevents "incidental" movements, as we all know the AI is duuuuumb so they are liable to go into the "portal" even if you don't want them to, then they'll get transported.. Aside from that, when you transfer their location it will hamper the pathfinding for the units, they will likely stop and sit when moved to a new location since it is presumably a walkable structure you're putting them on which will have no alternative way off of it.

 

The manual trigger method is just the "easier" way to limit glitching/bugs from what you want to do, either one of our methods, itch or mine for actually moving the people would work, more personal preference really that comes into play.  TBH itch, I don't think that killing and re-creating the unit in a different location increases the "load" on the game, since you are 1/1 replicating the units that were already present, now if both sets of units were present at the same time via the script then yes it would increase load.  But anyone who would code this should have the common sense to kill the original off before creating the duplicate unit.  Load with this technique should not increase...

 

As with any script it really comes down to the context as to how it hurts performance, moving a few individual units (sheeple) isnt quite the same as trying to move 25-30 of them.  In any methodology this would result in performance loss.  Remember itch, the performance loss issues primarily are a concern with "autonomous" scripts (scripts that run in the background).  Scripts that are user-triggered usually do not cause significant damages to the performance, and certainly not for prolonged periods as they must be manually executed by the user.  If it were Automatic, either of our methods would result in increased lag from the "checks" that would have to take place at both VO's.  Automatic is useful but not when it requires constant checking for entities/objects/dummies, that's what hurts performance more than anything I believe.

 

Either way you wanna go about it potty is up to you, but I strongly urge you to use the manual trigger method to limit damaging bugs and glitches that could result in an automatic system.  Remember the End-Users find ways to break things, the more options they have, the more they will break.

The auto system wouldnt be so "auto" actually. It would just search for the specific squad inside the VO so that if a civilian or any other squad was in the VO, it wouldnt teleport them. Its a matter of putting redundancies. I'd also recommend putting said redundancies into the manual console method, just to be 100% sure that nothing goes wrong. It doesnt run in background, but gets called only when player presses a button to "call" the units into the vehicles.

The auto script I had in mind isn't really a background script. Its actually a one-time call script like the LA Mod DummyCallCrew script. Having a dedicated running script would just be unreasonable in this context. Instead, having the teleport system called upon during the execution of a dummy command would take the same as a manual button, because its still a command at the end of the day.

 

Well, to each their own, and its up to Scotty to decide what he wants to do. I'll still be here to provide the script specifics when time comes he has to build this script.

  • Author

The reason you want a console/button to trigger it is so that the script doesnt keep relocating people that you do not wish to relocate.  It prevents "incidental" movements, as we all know the AI is duuuuumb so they are liable to go into the "portal" even if you don't want them to, then they'll get transported.. Aside from that, when you transfer their location it will hamper the pathfinding for the units, they will likely stop and sit when moved to a new location since it is presumably a walkable structure you're putting them on which will have no alternative way off of it.

That was never something I thought of, thanks for pointing it out actually.

 

Well, to each their own, and its up to Scotty to decide what he wants to do. I'll still be here to provide the script specifics when time comes he has to build this script.

Well I have run into a little trouble. I am using the the 'VCmdEmptyFireStaion' command from the 'LAFireStation' Script as a base for this one as it pretty much has what I wanted to achieve already setup - The manual command which makes the Persons in one VO go over to a second VO.

 

Of course I have got it so they don't remove themselves upon reaching the second VO, however after a bit of brainstorming I still cannot figure out a suitable way of getting them to 'teleport'. Been looking at many scripts that may hold the answer but I cannot find a case where someone has used such a function before. The other alternative of course would be to use the Delete and Replicate method, which I shouldn't think would be too much strain on the game considering the most people you would take down at once is really only about four.

Nobody that I'm aware of have done any "elevator" script, we're going to play with the idea for NY V2 for structures, but as of today it isnt implemented.  Likely we will use the kill/dupe unit w/ traits method because of the limited space within an elevator area there wont be many squeezed in there anyway to cause any load performance wise.  4-5 guys @ a time shouldnt hurt performance I wouldnt think.

 

basically if i were to do this, it'd be a console in/on the elevator area where you click and trigger the script, make sure it checks and only moves 4/5 max at a time, otherwise it may build them outside of where you want them to spawn... Happens on many people's fs startup script because they have too many guys being created at once, not a big deal on the ground since you can just move them to where you want them, big deal on the walkable roof scenario since they can re-create on the roof where it isnt clear to walk.

 

After they are created you can choose to automate moving them out of the elevator area (the vo) to a position or make people manually move them, but I would ensure ppl can't flood the area by making sure that the script runs a check that the VO where the transporting is going to is clear before it lets them use it.

  • Author

basically if i were to do this, it'd be a console in/on the elevator area where you click and trigger the script, make sure it checks and only moves 4/5 max at a time, otherwise it may build them outside of where you want them to spawn.

 

After they are created you can choose to automate moving them out of the elevator area (the vo) to a position or make people manually move them, but I would ensure ppl can't flood the area by making sure that the script runs a check that the VO where the transporting is going to is clear before it lets them use it.

The console would make sense, as well as it checking you aren't overloading the elevator space.

 

Although I can't say it will be the same with all mods, with mine that should not be a problem as the lowest point is in a Car Park for the emergency vehicles which normal pedestrians would not have access to and the top point is an office area for the HEMS teams which I would not add civilians to (Unless, for example, stationary at Computer Desks). Meaning unless the player moves people into the space manually, they shouldn't be able to get up.

 

Another thing to counter this is to perhaps have it check who is a Squad member and only send them up.

Yeah you wanna have a "restriction" on who can use it, otherwise you'd have players sending many units up there, and that could bog it/overload it... Remember the end-users are idiots sometimes and do things never intended or things that make sense.  The more you can idiot-proof a script, the better it'll be.  But if it were a 100% auto thing where they walk into the area and it triggers is what I wanted to avoid, you can and would restrict it to user controlled units only (pretty obvious) but some people have elaborate structures and for ex a paramedic who's supposed to go to the truck may accidentally pathfind through the VO and things like that, doesnt mean they'll transport in any way, but they can obstruct the clearance for the new units to spawn making them spawn outside of where you want them to, thus the reasoning behind checking the VO before executing the transfer.

  • Author

Well after many different attempts and methods I cannot figure out a way around it. Although, after thinking about it, practicality would dictate it would be better for me not to have a room at the top of the hospital, I would have still wanted to complete this. 

 

Nothing I did seemed to even come close, amid various errors I could not work around. I can keep trying but whether or not I get any further is a different matter.

Guest
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.