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 / Help with "Pin door"

Author
Message
SrLanBelmont
14
Years of Service
User Offline
Joined: 18th Jun 2010
Location: N/A
Posted: 19th Jun 2010 05:28
Hey!
Im kinda new to FPSC and im actually working on a zombies game and i was wondering what's wrong with this code: [img]null[/img]
i managed to open the door entering the right combination but when i do the door turns gray and i cant pass trough it.
Hope some1 can help me.
Regards!

-Sr. Lan Belmont

Shadowtroid
15
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 19th Jun 2010 16:15 Edited at: 19th Jun 2010 16:17
Well there's nothing that's opening the door. You have it set on a loop. Try replacing the :state=3,plrusingaction=0:state=10 part with :state=3:incframe=1
:state=3,frameatend:coloff

As for the grayness, try removing all parts that say alttexture.

I'm assuming by the different languages that you didn't make this script?

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 19th Jun 2010 17:17 Edited at: 19th Jun 2010 18:00
Quote: "Well there's nothing that's opening the door."

State=14 opens the door with the activateifused=1 action.

Quote: "Try replacing the :state=3,plrusingaction=0:state=10 part with :state=3:incframe=1
:state=3,frameatend:coloff"

This is the script for the switch, and it looks okay to me at first glance.
You don't want to set collisions for the door in the switch's script.
That would be done in the script being used by the door, which in this case should be doorremote.fpi

Which script are you using for the door?
Can I see that too or is it stock?


Here is the proper way to use the script above...

1) Place a Switch in your map and give it the script above as the AIMAIN

2) Place a Door in your map and give it doorremote.fpi for its AIMAIN

3) Rename the door to a unique name like PinDoor (note I do not like to use spaces and I always stay case sensitive just in case)

4) Put the unique door name (PinDoor) in the IFUSED section of the Switch's properties

I should test this, but as I said, at first glance it appears to me that it should work if set up right.
Besides, I would have to retype the whole thing just to test it, since it is posted as an image.

PS
Please, do not post your code snippet as an image.
That makes it impossible for us to copy/paste and means far less people will be willing to help if they have to retype your entire code.
Take note of the TEXT Buttons right above the smileys that are right above the MESSAGE box that you use to post your responses.
The CODE button will create the tags you need to place you code in a nifty
  that keeps the threads tidy. (click on the code snippet to open it up)
Chance are, your questions will be answered faster if you use the code snippets instead of posting code as an image.

Welcome to the forums.

   Conjured Entertainment

 WARNING: Intense Madness
Shadowtroid
15
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 19th Jun 2010 20:04
Oh, I thought it was the door. He needs to be more specific.

Yeah, if this is a separate entity then CE is spot on.

SrLanBelmont
14
Years of Service
User Offline
Joined: 18th Jun 2010
Location: N/A
Posted: 20th Jun 2010 00:49
Quote: "This is the script for the switch, and it looks okay to me at first glance.
You don't want to set collisions for the door in the switch's script.
That would be done in the script being used by the door, which in this case should be doorremote.fpi"


I tried that too and worked but now the switch becomes gray.


[quote]Please, do not post your code snippet as an image.The CODE button will create the tags you need to place you code in a nifty + Code Snippet

code snippets are cool

they keep the threads tidy, and makes it easier to follow a thread

you can copy/paste you code here, and then others can copy paste lines of reference for editing corrections or enhancements that keeps the threads tidy.[quote]

Thx 4 the advice and for the welcome!


Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 20th Jun 2010 07:31 Edited at: 20th Jun 2010 07:40
Quote: "I tried that too and worked but now the switch becomes gray."

The ALTTEXTURE=X (0,1) are the actions switching the switch's texture.
Maybe the switch you are using doesn't have the ALTTEXTURE defined in the switch's properties, or it can't find the image.
Check the path in the Switch's ALTTEXTURE assignment.

If it still doesn't work then just remove those two actions and it won't change textures.

,altexture=1 from the end of state=14

and

,alttexture=0 from the end of state=2

Note: you want to take those commas off too since these are the last actions in the state.
No sense in leaving a comma at the end of the list of actions in a state, so don't forget to remove the comma too

   Conjured Entertainment

 WARNING: Intense Madness

Login to post a reply

Server time is: 2025-06-01 01:57:50
Your offset time is: 2025-06-01 01:57:50