Scripts / I try entity in zone

Author
Message
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 9th Apr 2021 06:20
All the options as seen below where I try for getting trigger an ENTITY in a zone.
No worky? Was placed on a trigger zone... then moved an entity into it

function plrinzone2_init(e)
end

function plrinzone2_main(e)
--if g_Entity[e]['plrinzone'] == 1 then <<== **-works-**

--if g_Entity[e]['entityinzone'] == 1 then <<== no work...
--if g_Entity[8]['entityinzone'] == 1 then <<== no work...
--if GetEntityInZone(8) == 1 then <<== no work...
if GetEntityInZone(e) == 1 then <<== no work...

Text(11,11,1,"Object in Zone" )
else
Text(11,11,1,"Not there yet" )
end

end -- main

So I watched Ed "iWork" to see if he knows-- no luck- any ideas?
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 9th Apr 2021 13:03
doesn't look like it works, maybe try amen's solution
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 9th Apr 2021 16:12
Nice helps AM, looks very promising. Thanks smallg.


PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Apr 2021 17:02
The GetEntityInZone() command is pants, basically just returns 1 if any entity is in the zone (or is supposed to) but it may only work on specific kinds of entity, I did research it all a while back but can't remember all the details.
Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-04-20 01:28:00
Your offset time is: 2024-04-20 01:28:00