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 Product Chat / Ply's Scripting Mod V1

Author
Message
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Mar 2008 10:28 Edited at: 14th Mar 2008 04:10
Ply's Scripting Mod

Current Version:
V1.02


Version History:
v1.02
- Depricated Variable to Variable commands.
- Added "Variable Recognition" into engine.

v1.01
- Added "NextLevel" Scripting Action.

v1.00
- Added 100 Named User Variables into the engine.



The one and only,
~PlystirE~

Attachments

Login to view attachments
General powell11
17
Years of Service
User Offline
Joined: 7th Jul 2007
Location:
Posted: 7th Mar 2008 14:52
thanks!

Check out gang- the gangster fps
Keo C
17
Years of Service
User Offline
Joined: 3rd Aug 2007
Location: Somewhere between here and there.
Posted: 7th Mar 2008 18:37
Now if you could just fix the plrdrop command...


Image made by the overworked Biggadd.
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 7th Mar 2008 20:16
.....(tears of joy).....

Finally, a scripting mod I can really use!

Aaagreen
17
Years of Service
User Offline
Joined: 4th Sep 2007
Location: City 17
Posted: 7th Mar 2008 20:29
Whoa

Formerly Bum Fat Cheese
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 8th Mar 2008 00:29 Edited at: 8th Mar 2008 00:31
@Keo C:

Yes, I completely forgot about that one.

I've looked into it before and that bugger is a doozy of a command.

Think about this... in order for that command to work, the script would need to be running even AFTER the entity has been deactivated. Kinda like... a zombie script or something. Then when this command is called, it would need to recreate the entity at a new location.

Maybe one of these days I'll try to get that bugger workin'.


The one and only,
~PlystirE~

Leaning Objects To The Side
17
Years of Service
User Offline
Joined: 3rd Jan 2007
Location:
Posted: 8th Mar 2008 03:55
WOW!! AWESOME Job Plystire!! by the way...thanks for the download. as always Plystire, keep up the good work. I hope that you have a great day.

Cheers,
Tanya.
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 8th Mar 2008 10:39 Edited at: 8th Mar 2008 11:54
For everybody who's downloaded this mod, here's a simple shop script I whipped up for you.....

It will allow you to buy health with some money, so far it's only a "beta", V0.65,so if you find any bugs, tell me here:



Also, it'd be boring to have all that health to buy, but be unable to buy anything with it.....



-=EDIT=-

@Ply
Is it possible to keep the player's health value at the end of one level through to the next?

Also, will variables be kept too, eg, player ends level 1 with $152, startd level 2 with $152

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Mar 2008 00:23
@CG:

The variables are global and retain their value through to the next level.

For variables like Money, I would suggest declaring it in the Global Script, so that you don't have to worry about finding a place to declare it in an entity script.

I'd be interested in seeing if you could make a shop that sold ammo and weapons. (If the shop was the only way for the player to get new weapons, youcould even set up variables for the weapons and check them to see if the store should supply ammo for specific weapons or not.


The one and only,
~PlystirE~

bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 9th Mar 2008 00:33 Edited at: 9th Mar 2008 00:35
You're right, this is a scripter's dream come true. Many many thanks for this!

etimerstart = me giving you a big hug

----------------------------------------
"Your mom goes to college."
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 9th Mar 2008 00:37
Quote: "I'd be interested in seeing if you could make a shop that sold ammo and weapons. (If the shop was the only way for the player to get new weapons, youcould even set up variables for the weapons and check them to see if the store should supply ammo for specific weapons or not. "


I'm on it, I'll have a demo ready by tomorrow.....

Also, I've made a sprint endurance script:


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Mar 2008 00:56
@bond1:

Thanks, that means a lot coming from you.



Endurance sounds like a nice idea, coffee grunt!

There were a few... hitches in your script that I noticed, though.

- The state=2 section doesn't need two lines, as they both pretty much end in the same outcome.

- If you use "etimerstart", then make sure you also use "etimergreater". I noticed you used the global timer for the condition.

