Making a cube 'scoot' to a location

Avatar
Soundlogic
169 Posts
Posted Jun 10, 2011
I am trying to get a cube scoot itself to a location, ideally with some of the pathfinding AI stuff, but I am having trouble figuring out how to make it move or find a path. Any advice?
Thank You,
Sound Logic
Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Jun 10, 2011
Replied 14 minutes later
Try parenting the cube to a func_tracktrain that moves along path_track's until you have it where you want it to and unparent it.

I dunno about finding a path though, maybe elaborate more on what you mean??

Avatar
Soundlogic
169 Posts
Posted Jun 10, 2011
Replied 4 minutes later
The npcs have pathfinding patterns that they use, and I would like to basically make a moving npc cube.
Avatar
ChickenMobile
2,460 Posts
Posted Jun 10, 2011
Replied 16 minutes later
I remember someone made a companion cube that followed the player and killed them when they came close. That's technically not pathfinding though...

You might have too look through HL2 code (or L4d2) and find similar code for certain npc's. If portal has coding for some sort of moving ai that would be a start. In portal both Wheatley and Glados move around and look at the player when you look around, this might be a start for ai?

/me never has played around with this though.

Avatar
Soundlogic
169 Posts
Posted Jun 10, 2011
Replied 2 minutes later
Huh. Do you have any idea where the companion cube was? Was it for portal 2 or portal?
Thank you for your help,
Sound Logic
Avatar
ChickenMobile
2,460 Posts
Posted Jun 10, 2011
Replied 5 minutes later

http://www.youtube.com/watch?v=SzW_6xeGapw
Though this is in garrys mod :S

I can't find the original one, and I think it was Portal 1

Avatar
Soundlogic
169 Posts
Posted Jun 10, 2011
Replied 21 minutes later
Hum... Well, I think I can use the func traintrack for movement, though a generic npc that just tells you what direction to go to get somewhere would be nice. Oh well. There don't seem to be any moving npcs in portal 2, and since we can't add entities I can't copy the code from the ones from half life and other games. Pity. If anyone has any other ideas though, I would love to hear them.
Thank You,
Sound Logic
Advertisement
Registered users don’t see ads! Register now!
Avatar
Soundlogic
169 Posts
Posted Jun 10, 2011
Replied 4 hours later
Well, I have an attempt at it, but it isn't working. Here is what I have so far:
Also: The cube should only move when it isn't being looked at, but that part should work just fine. The problem is in getting the cube to move at all.
Thank You,
Sound Logic
Attachments
angelcubetest.vmf
0.02 MB 26 downloads