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
Does anyone have links to scripting for scary events?
zeravia Offline
Member

Posts: 228
Threads: 16
Joined: Jul 2011
Reputation: 1
#1
Does anyone have links to scripting for scary events?

i want to trigger some scary events like suits of armor loosing their heads and bug scares. but i can't seem to find anything on them, i don't know what the commands are myself, does anyone have links to all the scripting of scary events like those?

Diary of a madman -Onhold

New - [Image: at_1374739.png]
08-16-2011, 11:06 AM
Website Find
graykin Offline
Senior Member

Posts: 317
Threads: 12
Joined: Oct 2008
Reputation: 4
#2
RE: Does anyone have links to scripting for scary events?

There is a section on the HPL2 Wiki with all of the Script commands listed and explained (for the most part) fairly well.

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

If you're completely unfamiliar with programming, you might want to check out a few tutorials (some on the Wiki, some not) on some basic principles, but it should be easy enough to learn.

08-16-2011, 07:39 PM
Find
zeravia Offline
Member

Posts: 228
Threads: 16
Joined: Jul 2011
Reputation: 1
#3
RE: Does anyone have links to scripting for scary events?

(08-16-2011, 07:39 PM)graykin Wrote: There is a section on the HPL2 Wiki with all of the Script commands listed and explained (for the most part) fairly well.

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

If you're completely unfamiliar with programming, you might want to check out a few tutorials (some on the Wiki, some not) on some basic principles, but it should be easy enough to learn.

i have that page open while doing this, but i don't know what is what there... how do i know what i need to activate what is what i'm talking about...

Diary of a madman -Onhold

New - [Image: at_1374739.png]
08-16-2011, 07:49 PM
Website Find
graykin Offline
Senior Member

Posts: 317
Threads: 12
Joined: Oct 2008
Reputation: 4
#4
RE: Does anyone have links to scripting for scary events?

So what you're asking for is, basically, just general guidance on what specific scripts do and how you utilize them?

It might help if you had a question about a specific thing you wanted to accomplish. Like, say, you wanted a suit of armor to fall to pieces when the player interacts with a door, or if you wanted a monster to spawn when you reach a certain portion of the map.

But basically, you need three key things--a Script Area in your map, a function that gets called when the player either collides into or interacts with the Script Area, and the functions within that function that actually do whatever it is you want.

If you wanted the chair to get skyrocketed, you would call the function:

AddPropImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem);

"string& asName" would be replaced with whatever the name of the chair is.
"float afX" "float afY" "float afZ" would be replaced with how strongly you wanted to push the chair in the x, y, and z axes respectively (i.e. 5.0f, 25.0f, 0.0f --- this would push the chair with a force of "5" in the x-axis, and a force of "25" in the y-axis--or directly upwards. It would not move at all in the z-axis)
"string& asCoordSystem" would just be replaced with, simply, "world."

If you wanted a monster to appear you would have to place a monster on the map with the Activated checkbox unchecked, and you would use the function:

SetEntityActive(string& asName, bool abActive);

"asName" would be the name of the monster
"abActive" would be "True" if you wanted the monster to appear. "False" if you wanted the monster to disappear.

The best thing to do is just to start fiddling with the functions, doing simple things like that. If you have any specific questions, we'll be glad to help. As it is, I hope this helped at least a little bit. Smile

08-17-2011, 01:12 AM
Find
zeravia Offline
Member

Posts: 228
Threads: 16
Joined: Jul 2011
Reputation: 1
#5
RE: Does anyone have links to scripting for scary events?

Well, at the moment i am trying to get my Demo running but that's just a bit of story telling, I can't seem to get my Notes and Sound files to work together... :\

Diary of a madman -Onhold

New - [Image: at_1374739.png]
08-17-2011, 08:33 AM
Website Find




Users browsing this thread: 2 Guest(s)