Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting help
Mine Turtle Offline
Senior Member

Posts: 647
Threads: 32
Joined: Mar 2011
Reputation: 29
#1
Scripting help

hey everyone. im new to scripting and such things when it comes to custom stories, could maybe someone help me script one of my stories like i need it? it would be much appreaciated! leave replies if you can! ^^
12-04-2011, 03:39 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Scripting help

What do you need help with

12-04-2011, 04:12 PM
Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#3
RE: Scripting help

I Suggest you Watch/Read Some tutorials on youtube or on the Wiki and go to this site

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

And Atleast Attempt Scripting, And if you need help with it you make a thread asking, "What am I doing wrong?"/ "Whats wrong with my script"

We'll be glad to help but how are you going to learn if you never try.

-Grey Fox

Current Project
Forgotten
12-04-2011, 04:57 PM
Find
Mine Turtle Offline
Senior Member

Posts: 647
Threads: 32
Joined: Mar 2011
Reputation: 29
#4
RE: Scripting help

(12-04-2011, 04:57 PM)GreyFox Wrote: I Suggest you Watch/Read Some tutorials on youtube or on the Wiki and go to this site

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

And Atleast Attempt Scripting, And if you need help with it you make a thread asking, "What am I doing wrong?"/ "Whats wrong with my script"

We'll be glad to help but how are you going to learn if you never try.

-Grey Fox
since i posted this topic, ive been thinking of trying it out, and all day ive been watching tutorials. i WILL learn! XD
(12-04-2011, 04:12 PM)flamez3 Wrote: What do you need help with
i need some help with scripting my map. could you help me with it/ do it for me? ^^id really appreaciate it!
(This post was last modified: 12-04-2011, 11:38 PM by Mine Turtle.)
12-04-2011, 11:08 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#5
RE: Scripting help

(12-04-2011, 11:08 PM)darkadders Wrote:
(12-04-2011, 04:57 PM)GreyFox Wrote: I Suggest you Watch/Read Some tutorials on youtube or on the Wiki and go to this site

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

And Atleast Attempt Scripting, And if you need help with it you make a thread asking, "What am I doing wrong?"/ "Whats wrong with my script"

We'll be glad to help but how are you going to learn if you never try.

-Grey Fox
since i posted this topic, ive been thinking of trying it out, and all day ive been watching tutorials. i WILL learn! XD
(12-04-2011, 04:12 PM)flamez3 Wrote: What do you need help with
i need some help with scripting my map. could you help me with it/ do it for me? ^^id really appreaciate it!
I'll help you, but your not going to learn how to script making me do it. Big Grin

(This post was last modified: 12-04-2011, 11:40 PM by flamez3.)
12-04-2011, 11:40 PM
Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#6
RE: Scripting help

good for you for watching tutorials all day.

As for what you need help with ask.

I'm fine with getting you started (starting is always the hardest)
Once you get used to it, it'll be alot easier and quicker.

-Grey Fox

Current Project
Forgotten
12-05-2011, 01:04 AM
Find
Mine Turtle Offline
Senior Member

Posts: 647
Threads: 32
Joined: Mar 2011
Reputation: 29
#7
RE: Scripting help

(12-05-2011, 01:04 AM)GreyFox Wrote: good for you for watching tutorials all day.

As for what you need help with ask.

I'm fine with getting you started (starting is always the hardest)
Once you get used to it, it'll be alot easier and quicker.

-Grey Fox
what i find most confusing about scripting is what things mean. like, do i place something in the () with ''void OnStart ()'' and so on. i get easily confused with complicated stuff, but when i learn it i really learn it ^^, could you maybe help me get started or something? a tutorial on youtube perhaps?

cheers ^^
(12-04-2011, 11:40 PM)flamez3 Wrote:
(12-04-2011, 11:08 PM)darkadders Wrote:
(12-04-2011, 04:57 PM)GreyFox Wrote: I Suggest you Watch/Read Some tutorials on youtube or on the Wiki and go to this site

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

And Atleast Attempt Scripting, And if you need help with it you make a thread asking, "What am I doing wrong?"/ "Whats wrong with my script"

We'll be glad to help but how are you going to learn if you never try.

-Grey Fox
since i posted this topic, ive been thinking of trying it out, and all day ive been watching tutorials. i WILL learn! XD
(12-04-2011, 04:12 PM)flamez3 Wrote: What do you need help with
i need some help with scripting my map. could you help me with it/ do it for me? ^^id really appreaciate it!
I'll help you, but your not going to learn how to script making me do it. Big Grin
i want this story of mine scripted n such. nothing complex, just playing different sounds when walking to places n stuff like that. i also need help with scripting an audio file to be played throughout maps ^^. ALSO im making a new mob (nothing complex), just this ghastly empty soulless creature that haunts a forest outside your home in the story ^^.
(This post was last modified: 12-05-2011, 12:04 PM by Mine Turtle.)
12-05-2011, 12:02 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#8
RE: Scripting help


Quote:void OnStart
{
AddEntityCollideCallback("ScriptArea_1", "Player", "Scare1", false, 1)
}

void Scare1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "sound.snt", "Player", 0, false);
}
You would use that to make a noise play somewhere.

You would need a global.hps file to have a sound playing through out different maps.

(This post was last modified: 12-05-2011, 12:50 PM by flamez3.)
12-05-2011, 12:49 PM
Find
Mine Turtle Offline
Senior Member

Posts: 647
Threads: 32
Joined: Mar 2011
Reputation: 29
#9
RE: Scripting help

(12-05-2011, 12:49 PM)flamez3 Wrote:
Quote:void OnStart
{
AddEntityCollideCallback("ScriptArea_1", "Player", "Scare1", false, 1)
}

void Scare1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "sound.snt", "Player", 0, false);
}
You would use that to make a noise play somewhere.

You would need a global.hps file to have a sound playing through out different maps.
AWESOME!! Big Grin thanks a bunch! can i use an mp3 file to play the noise? or do i need to convert it to another format? (snt). do you have a code for playing music? ^^
12-05-2011, 01:19 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#10
RE: Scripting help

(12-05-2011, 01:19 PM)darkadders Wrote:
(12-05-2011, 12:49 PM)flamez3 Wrote:
Quote:void OnStart
{
AddEntityCollideCallback("ScriptArea_1", "Player", "Scare1", false, 1)
}

void Scare1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "sound.snt", "Player", 0, false);
}
You would use that to make a noise play somewhere.

You would need a global.hps file to have a sound playing through out different maps.
AWESOME!! Big Grin thanks a bunch! can i use an mp3 file to play the noise? or do i need to convert it to another format? (snt). do you have a code for playing music? ^^
You have to convert them to a .ogg fiel, than you have to make another file with the same name but with a .snt file extension. And put this in the .snt file


Quote:</properties>

To play music:

Quote:PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);


Plays music.
asMusicFile - the music to play + extension .ogg
abLoop - determines whether a music track should loop
afVolume - volume of the music
afFadeTime - time in seconds until music reaches full volume
alPrio - priority of the music. Note that only the music with the highest priority can be heard! 0 - highest, 1 - lower, etc

(This post was last modified: 12-05-2011, 01:38 PM by flamez3.)
12-05-2011, 01:37 PM
Find




Users browsing this thread: 1 Guest(s)