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 / Three switches and a key to open a door

Author
Message
OurHaus Industries
16
Years of Service
User Offline
Joined: 14th Jul 2008
Location: Inside your desktop
Posted: 28th Aug 2008 00:36 Edited at: 19th Sep 2008 04:05
Hey guys! It's been awhile since I posted here and things have been really crazy lately. But, as the dust settles, my team and I have been working on a new political, modern style game for you guys! Bullets will be flyn' for this one!! A showcase thread coming soon...

I have one question. In a level, you as the player must open a door by turning on three switches in a certain order, and by finding a key. How do you script this? I have the model part down, but I need some help on how to make it happen. I don't expect you to write me one...but if you want to...I have no objections. I don't even care if you include the key part of it, if you just tell me how to script the 3 switches, that's fine too! Or, you could teach me to how to script one switch turning on all three switches. That's fine as well!

I am currently running my programmer around ragged, and he is requesting some help. He is 1990Mike on the forums here by the way. So, whoever can write me scripts on request, will receive the final game 3 weeks before I release it to the public. Plus, you will have complete access to all media (this includes music, models, scripts, etc.) contained in the game that aren't subject to restrictions or any kind of copyright. And you will receive the one and only strategy guide by me explaining step by step how to beat the game. You will also me mentioned in the credits titled as "Volunteer Programmer" (to not conflict with team requests) along with any url you choose to include by your name, or any company advertising sign. This prize will also be offered to any voice actors which I will soon be in need of.

Email me as seandarcy@rocketmail.com if your are interested in this position.

Thanks a bunch guys! Hope to be hearing from you soon.

The Empire and The Allies - Showcase
Release: next year
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Aug 2008 02:30
Interesting way to post a team request, but ...

To have three switches activate a door: (In any order)
1) Have each switch activated the door with a number
2) when that door detects that it's been activated, have it increase a variable (You can use "state" if you don't have the latest updates and figure a way around using it to open the door)
3) Once that variable reaches "3", have the door check for the key
4) If the player has the key, then open the door


To have three switches activate a door: (In a specific order)
1) Have each switch activate the door with different activation values. (Switch 1 will activate the door with a value of "1", Switch with a value of "2", etc)
2) When the door is activated with the correct value, it increases a variable (Again, use "state" if necessary)
3) If the door is activated with the WRONG value, then reset the variable to 0
4) Once the variable reaches "3", then check for the key
5) If the player has the key, open the door


It's not a hard concept to grasp. But variables would make this much easier to script.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
OurHaus Industries
16
Years of Service
User Offline
Joined: 14th Jul 2008
Location: Inside your desktop
Posted: 28th Aug 2008 03:34 Edited at: 28th Aug 2008 03:35
This isn't a team request. The person would be a volunteer for the duration of the project. I wouldn't hire and pay the guy like I do Mike and the rest of my group.

So, you're saying I need to set up a variable situation. Nice...I'll work on it. Thanks. I may come back for more assistance. You're pretty good at this from what I've heard.

Question: What's the difference between a global variable, and a regular variable?
1990Mike
16
Years of Service
User Offline
Joined: 14th Jul 2008
Location:
Posted: 28th Aug 2008 03:36
It was actually my idea.

Neither a lofty degree of intelligence nor imagination nor both together go to the making of genius. Love, love, love, that is the soul of genius - Wolfgang Amadeus Mozart
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Aug 2008 19:17
@1990Mike:

What was your idea? The thread, the script, the situation?


@OurHaus:

Global Variable
A variable available to all scripts. When the variable is set to a value, all scripts can access that value and change it.

Local Variable
A variable available only to the script that set it. Setting local variable 1 in a script will not alter the local variable 1 in other scripts. Each script has it's own set of local variables to use.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
1990Mike
16
Years of Service
User Offline
Joined: 14th Jul 2008
Location:
Posted: 28th Aug 2008 22:29
The idea for the thread.

I thought of using the whole "if used" category in the switches properties.

Neither a lofty degree of intelligence nor imagination nor both together go to the making of genius. Love, love, love, that is the soul of genius - Wolfgang Amadeus Mozart
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Aug 2008 00:14
Well that would be how the switches activate the door with their values. Give them the door's name int he if used field and tell them to "activateifused".


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Frankie Pawnage5
16
Years of Service
User Offline
Joined: 14th May 2008
Location: squidwards nose
Posted: 29th Aug 2008 00:47
ply, check your e-mail

dude if you really want a turkey sandwich, then make one, and make ham.sdaF?
1990Mike
16
Years of Service
User Offline
Joined: 14th Jul 2008
Location:
Posted: 31st Aug 2008 16:38
Okay.

Neither a lofty degree of intelligence nor imagination nor both together go to the making of genius. Love, love, love, that is the soul of genius - Wolfgang Amadeus Mozart

Login to post a reply

Server time is: 2024-11-24 14:11:08
Your offset time is: 2024-11-24 14:11:08