Product Chat / Doors

Author
Message
vrg
10
Years of Service
User Offline
Joined: 27th Aug 2014
Location: Netherlands
Posted: 13th Dec 2015 09:50
I created a key door, when I tried it out, I can open the door with the key but I cannot walk through the open door, it looks like something is blocking the player. Is there a solution of this problem?
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 13th Dec 2015 10:01
What script is the door using? Can you post it or is it the stock script?
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
vrg
10
Years of Service
User Offline
Joined: 27th Aug 2014
Location: Netherlands
Posted: 13th Dec 2015 10:14 Edited at: 13th Dec 2015 10:15
Smallg,
It is the stockscript " doorauto.lua" was the original script, because I wanted to use a keydoor so I changed the script to " door1.lua" and put the key in the properties menu. It is strange with the doorautoscript I can walkthrough but with door1script not. Thanks

Attachments

Login to view attachments
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 13th Dec 2015 12:24
The door1.lua has the CollisionOff(e) commented out that's why you cannot get through.
You can edit it in notepad.
look for this..

if g_Entity[e]['activated'] == 2 then
-- door collision off after 1 second
if GetTimer(e)>1000 then
-- CollisionOff(e)
end

and change it to this..

if g_Entity[e]['activated'] == 2 then
-- door collision off after 1 second
if GetTimer(e)>1000 then
CollisionOff(e)
end

That will fix it. or you could just use door.lua as it is working.
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
vrg
10
Years of Service
User Offline
Joined: 27th Aug 2014
Location: Netherlands
Posted: 13th Dec 2015 12:47
Thanks for help, I am going to try it out.
vrg
10
Years of Service
User Offline
Joined: 27th Aug 2014
Location: Netherlands
Posted: 13th Dec 2015 13:27
Thanks, it is working , what I saw in the script the door will automatic close after 10 seconds, but this script don't work.
Is that correct or do I have to change the script?

-- door is open
if GetTimer(e)>10000 then
CollisionOff(e)
SetAnimation(1)
PlayAnimation(e)
g_Entity[e]['animating'] = 1
SetActivated(e,1)
PlaySound(e,1)
CollisionOn(e)
door_pressed = 1
end

Login to post a reply

Server time is: 2024-11-25 07:26:09
Your offset time is: 2024-11-25 07:26:09