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 / door locked entity destoryed door unlocked?

Author
Message
SamHH
17
Years of Service
User Offline
Joined: 9th Dec 2006
Location: Vermont
Posted: 30th Sep 2007 21:30
Would it be possible to have a door be locked up to the point when an entity is destroyed and then the door is unlocked?
Thank you


Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 30th Sep 2007 21:44
...should be possible. I'm away from my computer, but I'll see if I can edit a script to do this.

Thanks,

Seth Black


Own It, Or Get Owned...
SamHH
17
Years of Service
User Offline
Joined: 9th Dec 2006
Location: Vermont
Posted: 30th Sep 2007 21:44
Thank you.


Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 30th Sep 2007 22:03
...you're welcome. I should have something by tomorrow.


Own It, Or Get Owned...
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Oct 2007 04:56 Edited at: 5th Oct 2007 04:57
Try this out:



Save that .fpi script in your scriptbank, and use it as the "Main" ai for your door.

Now, you'll need to alter the entity's fpe file (the entity you want to unlock the door when it dies), which will be located in the entitybank folder. So, for the sake of getting your entity back, make a copy of their .fpe file and add "_original" to the end of the copy's name. Now edit the one that hasn't changed in name, and add this line to their ai section:



Now when you put the entity down, go into it's properties menu and change their "Destroy" ai script to "destroy/destroyandactivate.fpi"

Now, when you destroy the entity, the door becomes and autodoor. Or, that's the theory, at least. Lol

Try it out and let me know if you got it to work. I haven't tested it, but the scripting sounds like it outta work.


The one and only,
~PlystirE~

In Soviet Russia, road forks you!

Mom: I may not be the alpha and omega, but I can sure as hell be yours!
SamHH
17
Years of Service
User Offline
Joined: 9th Dec 2006
Location: Vermont
Posted: 5th Oct 2007 15:15
Ok thanks I'll will try that.


Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 5th Oct 2007 22:43
i want to game,

I'm sorry for the delay in getting back to you on this. I had more pressing things to tend to this week.

Did Plystire's solution work for you?

Thanks,

Seth Black


Own It, Or Get Owned...
SamHH
17
Years of Service
User Offline
Joined: 9th Dec 2006
Location: Vermont
Posted: 5th Oct 2007 22:54
Haven't tried it yet, but I will update when i do.


SamHH
17
Years of Service
User Offline
Joined: 9th Dec 2006
Location: Vermont
Posted: 6th Oct 2007 07:56
*********UPDATE***********
Script works fine, thank you for the help.


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 6th Oct 2007 08:17
Wow, that must be the very first piece of code I've ever written that worked without having to test it.

Glad I could help the competition a little bit.


The one and only,
~PlystirE~

In Soviet Russia, road forks you!

Mom: I may not be the alpha and omega, but I can sure as hell be yours!
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 6th Oct 2007 20:43
Great, this is just what I've been looking for my game I'm making. Thanks Plystire...


Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 6th Oct 2007 23:41
...nice one, Plystire!


Own It, Or Get Owned...
Orrion Carn
17
Years of Service
User Offline
Joined: 23rd Jul 2007
Location: Sandpoint, Idaho
Posted: 7th Oct 2007 03:56
I have a question... A switch is an entity... Could I remove the switch script and use the Default.fpi script... And make that the object you destroy to get the door open???


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Oct 2007 08:37
Quote: "Could I remove the switch script and use the Default.fpi script... And make that the object you destroy to get the door open???"


Actually a switch would work even better than a person!! As you won't need to go into the switch's FPE file to put in the "ifused =" part. You can just put the name of the door into the switch's "IfUsed" property in the property window! Just make sure you have the switch destroyable by changing it's "Strength" value to something other than 0.

@All:
You're most welcome. I'm glad I was able to help everyone.


The one and only,
~PlystirE~

In Soviet Russia, road forks you!

<img src="http://www.danasoft.com/sig/PlystiresRoadSign.jpg" border="0">

Login to post a reply

Server time is: 2024-11-23 23:02:23
Your offset time is: 2024-11-23 23:02:23