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 / Script Challenges

Author
Message
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 18th Jul 2008 03:06
It should, what version are you running. Also, the start script hased to be apearnogravity to make the alphafade work. BIG HINT!!!

Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 18th Jul 2008 03:12 Edited at: 18th Jul 2008 03:53
thanks for the BIG HINT!!! i'm running v11 right now.
-EDIT- got the appear script and the activation script done now doing actions
note: I'm using placeholder media to do this as I'm kinda busy to make all this stuff but all you have to do is substitute with your own.

I know not what WWIII will be fought but I do know that WWIV will be fought with sticks and stones-Albert Einstein
CoffeeGrunt
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 18th Jul 2008 20:41
Quote: "- AND MOST IMPORTANTLY, this must be done in a way to be compatible with FPSC V1.07, which means no variables!!!"


Heheheh......

I'm a bit late, but oh well.......so there's not much point in the warehouse one, so here's my challenge:

-Create a Disco lights show, with 5 lights used,

-Must use V1.07 commands, no higher,

-Must use only 1 custom Main AI script,

-On your marks....get steady....GO!

Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 18th Jul 2008 23:23
coffee grunt did you win a challenge?btw the warehouse one was completed.
I'll try anyway

I know not what WWIII will be fought but I do know that WWIV will be fought with sticks and stones-Albert Einstein
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 19th Jul 2008 00:17
That sounds like a good challenge, CG, but you need to win a challenge to post one, sorry.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 19th Jul 2008 01:37
They're right, CG, you gotta be the first to complete the current challenge in order to post your own.

The one currently in effect is Hybrid's "Hologram" challenge. Complete that, get it verified as functional and then you can post your challenge up.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
CoffeeGrunt
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 19th Jul 2008 02:21 Edited at: 20th Jul 2008 01:47
Ok, here's my results.....

The hologram:


The weapon must be called Weapon, and it's Spawn At Start must be set to No.

Finally, the Terminal:


-=EDIT=-

Woops! I edited it to fix the mistakes. I forgot that you wanted it to rotate and be re-usable.

Anyways, now the terminal will activate and de-activate the Hologram, which will fade in and out accordingly, (I hope so at least, I'm not good at which ALPHAFADE comands do the fade-ins :-\ ). The hologram will present a HUD to the player, with the option to press Y/N for a weapon. If Y is pressed, it activates the weapon, and does a "give" animation and fades out the HUD. It will always rotate to the player and will always be at 75% transparency.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 19th Jul 2008 03:26
Some problems, CG:

1) Your scripts don't require Ply's Mod. Which is a good thing.

2) The hologram won't "fade in". It will simply pop up instantly. Need to fix that.

3) The hologram won't rotate unless animated to do so. Might wanna script that.

4) The player can't choose NOT to get the weapon. Need to implement that.

5) Suspended scripts will not register scripts anymore and so cannot be reactivated. Try not to suspend any of these.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 19th Jul 2008 03:56
Really,
[HINT]
the console can just be a a prompt which uses the hud when the player is so close to the hologram.
[/HINT].

CoffeeGrunt
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 19th Jul 2008 10:54
Woops, lol......

Fixed it up. And it does require your mod Ply, because it uses that ACTIVATETARGET command you added in.

meteorite
17
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 19th Jul 2008 16:05
I dont believe activatetarget is a ply command, look at my warehouse lights script, that works with v1.12 of fpsc unmodded

I love Jenkins forever :p
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 19th Jul 2008 16:20
Yes, that is is origional fpsc as well. Anyone done with my task yet?

Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 19th Jul 2008 20:57
didn't CG answer?(or am I going blind?)

I know not what WWIII will be fought but I do know that WWIV will be fought with sticks and stones-Albert Einstein
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 19th Jul 2008 21:16
It still does not fade in.

CoffeeGrunt
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 19th Jul 2008 21:30
*Sigh* How would I make it do that? I've used all the ALPHAFADE commands I can think of, SETALPHAFADE, INCALPHAFADE.......

.....

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Jul 2008 01:30
Hint for fading in:

Open the "appear2.fpi" script. Look closely at how it uses the alphafade commands.

If you spawned an entity with that appear script it would look no different than using appear1.fpi. Why? Because it INCREASES the alpha fade by 100 units immediately, thus making it fully visible immediately.

Try changing the "incalphafade=100" to "incalphafade=1". Now you can noticably see the object fade in.




