Frictional Games Forum (read-only)
[SCRIPT] Can someone solve this ? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Can someone solve this ? (/thread-24825.html)

Pages: 1 2


Can someone solve this ? - Straxedix - 03-13-2014

Hi everybody and Good Morning Smile

void SetMessage(string& asTextCategory, string& asTextEntry, float afTime);
Displays a message on the screen.

asTextCategory - the category in the .lang file
asTextEntry - the entry in the .lang file
afTime - determines how long the message is displayed. If time is < =0 then the life time is calculated based on string length.

i wan't this and here is .lang file

<CATEGORY Name="Place">
<Entry Name="Wake">What is this place i know it from somewhere...Like i was already here.</Entry>
</CATEGORY>

so i'm asking my self did need something like:AddEntityCollideCallback for area or something ???


RE: Can someone solve this ? - FlawlessHappiness - 03-13-2014

It doesn't matter what kind of function it is inside, as long as it's inside a function.

But yes, you need something like that.

For starters, try placing it in your void Onstart()

It would look like this:

void OnStart()
{
SetMessage("Place", "Wake", 0);
}


RE: Can someone solve this ? - Straxedix - 03-13-2014

So i need make area and timer ???

Also can explain how to door's HARD close by it self i search here but i didn't found it xD

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions


And i forgot it's doesn't work i copy like you set and not bug just enter and no text...


RE: Can someone solve this ? - FlawlessHappiness - 03-13-2014

Please post your full script.

Yes, you could create a collide-function, but you don't have to create a timer.

To close a door by itself you have to use the function
void AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);

Use Ctrl+F or Cmd+F to find the function in your link.


RE: Can someone solve this ? - Straxedix - 03-13-2014

I see you didn't understand me

Look explain you

I have area script when player turn behind i need just .hps file (script) when doors closed HARD LIKE EXPLOSION when he looks in doors (that's my script he turn behind and behind are doors)
just make me .hps file to copy it PLEASE


RE: Can someone solve this ? - FlawlessHappiness - 03-13-2014

I'm sorry, but I'm not going to create the whole script file for you. (Don't have the time right now)
You'll have to learn about it yourself a little bit Smile
The line you have to use is: void AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);

You just need to learn the basics of scripting to be able to place it the right place.


RE: Can someone solve this ? - Straxedix - 03-13-2014

Ah ok but what is float afX afY afZ ???


RE: Can someone solve this ? - FlawlessHappiness - 03-13-2014

(03-13-2014, 12:20 PM)Straxedix Wrote: Ah ok but what is float afX afY afZ ???

The amount of push on the X axis, Y axis and the Z axis

float is a number with 1 decimal


RE: Can someone solve this ? - Mudbill - 03-13-2014

Basically putting 10, 0, 0 would push the entity with force "10" in the positive X direction (which is the red arrow in the level editor).


RE: Can someone solve this ? - Straxedix - 03-13-2014

Hmmmmmm

It's good idea to make a whoole maps and levels then add scripts what you guys think ^.^ ???







I BECAME A MEMBER!!! Big Grin