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 / pickup item problem :( (a little urgent!)

Author
Message
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 11th Nov 2006 01:28
I had this problem last month and it never got addressed :
http://forum.thegamecreators.com/?m=forum_view&t=89998&b=28

And I forgot all about it till now.
My RPG has to have me pick up 2 items to complete the level.
And I just cant pickup anything using the pickup script

I am posting the contents of the pickupkey.fpi just in case. I dont remember ever changing it, but if anyone here finds it modified, please do post the default script for me.



In case this is the same script everyone uses, please help me here. I have tried doing a lot of things, but I cant pick up

-filya

-- n00b at playing games...and now at making em too :p --
Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 11th Nov 2006 02:32 Edited at: 11th Nov 2006 02:33
your problem is the distance!
Try this code it will work...




Nue B. or not Nue B. That is the question.
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 11th Nov 2006 08:40
So other than the distance change, I didnt see any other thing. Will test it out and let you know.

Hope this works!

Thanks a lot for this.

-filya

p.s: funny thing is I dont remember making that change though...

-- n00b at playing games...and now at making em too :p --
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 11th Nov 2006 23:45
NueB! It worked!
thank you so much for this

btw, just curious as to why it wont work with a distance of 10? After all, I cud stand over it or push it with my feet without 'picking' it up. And I am sure those distance were less than 10.

Maybe its just FPSC acting wierd again

-- n00b at playing games...and now at making em too :p --
Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 12th Nov 2006 23:52
You're very welcome!

Have you ever set the radius of a light entity to 10? if you do, you'll see the little circle doesn’t cover much. it's the same way with other entities. I don't think the Plr can actually fit into a space so tight. or at least FPSC doesn't let you.

Nue B. or not Nue B. That is the question.
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 13th Nov 2006 04:48
hmmm...maybe. Thanks a lot though! I can actually make an entry this time thanks to your reply

-- n00b at playing games...and now at making em too :p --
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 5th Mar 2007 15:40
@ filya

Quote: "My RPG has to have me pick up 2 items to complete the level. "


OK, now I have a question (that I've had for sometime now). How do you know if the player actually picked up those two items when it comes time to go to the next level? That's one thing I haven't figured out yet. I've been trying to work with the two AI automated features "User Key" and "If Used" but to no avail regarding whether or not entities other than keys and doors have been used or required. Nobody has been willing to point me in the right direction.

As opposed to Highlander.
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 5th Mar 2007 22:24
Try this, level ends as soon as you pick up both objects

1. Make the 2 objects objectives.
2. Number them objective 1 and objective 2, so you will have to pick up both objects to win the level.

Just thinking without any reference right now, so let me know if it works.

-- game dev is fun...but taking up too much time --
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 7th Mar 2007 14:00 Edited at: 7th Mar 2007 14:01
Thanks filya. I will.

I'm still trying to figure out this scripting language, which really isn't a language. I have over 30 years experience in several languages and that in itself is the problem I believe. I can no longer use procedural logic of my past and have to learn a strange new way of using conditions and actions. It doesn't help that the explanations of the conditions and actions are not as straight forward as some try to make a person believe. Sorry for the venting. I really had hoped that the learning curve was not so steep for me. It was easier for me to learn assembler. At least I had a good text book and professor I could go to.

As opposed to Highlander.
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 7th Mar 2007 15:52
If you have 30 years of experience with several languanges, learning a scripting language which uses just 'if-then' statements should be a piece of cake all ready to eat

-- game dev is fun...but taking up too much time --
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 7th Mar 2007 18:33
Not necessarily. I gave an example to some of my frustrations with this in another thread. The programming logic of if-then and loops are easy. It is some of the conditions and actions that are cryptic. Such as ACTIVATEIFUSED=X (not shouting). The description is "activate entity described in ifused property." Firstly, what is the meaning of the X? What values would a person give to X? or can you? Is the value the entity name? I have seen $0 in some scripts. What does this mean? I have also seen $1, again what does this mean? I am sure they are variable holders but to which variables? Where do they get the initial data?

Then there is ACTIVATE=X "activate this entity using the value X. What entity? Again what kind of value do we give X? and on and on and on. I am sure I could modify the engine a lot faster than learning the ins and outs of these conditions and actions.

I am just full of questions that just can't seem to be answered by any tutorial I've seen.

BTW, I agree, game dev is fun. I'm just glad I now have all the time in the world. Unless I drop dead in the next minute or two.

As opposed to Highlander.
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 7th Mar 2007 19:03
ya...this part I agree to. FPSC and using it is not very well described anywhere. Manual is a good place to start, but does not cover everything at all.

Thats the reason there are people like Butters, Loc who are admired for their own R&D work on FPSC You have no option but to work on a 'trial & error' basis.

For the commands you mentioned, you need to first name a dynamic entity (say you name a dynamic crate as 'crate1' in the properties)
Now for some other entity's properties, you can put 'crate1' (without the quotes) in the IFUSED field.

So when you use the 'activateifused=1', the crate is activated (the main scripts starts running)


So basically what I am saying is, the scripting is powerful, but not explained well anywhere.

-- game dev is fun...but taking up too much time --
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 8th Mar 2007 02:52
@ filya

Thanks for the explanation on both issues. Setting the objective detail to a number works well without a hitch. The engine keeps track of the objectives and when the last objective is picked up then the game ends. Sweet. Now I know why you can pick up any item you like. Any can be an objective. I had asked a question elsewhere on what the purpose of picking up items when you can't do anything with them and nobody used this as an explanation. Well, this is what you can do.

Also thanks for the second issue. Just knowing little tidbits of info like this can help me with other issues.

When I first learned "C" -- it wasn't C++ yet -- I had a hard time remembering to put a colon after a statement. Well, I'm having trouble with the colons ad commas in this as well but it will get straightened out in my head.

As opposed to Highlander.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 8th Mar 2007 04:56
Many get confused by the colons and commas. This is the best way I know to explain them.

Think of the first colon as "IF". Follow IF with conditions, separated by commas which mean "AND". Think of the second colon as "THEN". Follow THEN with actions separated by commas.

There are exceptions, of course, but basically it's "IF this AND that, THEN do this AND that".

If you can remember that and keep the conditions and actions from getting mixed together, you're half way there.

I'm sorry, my answers are limited. You must ask the right question.

filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 8th Mar 2007 07:05
np Flatlander. This is what we all are here for.

xplosys, thats precisely how I speak my fpi scripts aloud.

-- game dev is fun...but taking up too much time --

Login to post a reply

Server time is: 2024-11-23 12:24:58
Your offset time is: 2024-11-23 12:24:58