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
Hatch Won't Lock!
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#11
RE: Hatch Won't Lock!

(03-02-2015, 05:04 AM)Romulator Wrote:
(03-02-2015, 12:54 AM)FlawlessHappiness Wrote:
(03-01-2015, 10:13 PM)Mudbill Wrote: The only thing you won't be able to add (if I remember correctly) is the string that tells where this door is leading.

With a little more scripting you can easily simulate it.
It'll get more advanced, and seem like a work around, but meh, if you want it, you can do it.

You can either do it by scripting or by level editting.

By scripting you'd use "GetEntityPosX" (for all axises) and check both the area and the player, when looking at the area.

If the distance between them is close enough, show a message.


Or, you could create another area. If the player is inside this area, show the message. (And enable the level-change area, perhaps)

Or a simpler, but not as great method, making use of a Sign Script Area.

If you can make the sign 'clickable' and changemap, then that is probably the easiest method. Not sure why I didn't think about that.

I don't know if it works either.

Trying is the first step to success.
(This post was last modified: 03-02-2015, 08:38 AM by FlawlessHappiness.)
03-02-2015, 08:38 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#12
RE: Hatch Won't Lock!

I've tried that, and if the SignArea covers the interaction area, you cannot interact with it anymore. If the interaction area covers the SignArea, then you cannot see the sign anymore. They kinda kill each other.

03-02-2015, 08:51 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#13
RE: Hatch Won't Lock!

(03-02-2015, 08:51 AM)Mudbill Wrote: I've tried that, and if the SignArea covers the interaction area, you cannot interact with it anymore. If the interaction area covers the SignArea, then you cannot see the sign anymore. They kinda kill each other.

Yep, yep, that's how it works. I was thinking what if the sign IS the interaction area.

Trying is the first step to success.
(This post was last modified: 03-02-2015, 09:46 PM by FlawlessHappiness.)
03-02-2015, 09:46 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#14
RE: Hatch Won't Lock!

But those are two different areas. SignArea vs ScriptArea?

03-02-2015, 10:59 PM
Find
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
#15
RE: Hatch Won't Lock!

Add a function that starts when player looks at area. Than SetMessage with very short time, like 0.01f. Try it, it may work.

03-03-2015, 10:28 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#16
RE: Hatch Won't Lock!

It displays a message, but it will not display for as long as the player looks. Because SetMessage is timed AND it fades in, even if you have a short timer loop, it will continously fade in, dip to black, fade back in etc. which is ugly.

03-03-2015, 11:02 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#17
RE: Hatch Won't Lock!

(03-03-2015, 10:28 AM)Darkfire Wrote: Add a function that starts when player looks at area. Than SetMessage with very short time, like 0.01f. Try it, it may work.

And you will also have the problem that looking for a veeeeeeeeeeeeeeeeery long distance, the message will still show.

(03-02-2015, 10:59 PM)Mudbill Wrote: But those are two different areas. SignArea vs ScriptArea?

True. But if you can do it with any entity, why not do it with a sign area?

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

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#18
RE: Hatch Won't Lock!

(03-03-2015, 12:02 PM)FlawlessHappiness Wrote: True. But if you can do it with any entity, why not do it with a sign area?

How do you mean? The reason I said you could do it with any entity, was because it's not the entity that does it, it's the area. You can always add a ScriptArea on any entity, thus effectively make the entity the ones that's interacted with. You can't add interaction elements to a SignArea (?).

03-03-2015, 12:32 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#19
RE: Hatch Won't Lock!

(03-03-2015, 12:32 PM)Mudbill Wrote:
(03-03-2015, 12:02 PM)FlawlessHappiness Wrote: True. But if you can do it with any entity, why not do it with a sign area?

How do you mean? The reason I said you could do it with any entity, was because it's not the entity that does it, it's the area. You can always add a ScriptArea on any entity, thus effectively make the entity the ones that's interacted with. You can't add interaction elements to a SignArea (?).

What aboooooooooooout

SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);
Calls a function when the player interacts with a certain entity.
Callback syntax: void MyFunc(string &in asEntity)

asName - internal name
asCallback - function to call
abRemoveOnInteraction - determines whether the callback should be removed when the player interacts with the entity


Handled in the script of course.

Trying is the first step to success.
(This post was last modified: 03-03-2015, 12:51 PM by FlawlessHappiness.)
03-03-2015, 12:51 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#20
RE: Hatch Won't Lock!

But does that work with just any SignArea? I wouldn't expect it to work with anything but ScriptAreas, aside from entities of course.

03-03-2015, 02:01 PM
Find




Users browsing this thread: 2 Guest(s)