Other than those, it looks good. May I suggest that when the player runs out of endurance, he starts to get hurt from running. That way you won't need to find a work around to preventing him from running. If you hurt him enough, any player in their right mind would stop running, lol. Also, when the endurance runs out, have the Endurance HUD start to flash so the player isn't thinking that they're just being shot at and continue to run away until they die, lol.


I'm loving the stuff you're coming up with, CG. It makes the Mod all worthwhile to see people actually using it for what it was meant for.


The one and only,
~PlystirE~

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 9th Mar 2008 01:21 Edited at: 9th Mar 2008 01:22
Endurance script is ready for use, but the HUD sort of appears and disappears instead of flashing......

Couldn't work out how to make it go red, then "un-red".....




Enjoy everybody...

Also, what would an endurance rate be like, if you couldn't drink something to recover afterwards, assign this to a beer bottle or some similar entity and your character will regain 25 endurance,(must be used while another entity has the main Endurance script)....



Quote: "I'm loving the stuff you're coming up with, CG. It makes the Mod all worthwhile to see people actually using it for what it was meant for"


Thanks Ply, wouldn't be able to do it all without this great mod....

Keo C
17
Years of Service
User Offline
Joined: 3rd Aug 2007
Location: Somewhere between here and there.
Posted: 9th Mar 2008 02:04
Quote: "etimerstart = me giving you a big hug"

No, your code isn't right.



Image made by the overworked Biggadd.
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 9th Mar 2008 10:56 Edited at: 9th Mar 2008 15:03
Lol....

-=EDIT=-
I just ran a test game with this mod, and V1.086, and the HUDs for my scripts didn't appear, also, when I used my "Health Shop", it removed my Lives and Health HUD.....

I've checked and double checked, but the Numeric is definitely where it should be, and I got the code from your example....I've played around with HUD co-ordinates, to no avail.....

I'll try coming down to V1.07 to see if it makes a difference....

-=EDIT2=-

Ok, modded the Health shop script so the numeric was always present, rather than appearing when You engage the shop, while this did remove the problem with my health and lives hud disappearing, it still didn't deal out, here's the modded version:


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 14th Mar 2008 04:18 Edited at: 14th Mar 2008 04:52
New Version 1.02 has been attached to the first post.

This time around I've added Variable Recognition into the engine.

What this means is that you can replace ANY value in ANY command with the value inside of a user variable.

Ex.

addvar=VarName 100

-OR-

addvar=VarName %VarName2


Notice that the first variable remains unchanged, but the second one has a % sign in front of it, or it could simply be a value. This tells the engine that the first one is a variable to be modified and the second is simply the value of the variable or a solid value to use for modifying the first.

You can do this for anything requiring a value.

More Ex.'s

etimergreater=%MyTimerVar
state=%MyOtherVar
plrdistwithin=%AnotherVar
incframe=%YetAnotherVar

