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
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 16th Sep 2008 06:06 Edited at: 16th Sep 2008 06:09
Congratulations xyzz1233

In case you are curious
I was wanting to put this up

"weapthrow=x" - Functions similar to dropping the weapon with the exception, if x=1 and you are out of ammo then the player throws the weapon at the enemy and hurts the enemy. x=0 then the weapon can be retrieved with the ammo at 0.

but I was too comfortable with the five I had. It was a hard decision.

I know it is too late now but it would be interesting on the most part.


xyzz1233
17
Years of Service
User Offline
Joined: 18th Nov 2007
Location:
Posted: 16th Sep 2008 18:38 Edited at: 16th Sep 2008 18:40
Okay, here's my challenge:

Using Ply's Mod, make a security camera script, where the player goes up to a console, presses 'g', and then ends up in the security camera view. The player then can press 'g' again to be returned to the normal view.

GO!

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 17th Sep 2008 03:55
Simple, yet effective.

I suspect this to take 2 scripts.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
xyzz1233
17
Years of Service
User Offline
Joined: 18th Nov 2007
Location:
Posted: 17th Sep 2008 03:59
You can use any amount of scripts.

However, I was thinking it would only use 1. I might be wrong about how your cameras work, though.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 17th Sep 2008 08:22 Edited at: 17th Sep 2008 08:23
Well, to make it EASY to script, I would recommend no less than 2. Getting the camera set up from the console's script would be a HUGE headache for positioning, don't you think?

[EDIT]POST 255!!! Hah, I'm such a nerd. [/EDIT]


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 17th Sep 2008 13:39
Why does 255 seem to be the limit for so many things?

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
xyzz1233
17
Years of Service
User Offline
Joined: 18th Nov 2007
Location:
Posted: 17th Sep 2008 16:17
@ Ply:
I was thinking more along the lines of having the camera just use default.fpi and doing the rest from the console's script... Not sure it it's possible, though.

@ Meteorite:
It's the limit for a byte...

2(binary = 2) to the 8th power (8 bits in a byte) is 256. Minus one so we can have 0 as the lowest number in our range of a byte, not 1.

Ply will probably explain it better though.

meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 17th Sep 2008 22:13
oic, i'm almost done with ur challenge

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
xyzz1233
17
Years of Service
User Offline
Joined: 18th Nov 2007
Location:
Posted: 17th Sep 2008 22:23
@ Meteorite:
Sounds good.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 18th Sep 2008 00:29
@xyzz:

Well, getting the UDC positioned to teh camera entity would be MUCH harder to accomplish and not nearly as dynamic if you set it up in the console's script. Setting up the UDC from the camera's script will be more dynamic and definitally much easier.


@meteorite:

No body deals in bits anymore, it's most likely going to be some number of bytes. So to use the minimal amount of space of memory, people use bytes if they know that a number will never exceed 255.

In binary, each digit is a power of 2, just like in decimal where each digit is a power of 10.

Each digit can only be a number from 0 to (power of system - 1), so in decimal the system is power of 10, so each digit may only be 0-9, in binary the system is power of 2, so each digit may only be 0-1.

To calculate what a number is in each system, you count what digit you're looking is from right to left. Remember that furthest right digit is 0, not 1. So in 1763, from right to left, it goes from digit 0 to digit 3. Let us look at the 7. This is digit number 2. So we take the base number (10 in decimal) and take it to the power of the digit number. So we has 10^2. Then multiply the answer (100) by the number we saw in that digits place. 7 * 100 = 700. You find that out for ALL digits in the number, then add them up... obviously you get 1763. Real easy for decimal, cuz we all think in decimal.

So, let us find the highest that an 8 bit number can be. In binary the highest number each digit can be is 1, so the highest 8 bit number will be:
11111111 (<----- That's 8 1's)
Counting up from 0, we see that there are 7 digits here.
This is easy part because we can skip the multiplying part, hehe. (Anything multiplied by 1 is anything, right?)

We go from right to left as always:
(2^(digit number) = )
2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64
2^7 = 128

Now... we found what each digit is worth, let's add them up. After that we see that the HIGHEST 8 bit number we can have is.... 255.

Easy way to find this out if ALL digits are 1.... find what digit AFTER last digit equals and subtract 1.

2^8 = 256
256 - 1 = 255


There, you are now a certified binary calculator.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 18th Sep 2008 02:02
I am going to stay out of this one.


meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 18th Sep 2008 04:07
I think I understood xyzz's explanation better, I'm not quite THAT smart ply

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
xyzz1233
17
Years of Service
User Offline
Joined: 18th Nov 2007
Location:
Posted: 25th Sep 2008 04:07
@ meteorite:
Is your entry thingy done?

meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 26th Sep 2008 01:12
Not yet, I made the cam into a car, but I can't get the viewcam command to work, I think it's a problem with my console script

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Sep 2008 01:30
I can take a look at your console script if you'd like a lil' bit of assistance