(Remember, CG, I *did* say this is for a learning experience. Consider the fact that you'll be a better scripter when this is over. )


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
CoffeeGrunt
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 20th Jul 2008 01:47 Edited at: 22nd Jul 2008 00:19
If you say so...

Here we are then:

The hologram:


The weapon must be called Weapon, and it's Spawn At Start must be set to No.

Finally, the Terminal:


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Jul 2008 02:01 Edited at: 20th Jul 2008 02:02
The command is "alphafadeequal"... easy to make mistake, though, lol.

It will never get past state 1, because when it gets to state 1, then alphafade is going to be 3, and thus the conditions will never be true.


Here is a loop for you to consider:



Look very closely how that loop will work. Follow how it's going to work in your mind. During state 1, it is going to increase the alphafade as long as the alphafade does NOT equal 100. once it becomes 100, it will then go to state 2 and the alphafade will no longer be increased.

This is what's known as a "loop". It will "loop" a command or set of commands until a certain condition is achieved.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 20th Jul 2008 04:31
Thank's for thehelp, Ply. You describe the task much better than I did. I really don't know why this script is so dificult, though.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Jul 2008 05:05
It's not difficult, lol. It just requires commands that aren't used often by everyone.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 20th Jul 2008 05:22
I know, that's why I chose it.

CoffeeGrunt
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 20th Jul 2008 11:23
Lol, I edited that at 11 PM, and I was tired......

Fingers crossed, it should work now......

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Jul 2008 22:13
Almost there, CG.

Now, it won't get out of state 0, because one of your lines sets the alphafade to 0 and another increases it by 3, then it repeats, so it'll only ever be at an alphafade of 3. That being said, the only way out of state 0 in your script is for the alphafade to get to 75... which won't happen.

Try splitting up the "fade in" and the "standby" portions of your code into seperate states.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
CoffeeGrunt
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 20th Jul 2008 22:23
*Sigh* You must be getting tired of clearing up my mistakes by now....

Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 20th Jul 2008 23:02
No, this is a learning quest. Have fun, and work at it. You will get it.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 21st Jul 2008 23:35
Confirmed!

It will work, but for future reference, here are some things for you to consider:

- If your state 0 loads a HUD, don't EVER go back to that state. It will only waste porcessing power loading in the HUD just to find out that it doesn't need to because it already has one just like it.
- I think in this case, when the player gets the weapon, it shouldn't reset to state 0, because then it would be able to spawn another one. I think turning the hologram's alphafade to 0 and suspending it would suffice.


Alright, CG's turn to challenge.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
CoffeeGrunt
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 22nd Jul 2008 00:24
Ok, tweaked it to perfection....

Here's my challenge:

-You must create a fully working vending machine, with a choice of drinks, then machine must then spawn said drinks,

-May only use commands circa V1.09 and below, (mods included),

-Must be optimised as much as possible to ensure usability on a fairly large scale,

-May only use 1 Main AI script,

The contest starts now.

Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 23rd Jul 2008 20:41
So it spawns Cans?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Jul 2008 01:01
Exactly.

Since I don't see much interest in this challenge, here are some

Hints:
- Put the Soda machine down as a regular entity
- Create entity "spawners" in front of the soda machine
- Script the machine to bring up a choice HUD when the player presses ENTER next to it
- Have the machine activate one of the spawners when the player makes a choice.


Annnnnnnd, GO!


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 24th Jul 2008 03:45 Edited at: 25th Jul 2008 17:17
That is by far the best script I have every heard of. I should get started because I am thirsty.

-edit-

Here it is, I havent tested it, but the script is this. Simple.



Then just set up the cans as if they were going to be spawned by a triggerzone.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Jul 2008 04:35 Edited at: 24th Jul 2008 04:36
Instead of activating itself to tell itself to go to state 2... why not cut out the middle man and just have it go straigh to state 2?

Also, what if the player presses enter, brings up the soda menu and then decides they aren't thirsty?

Annnnnnd... when you "activatetarget", what value are you activating it with?


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 24th Jul 2008 17:11
I have edited it. But in the HUD, it will tell tell the plr to walk away, causind the HUD to fade out.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th Jul 2008 07:46 Edited at: 25th Jul 2008 07:47
Almost... you still aren't activating the "sodas" with a specific value. After that, it should work and can be confirmed.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 25th Jul 2008 17:18
I have never used those commands before, especialy settargetname, and thus have mever known how the entire command played out. I hope that my edited version above is now correct.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Jul 2008 23:41
Correct, and confirmed... you may commence challenging.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 27th Jul 2008 00:49 Edited at: 27th Jul 2008 00:59
Hmm. Let me think again.

Added:

Ok, my challenge is to make a night vision script that has four modes: LOW, MED, HIGH, and Infra red. Use one key to toggle it on and off, and one more key to change between the four modes. Each mode needs a different HUD to be shown, so that the player knows what mode he or she is in. To add, the night vision can only last for 30 seconds, after which, it shuts off and cannot be activated for a minute. This is an easy one, but it is all that I can think of.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Jul 2008 01:31 Edited at: 28th Jul 2008 01:33
If the "nightvision" needn't actually work for the script to be complete and only the HUDs are required, then this is an easy one.

Submission for Hybrid's Challenge:




Plystire's Challenge:

Describe, in FULL DETAIL, how and why the above script completes the challenge.
Your submission must be in a code snippet, so that those who want to analyze it themselves won't have to see it.

Your submission must include the following:
- Which keys on the keyboard do what
- When each key is pressed, describe what happens inside the script (Remember, FULL DETAIL)
- How the script turns the NightVision On/Off
- How the script toggles between "modes"


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 28th Jul 2008 04:05 Edited at: 28th Jul 2008 04:20
I'll take a look at it later. first of all, do you like my sig? Second of all, that is very interesting how you did that. It works, and I think I understand how, but give me some tme to test some other things.



Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Jul 2008 04:47 Edited at: 28th Jul 2008 04:48
Hmmmm, I waslooking for a bit more detail, like what each state is for, why some of the lines function without using a state condition, etc.

Sorry, didn't wait for confirmation because... well... that would defeat the purpose of my challenge, lol. (That, and I knew it would work. )

Only thing wrong with the script is that it may toggle too fast because it never waits for you to release the key. That'd just be nit-picking, though, I'm sure one of the new up and coming scripters can figure out how to keep it from doing that.


And to answer your question: Yes, I like the sig. It goes way too slow because it's trying to download it while playing the GIF, though. It's a very large file for some computers, I suppose.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Robert F
User Banned
Posted: 28th Jul 2008 06:40
Ply can you please read your mail?


CoffeeGrunt
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 28th Jul 2008 11:30
Yeh, but it looks pretty.....

Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 28th Jul 2008 20:55
The sig is basicaly an avi video converted into a lower quality gif. So It is alarge file. The boards don't support flash, so I had to use this method. As for your challenge:



meteorite
17
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 29th Jul 2008 08:37
Hmm, its already been completed, but I will take up the night vision challenge

I love Jenkins forever :p
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 29th Jul 2008 17:40
There are many ways to do it.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Jul 2008 01:41
Sorry for taking so long, my keyboard refused to work the other day so I had to sit down and find a way to get it functioning again.


@Hybrid:

Confirmed! I was looking for a bit more detail, and one problem I found in your post was:

Quote: "The always command tells it shich variable to set or check."


This is untrue. The "ALWAYS" condition simply states that the condition will ALWAYS be TRUE, meaning the actions in that line will ALWAYS be executed when the parser reaches that portion of the code.

I was actually hoping for something along the lines of:




However, your description is good enough for me.

Commence challenging!


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 30th Jul 2008 02:44
Sorry for that, I did not know how in-depth that you wanted to go into. Next time, I will do so.

Hybrid's Challenge

Make a zombie script to chase after the player, and when close enough, attack. That is the easy bit. However, when the zombie;s health is below 10, other zombies attack that zombie. It doesn't have to kill it, that requires the 1.13 BETA, but as long as it stops the zombies from attacking the player, making them attack the hurt zombie instead. After they attack the hurt zombie, they return to attacking the player. This could be interesting as to how you do it.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Jul 2008 07:30
Yes, would be very interesting how the other zombies would target the hurt zombie and not some random zombie using the same script.


Hope someone's up to this.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 31st Jul 2008 00:20
You can name them differently. Any way is acceptable.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 31st Jul 2008 00:39
If someone doesn't accept by tomorrow, perhaps a hint would be in order.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 31st Jul 2008 00:56
HINT


This may help.

Login to post a reply

Server time is: 2024-05-23 10:13:01
Your offset time is: 2024-05-23 10:13:01