... plrass=%boot (hah, I made a funny. Please don't edit that, mods, it really is a command. )

Basically, if it needs a value, then you can use a variable for it.

If you give it a variable that HAS NOT BEEN DECLARED, then the engine will use a value of 0 instead. This is especially important to remember when using division operations such as "divvar" or "modvar".


Read the ReadMe included, it'll help.

If a command in the ReadMe has "***DEPRICATED***" by it, then that command is no longer recognised by the engine. Use the other ones.


Enjoy!


The one and only,
~PlystirE~

AaronG
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location: Millstone, NJ
Posted: 14th Mar 2008 04:56
Wow. Awesome!


8800 640mb GTS, 4gb RAM, 500gb HDD, Vista Home Premium, 3 Dual Panel Casing Fans
foobly
16
Years of Service
User Offline
Joined: 10th Feb 2008
Location:
Posted: 14th Mar 2008 05:01
Is there a certain version of FPSC to use this?

Thanks.
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 14th Mar 2008 05:50
Quote: "Is there a certain version of FPSC to use this?"


...it will work either v1.07 or v1.08.

If used with v1.08, headshots and some other unique v1.08 improvements will no longer function...

ARE YOU A LONE WOLF? CLICK BELOW TO JOIN THE PACK.

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 14th Mar 2008 20:33
That's all well and good, but could you reply to my post and tell me what's wrong with my code please?

This is a great mod,, but as long as the numeric's don't show and stuff like that, it's useless to me.....

Come on, Ply.....please?

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 14th Mar 2008 21:13
Sorry, CG, musta missed that one.

Quote: "I just ran a test game with this mod, and V1.086"


That might cause some unexpected results.


Also, I suggest declaring your money variable and money HUD inside the global script (where your perma-HUDs are created). That may not solve your problem, but it'd certainly be cleaner code.

As for the script not dishing out health:

Why not skip "state=3" or put a timer on it, instead of checking all of that stuff.

You can rephrase state 2 to something like this:




See if that helps any.


The one and only,
~PlystirE~

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 14th Mar 2008 22:05
Ok...testing...

Gunn3r
18
Years of Service
User Offline
Joined: 12th Jun 2006
Location: Portland, OR
Posted: 14th Mar 2008 22:18
@coffee grunt, I sent you an email. Did you get it?
@Ply, Thanks for this. Expect it to be used in TC.

[url=http://gunn3rgames.zxq.net]
[/url]
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 14th Mar 2008 22:37
@Ply

Well, I reverted to V1.07, put all Variable creation flags into the setuplevel.fpi, edited the script as you told me to so now it is all but this:


And still nothing! When I was using V1.08 with the flags in the setuplevel.fpi, I got the money numeric up, and while my script that increases money by 50 on kills worked, the shop till didn't!

This is turning into a full-blown bug-report...

My specs:


I can't understand what's going wrong.....I'd love to use this, but it seems I just can't....

Quote: "@coffee grunt, I sent you an email. Did you get it?"


Got your E-Mail, expect some to be sent during the week-end.....

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 14th Mar 2008 22:54
@CG:

Alright, well if that didn't work. Would you mind sending me a rar'd version of needed files for the level you're testing it on? I will need your scripts, setuplevel.fpi, etc.

If you're using any custom media (from model packs) replace them with some stock media before sending, so that I won't need anything but the scripts and map file.


The one and only,
~PlystirE~

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 14th Mar 2008 23:27 Edited at: 14th Mar 2008 23:48
Kk......

I'll compile it all now....

-=EDIT=-

Compiled and (hopefully) ready to roll!

See Download...

Attachments

Login to view attachments
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 15th Mar 2008 01:23
Okay, some things that I noticed:

- In your shop script, you no longer have a state 0, which means your script would never do anything.

- Your Endurance script ALSO doesn't have a state 0.

- The barrels in your level had the "kill4cash.fpi" as their MainAI, but it should be in the DestroyAI field. *tsk tsk*

- Your Endurance entity wasn't set to "Always Active", so you had to be near it in order for it to work.

- The endurance script would get stuck in state 2 after pressing space or left shift.


I loaded up your map, corrected some things, and altered the "setuplevel.fpi" to include variable declarations, set them to a default of 100 each, as well as create the numeric HUDS for each of them.

After playing around a bit, I didn't find anything really wrong with my mod.

Here's the altered versions of scripts:

setuplevel.fpi


Endurance.fpi


Shop.fpi



There you go, man. It works like a charm on my comp.

Other than some easy to make mistakes, it looked good.


The one and only,
~PlystirE~

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 15th Mar 2008 01:47
Quote: "- In your shop script, you no longer have a state 0, which means your script would never do anything.

- Your Endurance script ALSO doesn't have a state 0.

- The barrels in your level had the "kill4cash.fpi" as their MainAI, but it should be in the DestroyAI field. *tsk tsk*

- Your Endurance entity wasn't set to "Always Active", so you had to be near it in order for it to work.

- The endurance script would get stuck in state 2 after pressing space or left shift."


Thanks! Good to know they were such easy to fix problems......

I'll test it now...

Login to post a reply

Server time is: 2024-11-27 17:36:42
Your offset time is: 2024-11-27 17:36:42