Homicide13
Senior Member
Posts: 323
Threads: 41
Joined: Nov 2010
Reputation:
14
|
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
void OnStart(){
loop("TestTimer"); }
void loop(string& Timer){
int test; if(GetEntitiesCollide("Player","ScriptArea_1")) test = 1; else test = 2; AddDebugMessage(""+test, false); AddTimer(Timer,1,"loop"); }
always displays "2", even if the script area covers the entire level.
|
|
05-05-2012, 10:33 PM |
|
Theforgot3n1
Member
Posts: 192
Threads: 20
Joined: Apr 2012
Reputation:
6
|
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.
|
|
05-05-2012, 10:39 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: GetEntitiesCollide
"Player" is only considered (supported) for the other collision detection functions.
|
|
05-05-2012, 11:10 PM |
|
Homicide13
Senior Member
Posts: 323
Threads: 41
Joined: Nov 2010
Reputation:
14
|
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 |
|
Cranky Old Man
Posting Freak
Posts: 986
Threads: 20
Joined: Apr 2012
Reputation:
38
|
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.
|
|
05-06-2012, 01:14 AM |
|
Homicide13
Senior Member
Posts: 323
Threads: 41
Joined: Nov 2010
Reputation:
14
|
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. )
haha And ideally one would edit the wiki AND reply to said forum post.
|
|
05-06-2012, 01:52 AM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
(This post was last modified: 05-06-2012, 02:19 AM by Your Computer.)
|
|
05-06-2012, 02:16 AM |
|
Homicide13
Senior Member
Posts: 323
Threads: 41
Joined: Nov 2010
Reputation:
14
|
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 |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
RE: GetEntitiesCollide
Try
GetEntitiesCollide("PlayerHands", "ScriptArea");
or
PlayerHands_lantern
|
|
05-06-2012, 08:46 AM |
|
Homicide13
Senior Member
Posts: 323
Threads: 41
Joined: Nov 2010
Reputation:
14
|
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 |
|
|