Scripts / Couple of questions

Author
Message
Zero_HP
7
Years of Service
User Offline
Joined: 31st Mar 2017
Location: Leicester
Posted: 22nd Jul 2017 18:37
Is it possible to have a door script on another entity like a bookcase? So I can use it as a secret sliding bookcase type door.
I tried attaching the default door script to a bookcase entity, and the prompt to 'open the door' comes up, but after pressing E nothing happens. Can anyone help me out with advice? Ideally I'd want the bookcase to open by sliding to the side like the sci fi doors (but as a whole piece, bot in 2 halves).

Also, I'm trying to have a decal triggered by a trigger zone, but once triggered the decal only flashes up for a very brief amount of time (less than a second)...is there any way to get the decal to stay active once triggered?
I'm not a box of avocados, Logan
MrEaKing(YT)
7
Years of Service
User Offline
Joined: 9th Mar 2017
Location: Ontario
Posted: 22nd Jul 2017 22:18
You would need to create a bookcase with an animation to slide to have something like the door.lua. otherwise you will need to write a code for it to slide I would use a var to determine open or closed then use a timer to control the slide. I'll write it when I get home about 7-8hrs from now lol but this should get you started.
Youtube.com/MrEaKing https://www.facebook.com/EugeniusProductions/

ELC - Explore, Learn and Create.

Desktop - HomeBuilt- Win 7 - AMD-FX 8300 Eight Core 3.30 Ghz
12 GB RAM
GeForce GTX 1050 Ti 4GB
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 22nd Jul 2017 22:26
Your first problem is that you misunderstand the function of the script. The door script just plays the animation of the entity(your bookcase has no animation maybe, so there is no movement) I know there was a script anywhere(Smallg maybe) where he moves a entity to the side.

Quote: "Also, I'm trying to have a decal triggered by a trigger zone, but once triggered the decal only flashes up for a very brief amount of time (less than a second)...is there any way to get the decal to stay active once triggered?"

You must show the script you use, otherwise it is hard to say what you did wrong.
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
Zero_HP
7
Years of Service
User Offline
Joined: 31st Mar 2017
Location: Leicester
Posted: 23rd Jul 2017 00:00
@MrEaKing(YT), that would be a massive help, thanks.

@Corno_1, yeah you're right, I had the wrong idea about the script, my bad. Thanks to you and Mr for setting me right.
As for trying to trigger the decal, I'm using a trigger zone and the default plrinzone script. I'm basically trying to replace trigger spawning a character entity with a decal. And like I said the decal blips on the screen briefly, but is then gone again. Whereas if i were to trigger spawn a character or other entity, it will stay on screen
I'm not a box of avocados, Logan
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 23rd Jul 2017 14:43
@ Zero_HP

Quote: "Is it possible to have a door script on another entity like a bookcase? "

If you want the bookcase sliding like a door, you'll neeed animated bookcase, GG has MoveUp, MoveForward and MoveBackward, but does not MoveRight/MoveLeft lua command afaik.

So you has to take a workaround to get it.

Notice in the vid I'm using a cabinet as reference, you has to place something like that on your map, so let¡s say bookcase is the point A and the cabinet is the point B.



Attach this script to the bookcase.


hth

3com












Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Flatlander
GameGuru Master
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 23rd Jul 2017 16:23 Edited at: 23rd Jul 2017 16:26
I purchased scripts by Acid that will allow you to do such a thing about moving any static entity such as a bookcase, cabinet, even a forklift in which I used. This script moves left, right, forward, and backward. Here is the url.

Move Script/23422

I'm sure smallg has something availabe. 3Com is another scripter who definitely can help.
When in doubt -- C4 :heh, heh, heh:

-Jamie Hyneman
Zero_HP
7
Years of Service
User Offline
Joined: 31st Mar 2017
Location: Leicester
Posted: 23rd Jul 2017 17:59
Thanks guys, I appreciate the assist, I'll try those out and see if i can get them working
I'm not a box of avocados, Logan
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 23rd Jul 2017 18:23 Edited at: 23rd Jul 2017 18:24
https://forum.game-guru.com/thread/216730#msg2563082
Been there, done that, got all the T-Shirts!
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 23rd Jul 2017 19:58
if I get chance I will make you a animated bookcase tomorrow with a script bound to a key
Welcome to the real world!
Windows 10 Pro x64 - Core i7-2600K @3.40GHz - 32.0GB RAM - GeForce GTX 950 2GB - 4x500GB SSD Striped
MrEaKing(YT)
7
Years of Service
User Offline
Joined: 9th Mar 2017
Location: Ontario
Posted: 24th Jul 2017 06:36 Edited at: 24th Jul 2017 06:48
Sorry on the delay couldn't find this post was looking for something that said door or bookcase lol I see you've already received some help but this code here you can attach to the bookcase under classic and if you go up to it and press e it'll move 40 units to the right then if you go back to it it will ask if you want to close and it will go back to the starting position. Fully commented to be easily changed or understand what the heck is going on.


hope it helps.
Youtube.com/MrEaKing https://www.facebook.com/EugeniusProductions/

ELC - Explore, Learn and Create.

Desktop - HomeBuilt- Win 7 - AMD-FX 8300 Eight Core 3.30 Ghz
12 GB RAM
GeForce GTX 1050 Ti 4GB
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 24th Jul 2017 16:28 Edited at: 24th Jul 2017 17:43
is this of any use? any good?

UPDATE - Sorry I forgot to mention they will work with keys/keypads too

Welcome to the real world!
Windows 10 Pro x64 - Core i7-2600K @3.40GHz - 32.0GB RAM - GeForce GTX 950 2GB - 4x500GB SSD Striped

Attachments

Login to view attachments
Zero_HP
7
Years of Service
User Offline
Joined: 31st Mar 2017
Location: Leicester
Posted: 24th Jul 2017 22:07
You guys rock, thanks so much for the help. Perfect for what I needed
I'm not a box of avocados, Logan

Login to post a reply

Server time is: 2024-12-23 00:08:34
Your offset time is: 2024-12-23 00:08:34