Frictional Games Forum (read-only)

Full Version: Script help D: please
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, im currently working on a custom story for amnesia, im good at map building, but scripting...i suck...really bad xD

I'm just posting here to ask if anyone is willing to help script my custom story for me, you will of cause get credit and i would greatly appreciate it.

I have Skype, so if anyone is willing please send me a message on here and i will add you on Skype! Smile


Please somebody?

If somebody will please help me, if its any persuasion i have a minecraft server, guess i could give you mod? haha i dont know i just really really need someone to help me!
i could try help ya out ^^
you know, scripting is waaay easier then you thinkWink
(07-08-2012, 07:58 PM)darkadders Wrote: [ -> ]Thats brilliant! thank you very much, ill send you a message right now with my Skype details, please add me.
We can then discuss this on there Smile

Yeh, but i guess you have to be a slight natural at it too to understand it. as for me...i dont understand a bit xD
HPL2 is the first experience I've had with a level editor and scripting. I started a few months ago and now I'm pretty good at it. It doesn't take any sort of natural ability, so long as you know how to type and are somewhat patient.

If you take the time to familiarize yourself with the different functions/callbacks and various syntax's associated with each located here:

http://wiki.frictionalgames.com/hpl2/amn..._functions


You will be good to go. Most importantly - and I cannot stress this enough - study other script files, either (good) mods or the work done by Frictional Games themselves.
(07-08-2012, 09:33 PM)andyrockin123 Wrote: [ -> ]HPL2 is the first experience I've had with a level editor and scripting. I started a few months ago and now I'm pretty good at it. It doesn't take any sort of natural ability, so long as you know how to type and are somewhat patient.

If you take the time to familiarize yourself with the different functions/callbacks and various syntax's associated with each located here:

http://wiki.frictionalgames.com/hpl2/amn..._functions


You will be good to go. Most importantly - and I cannot stress this enough - study other script files, either (good) mods or the work done by Frictional Games themselves.
i really wouldnt recommend looking through some .hps files from the actual game. their scripting is so compact and neat, its tough to understand.
You can EASILY learn how to do scripting.
Download a simple campaign. Dissect it a bit.
I found out easy after looking through those. It's been 4 days I got a lot of stuff I can easily do.
hps files you open with notepad
map files you open with level editor
snt files with notepad
lang files with notepad
cfg files with notepad
Also, if you haven't already, I'd highly suggest getting notepad++ (some people prefer geany, but I never tried it). Notepad++ allows you to view files in different scripting languages such as c++, c# and xml. It also shows the column number in the left margin, greatly simplifying error finding.

Here's a DL link (no viruses): http://notepad-plus-plus.org/download/v6.1.5.html
(07-09-2012, 12:59 AM)andyrockin123 Wrote: [ -> ]It also shows the column number in the left margin, greatly simplifying error finding.

Here's a DL link (no viruses): http://notepad-plus-plus.org/download/v6.1.5.html
You can press Ctrl+G (AKA Go to) and enter a number line it will take you to it.
HPL2 is a very easy language to learn. I am self-taught, so I'll explain how I did it;
I started with this - http://wiki.frictionalgames.com/hpl2/tut...cks_a_door
Bookmarked this -
http://wiki.frictionalgames.com/hpl2/amn..._functions
Did this -
http://wiki.frictionalgames.com/hpl2/thi...xt/notepad
Then experimented a whole lot. Starting with trying to resemble some game scripts I've read.

Look at this: (HPL)
Spoiler below!

void InteractLargeGate(string &in asEntity)
{
PlaySoundAtEntity("guardboo", "guardian_distant1", "AreaLargeGate", 3.0f, false);
PlaySoundAtEntity("thunderboo", "general_thunder.snt", "AreaLargeGate", 0.0f, false);

PlayGuiSound("close_gate.ogg", 0.4f);

AddTimer("1", 0.4f, "TimerLargeGate");
AddTimer("2", 0.1f, "TimerLargeGate");
AddTimer("3", 0.6f, "TimerLargeGate");
AddTimer("4", 2.0f, "TimerLargeGate");
}

Then this: (GSC)
Spoiler below!


while(1)
{
players = get_players();
for(i=0;i {

weap = players[i] getcurrentweapon();
if(!isDefined(weap) || weap == "none" || weap == "zombie_perk_bottle_doubletap" || weap == "zombie_perk_bottle_jugg" || weap == "zombie_perk_bottle_revive" || weap == "zombie_perk_bottle_sleight" || weap == "mine_bouncing_betty" || weap == "syrette" || weap == "zombie_knuckle_crack" || weap == "zombie_bowie_flourish" )
{
continue;
}
if ( players[i] GetAmmoCount( weap ) > 5)
{
continue;
}
if ( players[i] maps\_laststand::player_is_in_laststand() )
{
continue;
}
else if (players[i] GetAmmoCount( weap ) < 5 && players[i] GetAmmoCount( weap ) > 0)
{
if (level.player_ammo_low == 0)
{
level.player_ammo_low = 1;
players[i] thread add_low_ammo_dialog();
players[i] thread ammo_dialog_timer();
level waittill("send_dialog_reminder");
level.player_ammo_low = 0;
}

}
else if (players[i] GetAmmoCount( weap ) == 0)
{
if(!isDefined(weap) || weap == "none")
{
continue;
}
level.player_ammo_out = 1;
players[i] thread add_no_ammo_dialog( weap );
wait(20);
level.player_ammo_out = 0;
}
else
{
continue;
}
}
wait(.5);
}


HPL2 can become very advanced if you know what you're doing, but almost all of that is not particularly useful. A great story can be made with an average scripting knowledge. Keep experimenting and finding out what works and what doesn't. Even try to make what you wrote as compact as possible. Learning scripting is great because you can do what you want to do Wink

But, sometimes people just can't learn alone, so...feel free to PM me questions you may have.