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
Script Help Can someone solve this ?
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#1
Can someone solve this ?

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 ???

03-13-2014, 08:12 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Can someone solve this ?

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);
}

Trying is the first step to success.
(This post was last modified: 03-13-2014, 09:23 AM by FlawlessHappiness.)
03-13-2014, 09:23 AM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#3
RE: Can someone solve this ?

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/amn..._functions


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

(This post was last modified: 03-13-2014, 09:30 AM by Straxedix.)
03-13-2014, 09:30 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Can someone solve this ?

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.

Trying is the first step to success.
(This post was last modified: 03-13-2014, 09:58 AM by FlawlessHappiness.)
03-13-2014, 09:58 AM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#5
RE: Can someone solve this ?

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

03-13-2014, 11:24 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: Can someone solve this ?

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.

Trying is the first step to success.
(This post was last modified: 03-13-2014, 12:12 PM by FlawlessHappiness.)
03-13-2014, 12:12 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#7
RE: Can someone solve this ?

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

03-13-2014, 12:20 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#8
RE: Can someone solve this ?

(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

Trying is the first step to success.
(This post was last modified: 03-13-2014, 02:24 PM by FlawlessHappiness.)
03-13-2014, 12:37 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#9
RE: Can someone solve this ?

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).

03-13-2014, 05:23 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#10
RE: Can someone solve this ?

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

(This post was last modified: 03-13-2014, 07:01 PM by Straxedix.)
03-13-2014, 07:00 PM
Find




Users browsing this thread: 4 Guest(s)