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
GetEntitiesCollide
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#1
GetEntitiesCollide

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: (Select All)
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.

05-05-2012, 10:33 PM
Find
Theforgot3n1 Offline
Member

Posts: 192
Threads: 20
Joined: Apr 2012
Reputation: 6
#2
RE: GetEntitiesCollide

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.

Confusion: a Custom Story - Ch1 for play!
http://www.frictionalgames.com/forum/thread-15477.html
About 50% built.
Delayed for now though!
05-05-2012, 10:39 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: GetEntitiesCollide

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

Tutorials: From Noob to Pro
05-05-2012, 11:10 PM
Website Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#4
RE: GetEntitiesCollide

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

05-06-2012, 01:04 AM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#5
RE: GetEntitiesCollide

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.

Noob scripting tutorial: From Noob to Pro

05-06-2012, 01:14 AM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#6
RE: GetEntitiesCollide

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

05-06-2012, 01:52 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
RE: GetEntitiesCollide

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

Tutorials: From Noob to Pro
(This post was last modified: 05-06-2012, 02:19 AM by Your Computer.)
05-06-2012, 02:16 AM
Website Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#8
RE: GetEntitiesCollide

(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

05-06-2012, 02:26 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#9
RE: GetEntitiesCollide

Try

GetEntitiesCollide("PlayerHands", "ScriptArea");

or

PlayerHands_lantern

05-06-2012, 08:46 AM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#10
RE: GetEntitiesCollide

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

(This post was last modified: 05-06-2012, 03:57 PM by Homicide13.)
05-06-2012, 03:48 PM
Find




Users browsing this thread: 1 Guest(s)