Just email it to me. (I won't make your script, but I can point out syntax and usage errors with the commands)


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Diablos Bud
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location:
Posted: 28th Sep 2008 03:17
CG: When you said:
Quote: "Hmm......

CALCULATERAYCAST to find the vector......

....and make it automatically set a variable $RP to it's position....

PULLOBJECTTOVECTOR=XX

XX can equal an entity name, or when using the $RP, the last vector hit by a weapon.....

WEAPONFORCE=XX

The velocity of weapon rounds or pull velocity of it's gravity, 0 indicating an instanteous pull, and other values represent bullet time, (units per second).....

That's all I can think of breaking it down to for now.....
"
it made me wonder what these commands could do. If I read this correctly I can have an object hit by a certain weapon's bullet come to a certain position on the map, am I right? If I could this mean you can have an object land right in front of a player with these script lines? If so it could be possible to make a gun like the Grabber from the Doom3 expansion pack (known as Resurrection of Evil), which is like a gravity gun. We could make a gravity gun with right-click to bring object to you in throw object position, then left-click to fire it a certain range.

Diablosbud Productions - a name for the game's developed by me.
Teh_Spy
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 28th Sep 2008 06:09
A little off topic but ply, is your avatar a chick or a dude? 0.o

http://img366.imageshack.us/img366/4091/batmanboomshottw5.gif
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Sep 2008 14:17
@Teh_Spy:

It's a head shot from a fan mae picture of Samus.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 28th Sep 2008 17:00
WHAT?!?! I thought it was supposed to be that guy from Full Metal Alchemist....

@Teh_Spy:

By your avatar i'll assume you go to vg cats.com... i luv that site

Boy... I dont know what I was thinking when I said
Quote: "I made the cam into a car"


I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Sep 2008 01:44
Hey, meteorite, a thought occurred to me just now...... perhaps the reason your script isn't working is because your camera isn't set up as "Always Active", which it would need to be.


If that's not the case, then I'm stumped too, lol.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 30th Sep 2008 03:16
oh good grief, I feel stupid.... but then again I never new that... failure to go through the readme fully, lol

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 30th Sep 2008 03:27
erm.. knew... but anyways... It still isnt working, but I get the red damage hud occaisionaly, my hud (as in life, armor, etc) disappears, and i get a grey version of the damage hud as well that fades away right away as does the damage hud... this is getting to be stupid... everything goes wrong for me!

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Sep 2008 05:34
Hmmmmm, one more small thing to check:

Do you have a "desc =" in your script at the top? I think even though the official version got rid of the necessity for it, Mods will still require that it be there for scripts to work correctly.



Also, the onyl reason the camera needs to be "Always Active" is because your character might not be close enough to it when you are trying to activate it... and if the player isn't close enough to it, then the "optimization routine" will keep the script from running to save on processing power.



The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 1st Oct 2008 05:29
yea, its got the desc field, I always use FPI Editpads insert FPI template feature

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd Oct 2008 14:59
Hmmmmm..... interesting.

Well, I'll try out your script later today if I get a chance and let you know how it goes.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 3rd Oct 2008 21:19
I just read the very first post of this thread, and I have to say that this thread is pretty cool. Challenge everyone out here to learn more about scripting, and to come up with a bunch of new scripts that the entire community can use. Very good idea.

I didn't read through every post in this thread, but from my searches on the forum I can tell you that I haven't yet seen anyone who has accomplished the following, so I put forth the following challenge:

Challenge Name:
In The Name of Leon

Details:
Create a script that allows weapons to do a random amount of damage. ie, the machine gun isn't always going to do 10, or 50, or whatever you have it set at. Everyone who has ever played an RPG knows that the amount of damage that is done by a weapon is just as random as the attack itself.

I am also currently working on this, so if nobody else gets it figured out I'll post what I have (if I can get it to work, that is).

Good luck!
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 3rd Oct 2008 22:36
@ Leon

In order to issue a challenge, you have to complete the previous challenge.

It is still xyzz1233's turn.


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 3rd Oct 2008 23:50
@Leon:

Stand by for the next challenge, I believe meteorite is about to come forth with his entry for the previous one. Once it's confirmed (as per the rules of the game) he will issue a challenge... you may then take up his challenge and complete it in order to start your own challenge.

Also, I am absolutely positive that your challenge is impossible without Ply's Mod... but just for giggles, here's how it's done with the Mod

In the Name of Leon


Slap this onto a dynamic light as per all "process scripts". It will randomly have the player's dmg output between 97%-103% at all times.


Now.... wait your turn and come up with a new challenge in the mean-time (keep it, though, until it IS your turn)... and remember, you must already have concieved a way to accomplish the challenge yourself. You cannot make a challenge JUST to see if someone is going to make it for you. Believe me, we'll know if you do.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 5th Oct 2008 02:31
Nope, I give up... It still wont work, even with your advice ply

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Oct 2008 04:15 Edited at: 5th Oct 2008 04:16
*pft*


Alright, alright -

Entry for xyzz1233's Challenge

Script for Console entity:


Script for Security Camera entity: (MUST BE ALWAYS ACTIVE)



There you go. The entity I used for the security camera is the Modern Day 2 security camera. If you find yourself looking on the opposite side of the wall that the camera is attached to, then change "offsetcamfore=securitycam -50" to "offsetcamfore=securitycam 50" and delete the "offsetcamyang" action. That should bring the camera back to the front. I had it set up like that because the security camera entity is technically "backwards".


Run with Ply's Mod V1.07+ only.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
xyzz1233
17
Years of Service
User Offline
Joined: 18th Nov 2007
Location:
Posted: 5th Oct 2008 05:53
Hm. It doesn't work for me. Did you test it?

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Oct 2008 07:54
Yes, I can even make a video if you'd like.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 5th Oct 2008 18:10
@ply:

My bad. I didn't realize the previous challenge hadn't ended yet due to the number of non-challenge related posts. I'll try to pay better attention to that next time.

And as far as having done the script myself - I wouldn't post as a challenge if I didn't do it myself already. If I needed someone else to help me with a script, I'd ask for the help.

As for how I got it done? I used a timer. Not on my own pc right now, but if you wanna see it let me know.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 6th Oct 2008 03:23
Would be interesting to see, yes. Mind posting it in a different thread? I'll take a look at it then.


Still waiting for xyzz to confirm.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 6th Oct 2008 14:50
wait, xyzz has to confirm? O well, i'm not confirming material anywho, I still havent figured mine out

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 8th Oct 2008 23:38
A confirmation video is being uploaded to YouTube.

In the mean time, here is my new challenge:

Ghost Entity:

Create a character entity that will:

- Follow Waypoints
- Flow between invisible, opaque, invisible, opaque, etc while active
- Be immune to bullets
- Be able to pass through the player.


You are basically to create a harmless ghost character that wanders around.

You will need to create both the Appear script and the Main script for the entity.

Ready? GO!


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
xyzz1233
17
Years of Service
User Offline
Joined: 18th Nov 2007
Location:
Posted: 8th Oct 2008 23:49 Edited at: 9th Oct 2008 00:06
Gasp!

I didn't see that you responded. Oh, well.

EDIT: My FPSC is being screwy. It won't run any scripts, which is probably the problem.

EDIT 2: Never mind, problem fixed. Ply's entry is 100% valid.

zeza
16
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 10th Oct 2008 04:01
I've almost got it, but my entity won't move!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 10th Oct 2008 07:47
Sorry I didn't link the video... I forgot to compress it before uploading it to YouTube.. It got uploaded after an hour and after another 3 hours of sitting in "Processing" mode, I gave up and deleted it. Forgot to go back and compress it to put it up.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 2nd Nov 2008 05:51
Hey Ply!

I have got everything setup for the ghost entity, but I can't make him shift transparency.

???Any Hints???


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd Nov 2008 06:07
It's about bloody time, I thought everyone forgot about this!


Shift transparency? Can't you use the alpha commands to do that? Or are they not working for you?

Remember that "incalpha" and "decalpha" increase and decrease the alpha level TOWARDS the value specified by X.

Example:
incalpha=100, will increase the alpha towards 100 and not BY 100.
decalpha=50, will decrease the alpha towards 50 and not BY 50.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 2nd Nov 2008 13:54
I hadnt forgotten, I just havent felt like scripting

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 2nd Nov 2008 16:31
the incalpha and decalpha commands are not working for me, although I did set them up in the script


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 3rd Nov 2008 04:36
Hmmmm... well, post the script and I'll confirm it if it works for me.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 3rd Nov 2008 04:52 Edited at: 3rd Nov 2008 13:01
The Appear Script:


The Main Script:



To make the entity immune: set the health to 0 in the entity properties.


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 3rd Nov 2008 11:18
Your alpha fades don't work because you didn't listen to me when I explained how they worked to you, lol.

Fix the inc and dec alpha to be used how I mentioned and it'll work just fine.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 3rd Nov 2008 13:05
Changes made.

Still won't work for me.


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 4th Nov 2008 03:36
Welp, it looks right to me! I'll confirm it and maybe do some testing later on to determine why it isn't working for you.

You may comence challenging.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 5th Nov 2008 04:50
Challenge name: Gamer X's Noob challenge

Desc: Set up two scripts, one for an item and one for a light, and have it where when you pick-up the item the light turns on and when you drop the item the light turns off. Have a HUD message pop-up when item is picked- up and dropped. Do not use mods in this challenge!!!

Summary:
1. A light and item scripts
2. A HUD displayed when item is picked-up and drop
3. The light turns on and off depending on if you have the item or not
4. NO MODS!!!

Other Info:
You do not need to make a HUD for this.

That is the challenge... Get Ready, Get Set, GO...


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Nov 2008 07:31
Hmmm... you can do that without altering the light script and just make a script for the item.

Nice starter challenge! I hope it'll attract some newer scripters to join the challenge.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.

Login to post a reply

Server time is: 2024-11-24 22:39:32
Your offset time is: 2024-11-24 22:39:32