Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Scipt problem for puzzle: Two doors, one open one closed --> remote

Author
Message
rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 1st May 2009 19:30
NO SWITCH
Door 1: Open
Door 2: Closed

SWITCH
Door 1: Closed
Door 2: Open

Already tried to inverse the script:

;Artificial Intelligence Script

;Header

desc = Remote Controlled Door (Open and Close)

;Triggers

:state=0,activated=0:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,activated=1:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=0,setframe=0

;End of Script

Hope someone can help!
TY!

Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd May 2009 02:18
1) Name the doors the same name.

2) Make a new door script. Copy/paste the remote door scriptinto Notepad and reverse the "activated=X" values in this new script. So wherever you see "Activated=1" change it to "activated=0" and where you see "activated=0" change it to "activated=1".

3) Apply this new remote door script to door that you want to start as "open". Give the door that should start out closed the original remote door script.

4) Activate the doors with a 1 to swap their positions, activate them with a 0 to swap them back.


Hope that made enough sense, I'm kinda rushing through posts right now.


The one and only,


rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 2nd May 2009 14:23
Haha Thanks! I'll check it out!

Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25
rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 2nd May 2009 15:02
IT WORKS

Try it out if you need it

;Artificial Intelligence Script

;Header

desc = Remote Controlled Door (Close and open)

;Triggers

:state=0,activated=0:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,activated=1:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=0,setframe=0

;End of Script


Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 2nd May 2009 18:54 Edited at: 2nd May 2009 18:55
...if I'm not mistaken, I believe you'll need to swap the colon and coloff
commands as well, if you want that default open door to remain passable.


rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 2nd May 2009 19:14
Nope, it works fine this way

Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 2nd May 2009 19:40 Edited at: 2nd May 2009 19:41
...okie doak.


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd May 2009 22:59
Indeed, Seth, the script will work without altering the collision commands. This is because by swapping the activation values, the script will jump straight into opening the door the moment the level starts.

For the door the starts out open, the script starts with an activation of 0, making it head into state 1 for playing the open animation and ended up in state 2 with the door open and the collision off, awaiting an activation value of 1.


I'm glad the script is working for you, rakker. I also hope to see this puzzle game when you're done. I'm a rather big fan of puzzle games.


The one and only,


rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 2nd May 2009 23:11
Thats great since puzzels are rather important in my games

Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25

Login to post a reply

Server time is: 2024-11-25 00:46:30
Your offset time is: 2024-11-25 00:46:30