密室逃脱模拟器

密室逃脱模拟器

Thoroniul's LUA Tutorial
24 条留言
Thoroniul  [作者] 5 月 26 日 下午 5:39 
@Cpt. flint. Yes, this is possible. If you notice the eye, it always points at the object the viewer is looking at. There is also api.getMainPlayer(), api.getLocalPlayer(), api.getClosestPlayer(Vec3 pos) , Transform[] getAllPlayers(). To get access to different player situations.

https://docs.escapesimulator.com/docs/room-editor/lua-scripting

It is best to join the Pine discord channel for questions pertaining to lua. https://discord.com/channels/449578254433517578/974985136221335583
Captain Flint 5 月 26 日 下午 4:40 
This stuff is next level! Thank you!! I'm not sure if this is covered in the tutorial map, but is it possible to make a moving object track towards a player? I see player tracking is possible, But let's say I had an object that I wanted to move towards the player whatever direction the player is going. Any advice on where to start? Thank you!!
Ph0rx 2024 年 5 月 2 日 上午 5:04 
What happened to the "Rough Video" that was attached to this. I remember seeing some rotation code in there that I can't find anywhere else.
donnabeane57 2024 年 4 月 17 日 上午 4:38 
Thank you! This definitely gets me started!
Thoroniul  [作者] 2024 年 4 月 16 日 下午 6:21 
To copy just download the room into your own editor, and open the files in ugc.

For more information on lua, you could take a look at the wiki https://docs.escapesimulator.com/docs/room-editor/lua-scripting
donnabeane57 2024 年 4 月 16 日 上午 7:16 
Could you give me more information on copying? Where is the "workshop option"? if that means the workshop page where I edit my room, the only button there is <CREATE>. I noticed a sign somewhere in the tutorial that indicate I would need some prior knowledge. Could you tell me where to find what I will need to know? All I know about .lua is that it exists and seems to govern movement. I just published my first room. I want to do more and I know this will greatly increase my options for creating more interesting environments as well as possibly more creative puzzles. Please don't dismiss me on the grounds of my lack of knowledge. I am rather intuitive with code and have taught myself quite a bit simply by seeing examples of code and what they do, so I can learn this.
Lycos 2023 年 2 月 25 日 上午 11:14 
O my god, this i dident know. Thank you so much!
Thoroniul  [作者] 2023 年 2 月 24 日 下午 4:22 
In the top right corner of the workshop option there is a copy button. This copies the map folder into your own editor UGC enabling one to open the map in their own editor environment. One can open the map file and find the various .lua files.
Lycos 2023 年 2 月 24 日 下午 12:43 
Sorry, i have no idea what you mean with copy the map. I have downloaded it, but there is no folder to find for me.
Thoroniul  [作者] 2023 年 2 月 24 日 上午 10:46 
One can copy the map and search in the folder and just read the code directly.
Lycos 2023 年 2 月 24 日 上午 5:26 
Can you please give me the code for this function?
Lycos 2023 年 2 月 24 日 上午 5:25 
Yes, that’s what i mean.
Thoroniul  [作者] 2023 年 2 月 23 日 下午 4:29 
There is the eyeball on the ceiling that does this.
Lycos 2023 年 2 月 22 日 上午 11:12 
Yes, I mean an object that always looks at the closest player. Like a camera following the player.
Thoroniul  [作者] 2023 年 2 月 22 日 上午 10:45 
I wonder what specifically you mean by "from the rotation". Do you mean tracking a players rotation?
Lycos 2023 年 2 月 21 日 上午 4:25 
Hello, can you please give me a code example for an object that follows the next player from the rotation? So the way you solved it with the camera.
Thoroniul  [作者] 2022 年 10 月 9 日 上午 7:58 
I have already fixed the activator, forgot to post it here.
Thoroniul  [作者] 2022 年 9 月 22 日 下午 7:31 
I'm aware that some examples stop working because activators calls with lua have changed.

I will attempt to have free time and fix it later, and merge my display logic lua map with this one.

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2844437720
Thoroniul  [作者] 2022 年 6 月 28 日 上午 7:23 
<3
Zesty Mordant 2022 年 6 月 20 日 下午 3:07 
Awesome reference!
Thoroniul  [作者] 2022 年 6 月 14 日 上午 10:00 
If you have any questions feel free to ask here in a thread, or on the discord.
Tarmo 2022 年 6 月 14 日 上午 2:48 
Thank you for making this, I was looking for something like this.
Thoroniul  [作者] 2022 年 6 月 12 日 下午 3:55 
Glad it was helpful to you.
namo_krub 2022 年 6 月 12 日 上午 10:17 
Thank you so much!! very useful for learning lua-script