Frictional Games Forum (read-only)
GetEntitiesCollide - 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: GetEntitiesCollide (/thread-15272.html)

Pages: 1 2


GetEntitiesCollide - Homicide13 - 05-05-2012

Does GetEntitiesCollide not support detecting whether a player is within a script area or not? Because for some reason this function is returning false for me even if I know that it should be true.

For example, the code
PHP Code:
void OnStart(){

    
loop("TestTimer");
}

void loop(stringTimer){

    
int test;
    if(
GetEntitiesCollide("Player","ScriptArea_1")) test 1;
    else 
test 2;
        
    
AddDebugMessage(""+testfalse);
    
    
AddTimer(Timer,1,"loop");

always displays "2", even if the script area covers the entire level.


RE: GetEntitiesCollide - Theforgot3n1 - 05-05-2012

I tried to use GetEntitiesCollide with the player and an area, experimenting in every possible way, only to find out that the bool just doesn't work when used with the player. It was a huge let-down and i wasted lots of time on it.

Basically I first tried with "player" and "area", until I replaced "player" with "an entity" and the bool reacted correctly.


RE: GetEntitiesCollide - Your Computer - 05-05-2012

"Player" is only considered (supported) for the other collision detection functions.


RE: GetEntitiesCollide - Homicide13 - 05-06-2012

;_; haha I wish that bit of information was listed in the wiki, it would saved me a bit of a headache.


RE: GetEntitiesCollide - Cranky Old Man - 05-06-2012

Actually, Your Computer: You can spare yourself maybe 10-20 similar future questions, but editing the wiki instead of replying to forum posts that will be forgotten the next week. I personally know how overwhelming wiki editing can be - I'm just saying that as long as you have your amazing enthusiasm to help out, that's where you'd do the most good.


RE: GetEntitiesCollide - Homicide13 - 05-06-2012

I would edit it myself but as far as I know regular users can't edit it (or at least certain sections of it, such as the "Engine Scripts" section). (Though correct me if I'm wrong and I'll gladly do it. Tongue)

haha And ideally one would edit the wiki AND reply to said forum post. Wink


RE: GetEntitiesCollide - Your Computer - 05-06-2012

(05-06-2012, 01:14 AM)Cranky Old Man Wrote: Actually, Your Computer: You can spare yourself maybe 10-20 similar future questions, but editing the wiki instead of replying to forum posts that will be forgotten the next week. I personally know how overwhelming wiki editing can be - I'm just saying that as long as you have your amazing enthusiasm to help out, that's where you'd do the most good.

I only like editing articles that i created, since i like to use the plain text editor of the Wiki (therefore i know i won't mess up the article by attempting to edit it). The WYSIWYG editor of the wiki (as any WYSIWYG editor) tends to mess things up and makes it more difficult to edit using the source editor. If it didn't save changes as you're switching to the source editor, then i would consider editing the Wiki articles more. Until then, long articles will remain unedited by me.

@Homicide13 All you need is a Wiki account. The whole purpose of a wiki is for community contributions.


RE: GetEntitiesCollide - Homicide13 - 05-06-2012

(05-06-2012, 02:16 AM)Your Computer Wrote: @Homicide13 All you need is a Wiki account. The whole purpose of a wiki is for community contributions.
Ah, I was under the impression that certain articles were off limits because of how important they are.

Time to edit all the things... ;d


RE: GetEntitiesCollide - palistov - 05-06-2012

Try

GetEntitiesCollide("PlayerHands", "ScriptArea");

or

PlayerHands_lantern


RE: GetEntitiesCollide - Homicide13 - 05-06-2012

(05-06-2012, 08:46 AM)palistov Wrote: Try

GetEntitiesCollide("PlayerHands", "ScriptArea");

or

PlayerHands_lantern
;D The real question I have is how you figured out those objects existed, though if I had to guess I would probably say you just snooped around in the main game scripts. haha

But thanks, that's certainly helpful.