Author Topic: VCE chat based teleport?  (Read 1049 times)

My last S&R request was a modified question. But here's the new one I have. I was trying to keep my posts to a minimum. But here is the question.
Quote
Heyo!

Is it possible to use VCE to make a command based fast-travel? like if a player says 'pipmap' they are teleported to a Brick-made map of a place?



Those that do stuff like "lolol you don't know this?  Thanks[x20 or something]" will most definitely be reported. Unless it's simply a joke by the user. If So, just make sure it's known as a joke so I, or others don't report you by accident. I just need the helpful stuff.

Anyhow, thanks for the help when you reply people!

http://forum.blockland.us/index.php?topic=202440.75  combined with setplayertransform will get you your desired result.

I'm sorry, but I can't seem to figure out how to use this.

I'm sorry, but I can't seem to figure out how to use this.

It can be quite confusing when starting out with it, but is very helpful.

as it says at the bottom of the OP, the format is as such: /ec [Command] [Parameter] [Parameter] [Parameter] [Parameter] [Parameter]

Here, the "ec" is a host-settable word so the system knows that you are typing a CMD-events slash-command.  I think that it is set to "eventcmd" by default, but you can change it in RTB settings if you want.  Whenever I use this, I just go with the letter "C" so I don't have to type a lot.

For an example, I used this for banks.  This is what I used for a CMD event entry IIRC: /C Withdraw 500

As you can see, I have the "C" I mentioned before, then the [Command] is "Withdraw" and the first [Parameter] is 500.   "OnCmd" gets triggered whenever a player uses a slash command within the distance specified.  Use the output event "Ifcmd" to check what the user used for the [Command] place, which this case was "withdraw".  The range at the end of the output event IfCMD specifies the event line range.  When I am within distance of the brick that contains events that can be triggered by this slash command (distance can be manipulated via events), Ifcmd gets triggered and my client variable <var:cl:ceparam1> is set to "500".  You can now use VCE to do stuff with this value, such as what I did by subtracting that amount from their bank account (at the time a client variable) and adding it to their held money (a player variable).

I probably didn't explain that very well, but this is a very helpful event system.

Could I just have a simple rundown so I can figure out how to make a simple command based teleport.

Like when I say /PipBoy map. I want to be able to teleport to a built map of a built to 'Fast-Travel'
(since I changed it to PipBoy)

So if you are going to be using the commands exclusively for the pipboy, then you can make "pipboy" the first word for the cmd events, and thus some things below need to be changed.  What is in the first example is assuming you follow the format: "/cmd pipboy map", where "cmd" is your starting word.  The second example is a simpler version that would probably match more to how Fallout handles it.  The third example assumes that "pipboy" is your starting word, as you have shown in your request: "/pipboy map"

Example 1:
Code: [Select]
[0] [x] [0] [OnCmd] [Self] [IfCmd] [Pipboy] [Unrestricted] [] [1 1]
[1] [x] [0] [OnCmdCalled] [Self] [VCE_IfValue] [<var:cl:ceparam1>] [==] [map] [2 2]
[2] [x] [0] [OnVariableTrue] [Self] [VCE_IfValue] [<var:cl:ceparam2>] [==] [] [3 4]
[3] [x] [0] [OnVariableTrue] [NamedBrick] [Map] [SetPlayerTransform] [] []
[4] [x] [0] [OnVariableFalse] [Self] [VCE_IfValue] [<var:cl:ceparam2>] [==] [place1] [5 5]
[5] [x] [0] [OnVariableTrue] [NamedBrick] [Place1] [SetPlayerTransform] [] []

When you say "/cmd pipboy map", this event gets triggered.  If you only say map, and nothing after map, then the player is tele'd to the map.  For faster teleporting, the player could instead type "/cmd pipboy map place1", and the player can be tele'd directly to the place they want to go instead of going to the map.  If you don't want this extra feature, then just go with this:

Example 2:
Code: [Select]
[0] [x] [0] [OnCmd] [Self] [IfCmd] [Pipboy] [Unrestricted] [] [1 1]
[1] [x] [0] [OnCmdCalled] [Self] [VCE_IfValue] [<var:cl:ceparam1>] [==] [map] [2 2]
[2] [x] [0] [OnVariableTrue] [NamedBrick] [Map] [SetPlayerTransform] [] []

Because the IfCmd in line 0 is unrestricted, you can put this event system on any brick anywhere and the player can use the command successfully.  The "map" parameter option links the user to a brick named "map" in the brick map you make.

Example 3:
Code: [Select]
[0] [x] [0] [OnCmd] [Self] [IfCmd] [Map] [Unrestricted] [] [1 1]
[1] [x] [0] [OnCmdCalled] [NamedBrick] [Map] [SetPlayerTransform] [] []

Again, this example assumes that you are using the form "/pipboy map"
« Last Edit: June 09, 2015, 03:09:35 AM by Gen. Hothauser »

I've tried this in Bl already under singleplayer, it doesn't appear to work in the slightest.

I've tried this in Bl already under singleplayer, it doesn't appear to work in the slightest.

You did something wrong.  I copied exactly what I did in the third example and it worked fine.  A few key points to make sure you get are that you use a space, not a dash, between numbers in the range field, you used OnCmd and OnCmdCalled on their respective lines, and that you change the command function name (the first word you type after the "/") to pipboy (because that is the format that the third example uses).

This is assuming that you went with the simplest example and that you are referring to the third example when you said you "tried this".

[edit]

I did just notice in my third example that I put the range field for the ifcmd output in line 0 right next to the restrictions dropdown field where there should have also been a restrictions definition field.  Maybe my typo was what caused your issue, but I have fixed it now.
« Last Edit: June 09, 2015, 03:09:20 AM by Gen. Hothauser »