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 / need scripting help plss

Author
Message
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 17th Jun 2013 22:23
Hey guys...

I am making a game and I need help...
I am a very bad scripter. In my game, you need to find 10 keys to open the door and complete the game, but I have no idea how to do this.
I want my keys to be spawned one at a time and on random places, and the last one opens the door, and there should be a text somewhere on the screen which say how much keys you picked up.
If that could be done, will someone explain to me how.

Who helps me will be mentioned in my game as a scripter.

Thanks...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 18th Jun 2013 16:11
Hi tonny1111 and welcome.
Quote: " find 10 keys to open the door "

I believe there's several ways of doing this. One way could be to set each key as an "objective". But if you want
Quote: "spawned one at a time and on random places"
you could modify the "pickupkey" script to something like

Then in the "ifused" field put in the name of your next key. It should work Set your last key to open the door.
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 18th Jun 2013 20:19
Well I wasn't thinking, that was easy and you helped a lot!

But I have another question. So I want my enemy to spawn on random places and on random time.. So the player has an impresion that the enemy is teleporting... I know i need to find spawn locations in fpsc and to make the enemy disappear i need to set the spawn life...
But my question is how to make that "teleport" script to spawn enemy always on different place.
pls help if you understand me..
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 18th Jun 2013 20:22
And if you don"t understand me, I want something like in the game Slenderman's shadow: sanatorium where enemy (Slender) is always behind you when you turn around. Something like that...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 18th Jun 2013 21:17 Edited at: 18th Jun 2013 21:21
Quote: " enemy to spawn on random places and on random time"

The random places NPC spawn I don't think is possible, there may be a work around with a variable, but I have not done one. To my knowledge only the player can "teleport".
But that shouldn't stop you. There are all kinds of work arounds to give this illusion with triggers and timers. You just have to think about it.
best
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 19th Jun 2013 00:35
So ok i will try something, you helped a lot, thanks...
But I have another question..... (You know, I have a vision and I dont know how to make it real... -I know i am boring with all those questions, sorry )
My question is, about that hud that shows how many keys you picked, is it possible and if yes, how?
Sorry again I know i am boring...

P.S. this realy is the last question
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 19th Jun 2013 07:52
tonny1111
This is the scripting forum. A place to ask questions when your lost. No question is too boring, and may well help someone else.
Quote: "hud that shows how many keys you picked, is it possible "
Short answer is yes. Depends, do you mean like a number hud counting the keys you picked up so far, or a texture/icon hud?
The numeric counter is done with variables.(not too hard)
But I think you mean the texture hud. (very easy) You would need
to reset the hud for each key picked up. Each key would have it's own "pickupkey" script.(pickupkey1.fpi,pickupkey2.fpi...ect)
Define a different hud in each script. Assign to proper key.
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 19th Jun 2013 12:18
Ok, I will try that, Im not good at scripting but I think i can do this
Thanks again... You're a legend!
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 19th Jun 2013 16:15
So here I am again -.- ...
I dont know whats wrong. I edited pickupkey like this

(it was without the first line (hud)) and everything was good, keys were spawning one at a time (Thank you ),until I added the hud (first line)

Now it wont even show the hud.. Please help
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 19th Jun 2013 18:36
tonny1111
First you have the same line twice(line state=10) and the hudname, stay away from just a number, if your image is "count1.tga" try "hudname=count1". That way the next key can use image "count2.tga and the hud "hudname=count2",get it.
Notice in your script "hudname=1" but your "hudshow=keypromt"
The hudshow should be the name of your hud.(hudshow=1)
Try this

Note: remember to make backup copies of your original files before making changes!
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 19th Jun 2013 19:06
Well yeah that is working well, thanks
As I said, I suck at scripting so I will have more questions, but later...

Cheers...
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 20th Jun 2013 22:01
So I have another one...
How to make an enemy to freeze when player is looking at him, and when player is not looking at him he runs for him...
If you understand me, sorry for my english.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 21st Jun 2013 16:26
Hi tonny1111
Making a NPC freeze is not too hard, but involves getting into the
characters script. Is this something custom or stock? (script and or character)
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 21st Jun 2013 18:04
I want to edit shadow_hider.fpi script, but I dont know how.
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 21st Jun 2013 18:06
I mean, i know how (with notepad) but I dont know how to script that freeze thing when player sees enemy.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 22nd Jun 2013 17:34 Edited at: 22nd Jun 2013 17:41
tonny1111
"shadow_hider" sounds like a custom script or from a pack, so I cant help you as I don't have it.
But you could try yourself. First grab the latest syntax list here http://forum.thegamecreators.com/?m=forum_view&t=180924&b=23 Look for the "inview" condition, I'm thinking you could
"freeze " or "idle" the character when "inview".
best
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 22nd Jun 2013 21:28
I am not that good at scripting
I tried something but it isnt good...
This is the script:

and thats the original (I only added
)
so how could I make enemy idle when player look at him and when player turns around enemy runs for him. Please help...
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 22nd Jun 2013 22:07
Im sorry, I am not using shadow_hider script any more, now I use this
so when I use this script, enemy always runs for me (player), but what I want to do is when I look at him, he stops and idle. Can you help me script that?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 24th Jun 2013 03:06
That also is a custom script for a pack I do not have. Sadly I can not help you. In your "Random Melee Attack" script you'll see "animate=95" and "setframe=102", those actions belong to a specific model, and that model only. What I could do is try something with a stock character/script. Let me see.
ncmako
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 24th Jun 2013 03:24
Ok, I would really apreciate some help...

Best
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 25th Jun 2013 19:34 Edited at: 25th Jun 2013 19:38
tonny1111
I had some time to try this out, and it seems to work great.
To test just take a simple room/prefab, for the character I used stock scifi character "zombie unarmed". Apply this script

Zombie will attack when your not looking at him.(note: set his speed to 200,helps when attacking) Remember this is only to give you an idea that it is possible. Your custom characters will need a different (idle)animate=# Also add your own sounds if needed.
If not, delete the sound part of script.
best
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 25th Jun 2013 20:51 Edited at: 25th Jun 2013 21:14
@ncmako
Its not working for me...
I dont know if I should update to 1.18, I am curently working on 1.0
I never had time to update, but if I must update it now, I can...
What version are you working on?
Now I start to think that there is no inview command in 1.0...

EDIT:
You know what? I just downloaded update, installed, found my serial, tested it and it works great! Looks like 1.0 really never had inview command...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 25th Jun 2013 21:22
Ver. 1.0 Wow, yes! Definitely an update is needed. Glad to hear you got it working. Also, if you have any problems with your update check this link for earlier versions that might work better.
http://www.thegamecreators.com/?m=view_product&id=2001&page=Files
best luck
tonny1111
10
Years of Service
User Offline
Joined: 17th Jun 2013
Location: Croatia
Posted: 25th Jun 2013 21:36 Edited at: 25th Jun 2013 21:39
No, 1.18 works great, very well for now...
But now I will have questions about 1.18 cuz Im new,, like what about .fx effects (shaders)? I had few of them randomly downloaded on 1.0 but they were not working, and stock ones worked...
Now either of them work (stock and custom)?
I tested themm only in test mode, dont know if they work when I build a game..

EDIT:
Ok, sorry, in options there was No shader effects checked..
So now effects work...

Login to post a reply

Server time is: 2024-04-20 03:12:07
Your offset time is: 2024-04-20 03:12:07