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 me please!

Author
Message
bubazar
17
Years of Service
User Offline
Joined: 6th Nov 2007
Location:
Posted: 6th Nov 2007 15:11
Wai hallo ther. I need a little help with my game "AWAKEN".
I need help to make a script when you walk into a room. The lights turn off and turn on and off again and when it's on again it comes a characther.

Thank you.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 6th Nov 2007 22:48
Use the THREAD SUBJECT SEARCH box at the bottom of this page.

The reason nobody is responding is because this has been answered before.

Search "lights" or "switches" or something similar and you should find an answer.

Also read the MANUAL which is a PDF file located in the DOCS folder in FPSC.
It can answer a lot of basic questions for you too.

Welcome to the forums!

Don't forget to visit Conjured Entertainment

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Nov 2007 00:10
Hmmmm, and here I thought no body was answering because no body quite understood what it is he is asking for.

Sure, searching the forums might help him solve the lights turning on and off but what about:

Quote: "when it's on again it comes a characther."


That doesn't sound like something that has been answered before.

bubazar, could try to explain a little better what you are wanting to happen here? Do you want a character to appear when the light finally comes on for the last time? (Cuz, if presented just right, that WOULD look pretty cool)


The one and only,
~PlystirE~

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 7th Nov 2007 10:14 Edited at: 7th Nov 2007 10:35
Quote: "Hmmmm, and here I thought no body was answering because no body quite understood what it is he is asking for"

I think I know what he is asking...
He wants a character to spawn if the light is turned off then back on.


Quote: "That doesn't sound like something that has been answered before.

bubazar, could try to explain a little better what you are wanting to happen here? "

So, you don't know what he is asking for but it sounds like it hasn't been answered before.
OOOOOOOk

Ok don't search, but I am pretty sure that spawning characters and scripting lights have both been covered before.

But I could tell him how, then you can write the script for him, then he won't have to search.

Place the character in the editor.
Right click him, then...
Change his Name to something unique and...
Set his SPAWN AT START to NO and...
Set his MAXIMUM SPAWN to 1.
Now, place your light and a switch in the editor.
Put the Name of the character into the IFUSED field of your switch.
Now, you need to have a script for your switch that has a...
plrusingaction=1:activateifused=1
at the point in the script that the light comes back on.
You can name the light the same as the character and the switch will activate them both.
Once activated, the character will spawn and the light will come back on.
The switch will activateifused=0 when the light goes off, but the character won't spawn until the activateifused=1 is called, which will be the same call that turns the light back on.
This of course would also require the light to be on at the start.

I was kidding about writing the script...
You could use the good old SWITCH.FPI as long as you make a simple change.
It has the activatefused=1 before the activateifused=0
Reverse that order since we will be turning the light off then on, not on then off.
You need to edit your light's script too snice it turns lights on when activated=0, and turn off when activated=1 ( reverse that too / 0=off and 1=on )
You could leave both scripts alone, but then he would spawn when the light goes out, not when it goes back on.

Have Fun

Feel Free to correct anything that I left out or overlooked Plystire, but I'm pretty sure this will work.

Here is a final suggestion for our new user friend...
Try to title your threads so that future searches by other people would return the thread as a result of a search.
No one will ever find this thread if they search for lights,switches, or spawns because of its "Help Me Please!" title.
That is another reason that I wanted him to search rather than posting the answer here.

Don't forget to visit Conjured Entertainment

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Nov 2007 11:03
Well, he COULD reverse the activation values in the light1.fpi script, OR he could just use light1off.fpi which already has them swapped.

And I think just using that script will solve the reversing anything problem. If no body HAS that script, then I evidently made that myself a long time ago and forgot about it, lol. In which case he should go and reverse the activation values of the light script.

I'm still not quite grasping what exactly he's looking for, though. It initially sounded like he was looking for a light flicker that would spawn an enemy after the light flickered for the second time... or maybe I am just overthinking this.


The one and only,
~PlystirE~

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 7th Nov 2007 11:53 Edited at: 7th Nov 2007 12:34
Light off
Light on
Light off

(Light on = spawn) That happens on second user action.

That's how I am reading his request, but maybe I'm wrong.
You know, now that I re-read his request...it doesn't even involve a switch but happens on entry into the room.

How did I overlook that?

So he'll need a triggerzone with a timer that does it all in order.

Light off
Light on + spawn
Light off

That is a kewl effect because you will only get a glimps of him then you can't see nothing when he starts shooting.
Nice

Place a TriggerZone and size it to your room. (place it then hold shift then left click the triggerzone and drag)
Put the Name of the light and character (should be the same) in the IFUSED of the TriggerZone.
Use this script for the TriggerZone's AIMAIN...


I didn't test it but I will and modify if its not right.

Don't forget to visit Conjured Entertainment

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Nov 2007 12:09
Really?

Cuz from this:
Quote: "The lights turn off and turn on and off again and when it's on again it comes a characther."


I got the impression that it was

light off
light on
light off
light on + spawn

But you're right about the triggerzone. He DID say "when you walk into a room". I missed that one as well... now it REALLY sounds like he wants a flickering light effect, doesn't it?

You know, to people reading this, I bet we sound really silly talking about this. Lol


The one and only,
~PlystirE~

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 7th Nov 2007 12:11 Edited at: 7th Nov 2007 17:20
Quote: "I bet we sound really silly talking about this. Lol "

What is really silly is me working on this instead of sleeping.
yeah you were right about the lightoff thing (I overlooked that), but it starts out as off.
I wasn't even thinking about the characters being seen even if the light is off.

Good night...er, morning.

Yu know I was sleepy last night, because why did I reset the timer??

This ...

...is better.

Don't forget to visit Conjured Entertainment

Login to post a reply

Server time is: 2024-11-24 01:41:39
Your offset time is: 2024-11-24 01:41:39