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 / set order of objectives?

Author
Message
olliday
18
Years of Service
User Offline
Joined: 27th Oct 2006
Location:
Posted: 12th Feb 2007 00:26
Hi, is it posible to set the order of the objectives? In my game i have a character that you have to kill so i set the isObjective to 1 then you have to go to the winzone so i set that to 2. I find that if you go to the winzone first and then kill the character it complets the level soon as the player has killd him. So how could i make it so the last objetive you have to do is go to the winzone?
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 12th Feb 2007 04:51
Moving this to the scripts forum.

Gamz
18
Years of Service
User Offline
Joined: 28th Nov 2005
Location: A bubble!
Posted: 12th Feb 2007 19:00
BUMP I need this answer aswell.

I am a manifestation of your subconscious.
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 13th Feb 2007 21:51
yeah it's possible. Make each objective spawn a key when it's destroyed/collected. then script the next objective to require that key.

(the key itself can be invisible, it isn't a real "key", it's just a placemarker setup to represent that the objective has been completed.)

It takes ALOT of getting your head around, because you have to have IFUSEDs and HASKEYs all over the place, but it's doable. I'll try and rig up a demo for you.

Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 15th Feb 2007 18:52
Quote: "Make each objective spawn a key when it's destroyed/collected. then script the next objective to require that key."


Sounds good but, it's not foolproof. Charecters can't spawn keys as they don't have the "ifused" or "usekey" options.

tyrano man
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location: Battle City - Kalspher :)
Posted: 15th Feb 2007 19:15
you can just do this in their destroy scripts.

Woot Kingdom hearts owns!
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 15th Feb 2007 19:25
Quote: "you can just do this in their destroy scripts."


no, newbie is right, characters cannot run the FPI command "activateifused=1"

there are ways around that though, using near activate, or setting the characters destroy script to pickupkey.fpi and making the character the Key.

Commander in Chief
18
Years of Service
User Offline
Joined: 15th Apr 2006
Location: Carbondale, PA, USA
Posted: 18th Feb 2007 21:03
I'm the 120th viewer! YAY! newbie is right, characters cant run activateifused, but a little bit if scripting could replace that. There are lots of options... a key script for the player sounds really funny. Imagine sticking an NPC into a hole. Rofl.

---PARANOID PRODUCTIONS---
TechNo VaLLey
17
Years of Service
User Offline
Joined: 14th Dec 2006
Location: Egypt
Posted: 4th Jun 2007 23:55
Can anyone post an explanation for this ?

Let's assume the following scenario.

two Items A and B (Entities )

The Player cannot take item B before Item A or

Item B couldn't appear before Item A

How to do this ?

Regards,

Mr. Techno
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 19th Jul 2007 01:31
ok. Item A script:



Item B script:



Item B must have it's "haskey" property (right click in editor) set to the name of item A.

I'm writing the scripts from memory at a friends house. Not bug free. "Plrtake" may not need an "=1" on the end.

I accept what people are saying about the difficulty, but I assure you I did multiple objectives in Meat, that had to be completed in order, and this way will work. The above 2 scripts are heavily simplified. it would actually be more effective to make item A spawn the key, and have the spawned key use the script:

which would mean it's collected straight away.
Using that technique, item A could just be a trigger zone, meaning that the played must reach the trigger before being able to pick up item B

TechNo VaLLey
17
Years of Service
User Offline
Joined: 14th Dec 2006
Location: Egypt
Posted: 25th Jul 2007 16:06
Thanks man ..

I will try to use these lines and check it

Mr. Techno
TechNo VaLLey
17
Years of Service
User Offline
Joined: 14th Dec 2006
Location: Egypt
Posted: 26th Jul 2007 14:19 Edited at: 26th Jul 2007 14:20
I've tried the two past scripts ..

They didn't work

Mr. Techno
olliday
18
Years of Service
User Offline
Joined: 27th Oct 2006
Location:
Posted: 29th Jul 2007 13:04 Edited at: 29th Jul 2007 13:56
Thanks, I will try it

Edit:
it works, but i changed the script to:

Item A


Item B


So is it posibe to change item B into a zone?
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 1st Aug 2007 08:14
I tire of this.

Newbie is dead wrong and so are the rest of you.

the ONLY reason characters can't INTIALLY use the command "activateifused" is because FPSC doesn't give them an IFUSED field, HOWEVER this can EASILY be put into the character.fpe file. (Technically, according to Conjured, it might be possible to say activateifused=name where name is a string... Although it works VERY speratically)

This is the hundred and thirty first time I've said this... write it down please.


And... isn't that the exact same code burried at the beginning of all time?

Its not who you are or what you've done... its WHY you did it and how far you are willing to go.
If you fear speaking for yourself, make use the words of others while discovering your own voice.
TechNo VaLLey
17
Years of Service
User Offline
Joined: 14th Dec 2006
Location: Egypt
Posted: 22nd Oct 2007 23:21
I wonder if Butter fingers or OlliDay can explain in details what they did so that it worked step by step for very beginners

Thanks in advance

Mr. Techno
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Oct 2007 15:40
Quote: "(Technically, according to Conjured, it might be possible to say activateifused=name where name is a string... Although it works VERY speratically)"


Well, unless they changed this specific command to take TWO parameters (one to take in a name, and another to take in a VALUE TO ACTIVATE THE ENTITY WITH), no you cannot do such a thing.

Looking into V1 source, I can tell you that IT (I am not saying for certain the latest version) only accepts a value and activates the entity in the If Used field with that value.

You are correct, though, that you can go into the character's fpe file and give it a specific ifused field entry, but that wouldn't be very dynamic, now would it?


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

(P)suedo code (L)inguist, (Y)ou (Sti)ll (R)eap (E)verything
TechNo VaLLey
17
Years of Service
User Offline
Joined: 14th Dec 2006
Location: Egypt
Posted: 24th Oct 2007 17:19
@Plystire

Thanks for your reply.

@Butter fingers Thanks for your help too ..

I did it .. It works fine now There is a video tutorial on the site that helped me too much.

The video tutorial is name " How to trigger an enemy " but I've applied on items .. However I've discovered a bug don't know why items were kept in memory with no changes when using the same files name after editing but finally .. It was done !!

regarding the example I've posted before about the two items (A) and (B) :
The item (B) appears when item (A) is taken ..
My question now could item (B) appear and i couldn't take it until I take the first item (A)

Mr. Techno
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th Oct 2007 03:04 Edited at: 25th Oct 2007 03:06
Yes, in item B's script, do not allow the player to pick it up unless the "plrhaskey=1" condition is true.

To use that, you'll need to set the "Use Key" property of Item B to the name of Item A. That'll make it so Item A will "act" as a "key" for Item B, but in actuality it isn't really a key, just a way to prevent the picking up of Item B before Item A.

That oughta do it for ya.

But just for clarity, here is the script for "pickup1.fpi"



In the line checking for the players distance from the entity in order to pick up the item, you'll want to add the condition that we talked about. You'll end up with this:



NOTE: The manual says this about the "plrhaskey=X" condition:

Quote: "is true when player has pressed the key denoted by the value X"


Don't listen to that. It's TRUE when the player has obtained the item listed in the entity's "Use Key" field.


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

(P)suedo code (L)inguist, (Y)ou (Sti)ll (R)eap (E)verything

Login to post a reply

Server time is: 2024-11-23 23:37:16
Your offset time is: 2024-11-23 23:37:16