AveryLuna
Junior Member
Posts: 10
Threads: 1
Joined: Dec 2012
Reputation:
0
|
RE: I need help getting maps made
(12-07-2012, 01:23 AM)Acies Wrote: Thanks, that's a whole lot to figure out, especially since scripting I haven't done much with. I'll have to reread it quite a bit though, but I think I can figure that out, thanks! Thanks for the voice changing link, I'll check it out imediately! (12-07-2012, 01:23 AM)Acies Wrote: You can use random timers to trigger lightning sounds + effects. Combining that with sanity loss and character sounds.. Well start out with adding a timer:
For example when entering the map - or entering an area - or option C of your choice.
AddTimer("LightingStrike", RandFloat(8.0, 15.5), "LightingStrikeT");
The RandFloat means what it will randomize a value between 8-15 seconds. You can change this to whatever you want. The difference between RandInt and RandFloat is that "Float" allows for values with decimals ~ 9.3 seconds for example. "Int" is numbers without decimals.
void LightingStrikeT(string &in asTimer)
{AddTimer("LightingStrike", RandFloat(8.0, 15.5), "LightingStrikeT");
//Play various sounds
//Remove sanity
Adding the timer within the function it executes will allow it to repeat itself. To remove the timer - simply have a
RemoveTimer(etc. etc.) within another function. You might also want to check for the general location of the player (optimizing in case you have a large map / or want localized sounds). Simply create large scriptareas and change a variable from 0 to 1 upon entering the area. Change that value back to 0 if the player leaves the area.
Adding this within your timer function will execute lines below this if the value is set to 1 (ergo player is in that area).
if(GetLocalVarInt("PlayerInAreaX") == 1)
That would allow you to play sounds near the player, and possibly have lightning effects (turning a flickering pointlight on and off for example) which occur where the player is, at a random time.
To get a female voice for your character you will need to perform a full conversion. This link might help you further:
http://www.frictionalgames.com/forum/thread-19019.html
|
|
12-07-2012, 02:34 AM |
|