Scripts / Its time for a RoofTop Party! .............. AI is working on roofs

Author
Message
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 13th May 2015 19:29
Has anyone else noticed this.....

Stairs are still an issue..
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2789 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Attachments

Login to view attachments
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 13th May 2015 20:10 Edited at: 13th May 2015 20:40
The fact that you got them walking and chasing you on top of the warehouse stuff is inc readable. As this is not supposed to be working yet, to my knowledge.

I also like the debug interface you have going on. very nice.

So you mind sharing how you accomplished the characters?

Edit: Set up a scene similar to yours with the building starting under the terrain. and they do manage to walk across it for a ways before they decide to walk off the edge.

You might get them to walk down a ramp this way, but not up probably.

But a cool find non the less.

But you must give up that script for debugging, please or sell it in the store.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th May 2015 20:46
Nice altogether!
Quote: "Stairs are still an issue.."

Yeah, just script can not solve it. You need the animations to be realistic.

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

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 13th May 2015 21:51 Edited at: 13th May 2015 21:56
The AI need a grounds level to start with it seems ... ( hence perelect's characters do start with ground under their feet )
Then they will just continue to walk on that level provided the model has the forcesimpleobstacle = 3 command in the fpe file .
But in reality ...they still cannot walk on second levels

Like this for instance

The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 13th May 2015 23:47
They will now walk over a bridge structure with no water under it.
Water boundaries still stop them no matter the height.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 13th May 2015 23:59 Edited at: 14th May 2015 00:02
Sorry I needed some sleep.
(that took 14 hours to get that working)

I didn't do anything special. I was just modifying and debugging the ai_zombiewalk.lua and they just walk onto the roof.
So I dragged a soldier onto the map and he followed as well with the ai_soldier.lua, with a minor mod.

I was thinking that build 28 must of made some changes, because I tried a similar scenario about 1 to 2 months ago when I first got GG and they all just stopped at the buildings edge.

The debugging script just shows the current variables values of the entity and player, as you are looking at them.
So you can see a live update of that is happening within the script as it runs. For debugging.
I just built it to learn the different commands in lua.
It is built on smallg,s PlayerLooking function. So all credit to smallg.

But I think there is an issue with the AI updating its height value, this is causing further problems with frame animations.
As it seems to be effecting the PlayerDist vaule and causing false triggering of the animations.

If you compare the two distances commands, to each other to the same point you can get to different values.
If you use g_Entity[e]['plrdist'] to me this seems to give you the correct distance at all times.

But I need to look at this further.
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2789 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th May 2015 00:22
As of 3 weeks ago they would not walk on anything above 5cm. Today they will cross a bridge over dry terrain.

But going up stair right now I don't think they are ready for that. you video got 3 of us moderators, diving into setting characters on everything. So a pleasant surprise to find that they will walk on the very tops of objects, if coming from the terrain t o the object.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 14th May 2015 01:16
Nearly made it up the Paving Slab 1 ramp
I had to forcesimpleobstacle = 3 on Paving Slab 1 as synchromesh said.

What does forcesimpleobstacle = 3 actual do to an entity?
and what is the range for the value?

I Will keep working on it



I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2789 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Attachments

Login to view attachments
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th May 2015 02:43 Edited at: 14th May 2015 02:46
AI crossing wooden bridges over terrain.

if they start on terrain and can get on the object and forcesimpleobstacle = 3 is in the fpe file then they should cross it. Having colmode=1 for poly collision and maybe sided like the bridge objects in the video will keep them on for long stretches.



For what things in the fpe file do and what info I have on them at the moment see this thread.
https://forum.game-guru.com/thread/211923

I can see them having a hard time going up a ramp, and have only got them to get about 18" (46cm) max before they would start to slide. Maybe playing with the physics friction setting in the FPE file might lead better results now.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 14th May 2015 02:48 Edited at: 14th May 2015 02:54
Here is a video showing the Height - Distance error, I am seeing.
I believe the --

(I am refereeing to the Values at the bottom of the screen, in large text in the video)

g_Entity[e]['y'] is not correct and this is effecting the PlayerDist. (or something else related to these values)

the

g_PlayerPosY is correct and the g_Entity[e]['plrdist'] is correct.

PS
as the video shows

eYPosition is the command g_Entity[e]['y']
pYPosition is the command g_PlayerPosY
eDistance is the command g_Entity[e]['plrdist']
PlayerDist is the command PlayerDist

But I am new to lua so I could be doing something wrong. But its worth a look.

EDIT: I have modified the script for the zombies to compensate for the distance error I have.
in-case anyone was wondering.
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2789 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Attachments

Login to view attachments
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 14th May 2015 05:03
Video of AI moving from the outside into the mid level of the warehouse.
I was surprised with the slow zombie at the end of video.
He walked around the wall and straight into the building while I was out of his sight.

afk
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2789 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Attachments

Login to view attachments
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 15th May 2015 00:49 Edited at: 15th May 2015 01:08
Further updates.

The ramps are just the Large Warehouse Double part 2 they will up and down these.
The other ramp is two of the slabclean_400x400.

I set the slabs fpe's the same as the warehouse but they will not attempt to climb it. they always go around it.
I don't know anything about building 3d models, but I am wondering why they will walk on one model but not the other.
Maybe someone with more knowledge about models could work out what is going on here.

At the start of the video there is two AI that start on the roof and they do not move like the rest that start at a similar height but on the terrain.

This got me thinking about the following.

Is there a some code that we can give all AI in the initiation function that tells it that is on the terrain regardless of their "y position" value. This way they might walk off their starting point and continue to walk on the 3D models.


Do we have a command that references the terrain level?
There must be some command for the building of the random maps that we could exploit.

I would really like to try this code if someone know how to reference the terrain.

I am moving onto stairs now.
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2789 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Attachments

Login to view attachments
GoDevils
10
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 15th May 2015 20:33
While I understand that AI controls can make life easier, the operation is inconsistent. I had a character on a sidewalk about 30 units above the terrain and could get it to move a little, sometimes, but never consistently.

Characters can move on levels above ground using the move to and rotate commands without AI control. It is not as automated, but for repetitive actions its my only work around for now. I'm testing a new character movement script, in my Mill Town map, and thus far it works.

"THERE IS NO SPOON"

AMD 6300 6 core 3.5 ghz, Windows 8.1, 8GB ram, GTX 650 2GB ram
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 15th May 2015 23:36
Hi GoDevils,

Thanks for that, it has given me another idea to try.

looking forward to see a video of your work when you are done.

PS
The Soldiers in the "down and up ramps" video are all using their standard GG ai scripts.
I have made no modification to these Soldiers scripts, so this should work for everyone.

I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2789 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 16th May 2015 00:49
Yes, yes the video looks great. This is very hopeful indeed. Thanks for posting this.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 16th May 2015 03:02
You can bring an AI into the buildings with the use of waypoints at elevated levels.
They still need to start on the terrain.
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2789 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-12-22 01:25:11
Your offset time is: 2024-12-22 01:25:11