Frictional Games Forum (read-only)

Full Version: Palistov's pastebin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been spending spare time building highly specialized and fairly elaborate scripts that are easy to customize, mainly as a way to combat boredom, but some for actual projects I'm working on. I realized that some people may find them useful to use in their maps, if they want to add a new flavor to their map but don't quite have the scripting knowledge to do so, or if they want some place to look at and study scripts.

There's a link in my signature, if you're interested in poking around. Just a word of warning: if you want to use any of them for your map(s) you WILL have to do some copy/pasting (primarily transferring OnStart(), OnEnter() or OnLeave() call stacks to your maps' so as not to have multiple functions of the same name/type), and modify a few variables. If you don't modify the variables the script will be useless and will crash at compile time. It's easy though, all you have to do is modify the variables to match the names and numbers your map uses. The variables are usually made easy to find.

I'll build a more elaborate video tutorial in the future, especially if this doesn't click with people right away.



This is NOT me offering to do your scripting for scare events and monster chases and stuff. This is simply me giving a heads up about places you can get access to neat scripts I've made whether it be to use them for yourself, or to study them to advance your scripting techniques. Goodness knows the way I got here was by reading other scripts and poking and prodding at my own misshapen creations for hours on end.

Also, feel free to make requests for scripts. I usually have free time to burn. Remember, these are very modular in nature, meaning that they are not specific to any one map and never will be made as such. They can be used across multiple maps, but some tweaking is needed (both in the script AND the map) to make them work. This tweaking usually involves integer variables and string names. I'm aiming at helping the entire community here.


To draw the line between what I will and will not do for you, here's an example:


Person A wants me to develop a script that will make a bunch of torches turn on sequentially and play a spooky sound at each torch as it turns on.


Person B wants me to make a script that will cause a bunch of doors to fly open and a grunt to walk out of one of them; the player will have to use the key on the door at the end which will make grunt chase them, but if they run through the door there is a hallway with a level door at the end which lets the player reach safety. *gasps for breath*


Person A has a legitimate request. Person B needs to work that out on their own. Why? Person A's script to turn the lights on will be simple to create and easily usable for many other people. Triggering the event will require a little work on Person A's part, but that's not a big deal. Person B's request on the other hand is extremely specific to their map layout and events timeline. That would be better off created by Person B themself. Sorry! <3



Scripts you may want to use
Scripts, builds, status:
LEGEND (UNTESTED, TESTED AND WORKING)

Lightning script: BUILD 005
- Creates a system of timers to simulate lightning and thunder.
- Contains a lot of variables you can tweak to suit your preferences.
- Specially named lights and areas must be created in your map.

Soundscape script: BUILD 003
- Plays random sounds at random locations.
- Simple add the sound file names in the string array to change which sounds can be played. The script will handle the rest.
- Specially named areas must be created in your map.

Fog fade-in script: BUILD 001A, BUILD 002, BUILD 003
- Fades the frog from one alpha value to another.
- Support for different colors may be created in newer builds.
- 0 alpha is invisible, 1 is maximum visibility. Of course, float values in between work as well.
- You'll need to modify the fog properties to suit your preference (start & end distance, falloff exponent, color, etc)

Multi-Lever puzzle script: BUILD 001
- easy copy & paste. There are some variables to change, make sure you do so or this won't work!
Did anyone reply? Ok, no one did. Very nice! That'll be really useful! Smile
Haha, no need for responses or feedback really, just requests or questions about the scripts and how to use them.
Come on people, give the man some work! Big Grin
Eh, i'm waiting for HPL3 to see if i can register my own modules so that i can finally use the import script entity so that i can avoid constant copy-and-paste.
HPL3 module support? I'm totally piqued! I also dislike having to copy and paste over my scripts when I want something cool for my map(s).

EDIT: One thing I wish we could do was use the global.hps for functions like these, similar to how the inventory.hps can be used to script item combination callbacks, regardless of what map you're in.
I would like to know in detail on how to make sounds play at random times?
flamez3 -- timers with random durations.
(12-04-2011, 10:44 PM)palistov Wrote: [ -> ]flamez3 -- timers with random durations.
Thanks