Product Chat / Can enemy open doors ?

Author
Message
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 8th Mar 2017 20:07
I would like the enemy's to be able open doors . Is this possible yet ?
Lance

Joined 22nd Jul 2003

PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 8th Mar 2017 20:12
I think Lee said this could now be possible with the new AI and a little scripting ...
He hasn't showed us how yet .... Maybe he will do it with the new AI twitch's once he gets it finished ...
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 8th Mar 2017 22:39
I've modified a bit ai_soldier.lua file just for video purpose, in your case you should rename it, so don't overwrite the original one.



Attach above script to the enemies you want being able to open the door.

Attach the script attached below to the door.

I've use chain door, masked soldier, and it works, video tomorrow, not time to upload now.
In the video you'll can notice I'm far away from the door, just want to be sure, it is not opening becaiuse the player distance, but because the soldier proximity.
hth


Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

Attachments

Login to view attachments
PM
Jerry Tremble
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 8th Mar 2017 23:59
Nice, thanks 3com! Haven't tried it yet but I know it will be useful!
Desktop: i7 4770@3.4Ghz (passmark 9809), 12GB RAM, Win 10/64, GeForce GTX 1080 (passmark 12006), 1TB SSD, 1TB HDD; Laptop: i7 4800MQ@2.7Ghz, 16GB RAM, Win 10/64, GeForce GTX870M , 1TB SSD.
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 10th Mar 2017 16:53
Glad you like Jerry.

ai open door test1



3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
devlin
10
Years of Service
User Offline
Joined: 12th Feb 2014
Location:
Posted: 16th Mar 2017 07:59
very nice, thanks
PM
SpaceWurm
Game Guru Backer
13
Years of Service
User Offline
Joined: 11th Nov 2011
Playing:
Posted: 16th Mar 2017 10:46 Edited at: 27th Jul 2019 14:20
Nicely done 3com!
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 16th Mar 2017 11:46
Thanks , the ai_opendoor works great .. I tried it on several doors .

Lance
Lance

Joined 22nd Jul 2003

PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 16th Mar 2017 13:39
You all are welcome.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 19th Mar 2017 02:51
In FPSC this was possible with a single command. But I believe what that did was every step the NPC's would take they would send an activate signal to in front of them. I'm assuming it works differently in Game Guru?
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GT 740
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 19th Mar 2017 18:40
Quote: "But I believe what that did was every step the NPC's would take they would send an activate signal to in front of them. I'm assuming it works differently in Game Guru?"

Not sure how it work in FPSC, I really start with Reloaded.
But yes you are right, as you can notice in soldier.lua above, about isNPC[e] = 1, that key tell to the door, I'm NPC, therefore not the player, anyway is their password to go thru.
Fortunatelly workarounds working fine in GG.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 19th Mar 2017 19:43
Quote: "In FPSC this was possible with a single command. But I believe what that did was every step the NPC's would take they would send an activate signal to in front of them. I'm assuming it works differently in Game Guru?"


I imagine behind the scenes FPSC is doing a similar thing to what 3com has posted, it may even use ray casting instead as you mention. It's just that FPSC probably had it coded already so you only had to use one command. With Game Guru these things have yet to be added, so you have to do it yourself. We don't have ray casting here so a distance check is about as good as it gets. Probably faster as well than having raycasts on all NPC's and we know speed is still a concern for many.

You could even add other numbers to the " isNPC[e] = 1 " part to have some NPC's only have keys for certain doors. You just need to add those options in the door code in a similar fashion.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.

Login to post a reply

Server time is: 2024-11-24 13:46:45
Your offset time is: 2024-11-24 13:46:45