After I finish my game ( I am very happy)
I create something for the community again
I hope you can enjoy it. It is a quick time door script and it needs
1.19 minimum. All is explained in the script too, so I should not waste my time and present it easily.
Place the script in the main of a door and test it.
;Artificial Intelligence Script
;Header
desc = Qick time event, open door
;Triggers
;licence:
;this script is made by Corno_1
;you can use it for commercial and non commercial use, but the licence must be unmodified
;Do not say this is your script
;credit is not required, but would be great
;to use this
;you need Fps Creator 1.19 minimum, because it use the camshake command
;if you remove the camshake command, you can use it in Fps Creator 1.16 and above
;place this as the mainscript of a door
;if you not want that F is the key to open the door, change it with the right keycode. For example:
;F : 33
;E : 18
;Enter : 28
;for more keycodes: http://i14.tinypic.com/4ujvxy0.jpg
:state=0,plrdistfurther=61:fpgcrawtextoff
:state=0,plrdistwithin=60:fpgcrawtextsize=25,fpgcrawtextfont=verdana,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=70
:state=0,plrdistwithin=60:fpgcrawtext=Press F several time to open door
:state=0,plrdistwithin=60,keypressed=33 1:plrdisable=1000000,state=1
:state=1:fpgcrawtext=Press F
:state=1,keypressed=33 1:camshake=10,state=2
:state=2,keypressed=33 0:state=3
:state=3:fpgcrawtext=Press F
:state=3,keypressed=33 1:camshake=10,state=4
:state=4,keypressed=33 0:state=5
:state=5:fpgcrawtext=Press F
:state=5,keypressed=33 1:camshake=10,state=6
:state=6,keypressed=33 0:state=7
:state=7:fpgcrawtext=Press F
:state=7,keypressed=33 1:camshake=10,state=8
:state=8,keypressed=33 0:state=9
:state=9:fpgcrawtext=Press F
:state=9,keypressed=33 1:camshake=10,state=10
:state=10,keypressed=33 0:state=11
:state=11:fpgcrawtext=Press F
:state=11,keypressed=33 1:camshake=10,state=12
:state=12,keypressed=33 0:state=13
:state=13:fpgcrawtext=Press F
:state=13,keypressed=33 1:camshake=10,state=14
:state=14,keypressed=33 0:state=15
:state=15:fpgcrawtext=Press F
:state=15,keypressed=33 1:camshake=10,state=16
:state=16,keypressed=33 0:state=17
:state=17:fpgcrawtext=Press F
:state=17,keypressed=33 1:camshake=10,state=18
:state=18,keypressed=33 0:state=19
:state=19:fpgcrawtext=Press F
:state=19,keypressed=33 1:camshake=10,state=20
:state=20,keypressed=33 0:state=21
:state=21:fpgcrawtext=Press F
:state=21,keypressed=33 1:camshake=10,state=22
:state=22,keypressed=33 0:state=23
:state=23:fpgcrawtext=Press F
:state=23,keypressed=33 1:camshake=10,state=24
:state=24,keypressed=33 0:state=25
:state=25:fpgcrawtext=Press F
:state=25,keypressed=33 1:camshake=10,state=26
:state=26,keypressed=33 0:state=27
:state=27:fpgcrawtext=Press F
:state=27,keypressed=33 1:camshake=10,state=28
:state=28,keypressed=33 0:state=29
:state=29:fpgcrawtext=Press F
:state=29,keypressed=33 1:camshake=10,state=30
:state=30,keypressed=33 0:state=31
:state=31:fpgcrawtext=Press F
:state=31,keypressed=33 1:camshake=10,state=32
:state=32,keypressed=33 0:state=33
:state=33:incframe=0
:state=33,frameatend=0:state=34,coloff
:state=34:fpgcrawtext=Yes! The door is open
:state=34,etimergreater=2000:plrdisable=0,state=37
;additional
;open door with usekey
;to use the use key to open door:
;remove the ; from the lines under this and place them by the state under "open door with f"
;:state=35,plrdistwithin=60:fpgcrawtextsize=25,fpgcrawtextfont=verdana,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=70
;:state=35,plrdistwithin=60:fpgcrawtext=Open door with 'use' action
;:state=35,plrdistwithin=60,plrusingaction=1:state=36,setframe=0,sound=$0
;:state=36:incframe=0
;:state=36,frameatend=0:state=37,coloff
;:state=37,plrdistwithin=60:fpgcrawtextsize=25,fpgcrawtextfont=verdana,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=70
;:state=37,plrdistwithin=60:fpgcrawtext=Close door with 'use' action
;:state=37,plrdistwithin=60,plrusingaction=1:state=38,sound=$1,colon
;:state=38:decframe=0
;:state=38,frameatstart=0:state=35,setframe=0
;additional
;open door with f
;remove the ; from the lines under this and place them by the state under "open door with usekey"
:state=35,plrdistwithin=60:fpgcrawtextsize=25,fpgcrawtextfont=verdana,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=70
:state=35,plrdistwithin=60:fpgcrawtext=Open door with 'F'
:state=35,plrdistwithin=60,keypressed=33 1:state=36,setframe=0,sound=$0
:state=35,plrdistfurther=61:fpgcrawtextoff
:state=36:incframe=0
:state=36,frameatend=0:state=37,coloff
:state=37,plrdistwithin=60:fpgcrawtextsize=25,fpgcrawtextfont=verdana,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=70
:state=37,plrdistwithin=60:fpgcrawtext=Close door with 'F'
:state=37,plrdistwithin=60,keypressed=33 1:state=38,sound=$1,colon
:state=37,plrdistfurther=61:fpgcrawtextoff
:state=38:decframe=0
:state=38,frameatstart=0:state=35,setframe=0
;End of Script
Comments are like always appreciated
Corno_1